• Welcome to Valhalla Legends Archive.
 

CreateWindowEx - Bold Font (?)

Started by Eli_1, August 01, 2004, 08:29 PM

Previous topic - Next topic

Eli_1



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.

Zakath

Change the font for the controls in the window...

Unless you're using a richedit, look up the WM_SETFONT message.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Eli_1

Quote from: Zakath on August 01, 2004, 08:36 PM
Change the font for the controls in the window...

Unless you're using a richedit, look up the WM_SETFONT message.

Controls? Window? I'm using notepad and a command line compiler.

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?
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Eli_1

#4
Quote from: Zakath on August 01, 2004, 08:47 PM
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.

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

Quote from: Zakath on August 01, 2004, 08:47 PM
Ok, presumably, you are responsible for putting those edit boxes and static labels on that window? Those are controls. Clear now?

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!



Zakath

Quote from: Eli_1 on August 01, 2004, 09:47 PMI 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).

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.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.