Thread View: comp.os.os2.programmer
2 messages
2 total messages
Started by Esmond Pitt
Mon, 26 Nov 1990 03:08
changing fonts
Author: Esmond Pitt
Date: Mon, 26 Nov 1990 03:08
Date: Mon, 26 Nov 1990 03:08
14 lines
897 bytes
897 bytes
I have read the MSJ Journal articles (esp. Mark Adler) on how to change the default fonts for a particular window. ]It's an amazingly long-winded process.] Anyway what I want to do is change the font for ALL windows, especially STATIC and EDIT windows, to a Courier or other monospaced font, so the people I'm interfacing for can continue to think in rows and columns of characters. Do I really have to use OWNERDRAW on all of them, or is there a neater way? Thanks for any help. -- Esmond Pitt, Computer Power Group ejp@bohra.cpg.oz D
Re: changing fonts
Author: Brian E. Danilko
Date: Fri, 30 Nov 1990 14:56
Date: Fri, 30 Nov 1990 14:56
28 lines
2001 bytes
2001 bytes
In article <835@bohra.cpg.oz> ejp@bohra.cpg.oz (Esmond Pitt) writes:
>...Do I really have to use
>OWNERDRAW on all of them, or is there a neater way?
The Microsoft programmer's reference manual, version 1.2, volume 4
contains a new command - WinSetPresParam - on page 332. This command
can be used for changing the font using the PP_FONTNAMESIZE or
PP_FONTHANDLE. And the bonus part is that under comments on page 333
it is stated that all windows owned by the window calling the
WinSetPresParam will have a WM_PRESPARAMCHANGED message sent to them.
So if you call the WinSetPresParam in a window owning static windows,
the static windows should take and use the new presentation parameter.
- OR -
Do the Microsoft created window classes not use the WM_PRESPARAMCHANGED??
I haven't tried this yet because of time pressures and because of the
lack of information about the parameters PP_FONTNAMESIZE and PP_FONTHANDLE,
but it may provide a way of changing a font for all windows in an application.
P.S. I once tried changing the file name for the system font in one of the
ini files to the courier font but it didn't work. Doesn't OS/2 use
the information in it's ini files?
--
-------------------------------------------------------------------------------
Brian E. Danilko
E & M Waterloo, NCR Canada Ltd., MAILplus: Brian.Danilko@Waterloo.NCR.COM
Waterloo, Ontario, CANADA UUCP: uunet!ncrlnk!swdev!bed
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads