Does anybody know how the make controls created with CreateWindowEx(), like buttons, use the normal font, in my case MS Sans Serif 8? They show Arial 12 or something like that. Controls created with RC files don't have this problem, but I can't use RC files.

Thanks in advance,
Posted on 2002-07-01 08:28:15 by El_Choni
It depends on what you mean by "normal". There are several different defaults for fonts, but most controls normally use the system default. If this is the case, the below snip should work out to what you want.

invoke GetStockObject, SYSTEM_FONT
invoke SendMessage, WM_SETFONT, eax, 0
Posted on 2002-07-01 08:53:39 by Graebel
Thanks a lot, it did the trick (using DEFAULT_GUI_FONT).

Posted on 2002-07-01 11:21:50 by El_Choni