Valhalla Legends Forums Archive | C/C++ Programming | CreateWindowEx - Bold Font (?)

AuthorMessageTime
Eli_1
[img]http://img66.exs.cx/img66/4394/keygen.jpg[/img]

How would I go about changing the font? I hate how everything is bold, it makes me feel like my resources are too low or something.
August 2, 2004, 1:29 AM
Zakath
Change the font for the controls in the window...

Unless you're using a richedit, look up the WM_SETFONT message.
August 2, 2004, 1:36 AM
Eli_1
[quote author=Zakath link=board=30;threadid=7996;start=0#msg73713 date=1091410599]
Change the font for the controls in the window...

Unless you're using a richedit, look up the WM_SETFONT message.
[/quote]

Controls? Window? I'm using notepad and a command line compiler.
August 2, 2004, 1:41 AM
Zakath
Ok, presumably, you are responsible for putting those edit boxes and static labels on that window? Those are controls. Clear now?

In a message handler (I'd suggest using the one for the main window) respond to the WM_CREATE message by sending WM_SETFONT messages to each of the window's controls, changing the font to whatever you would like it to be.

Do you get what I'm saying?
August 2, 2004, 1:47 AM
Eli_1
[quote author=Zakath link=board=30;threadid=7996;start=0#msg73715 date=1091411222]
In a message handler (I'd suggest using the one for the main window) respond to the WM_CREATE message by sending WM_SETFONT messages to each of the window's controls, changing the font to whatever you would like it to be.
[/quote]

I got it, thanks for the information on WM_SETFONT. :)

[quote author=Zakath link=board=30;threadid=7996;start=0#msg73715 date=1091411222]
Ok, presumably, you are responsible for putting those edit boxes and static labels on that window? Those are controls. Clear now?
[/quote]

I know what a control and a window is. I misunderstood you, and thought you ment something like, "there's a property window for that control, just select a new font" (like in VB).


Edit:
Added two smilie faces! :)

Edit:
Added an "after" photo!

[img]http://img67.exs.cx/img67/4862/keygen2.jpg[/img]
August 2, 2004, 2:47 AM
St0rm.iD
notepadex.cjb.net
August 2, 2004, 2:49 AM
Zakath
[quote author=Eli_1 link=board=30;threadid=7996;start=0#msg73719 date=1091414842]I know what a control and a window is. I misunderstood you, and thought you ment something like, "there's a property window for that control, just select a new font" (like in VB).[/quote]

Actually, if you use a resource script to create a dialog template you can set the default font for an entire dialog window. If you're using MSVC, this can be done via the resource editor in a very VB-ish manner.
August 2, 2004, 2:56 AM

Search