News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

WM_GETFONT & LOGFONT

Started by hotrod, January 21, 2010, 04:57:11 PM

Previous topic - Next topic

hotrod

I am running XP Pro SP3 and the following code returns the OEM font only to LOGFONT. Why?
BTW, I have tried GetStockObject also which works as advertised. Thanks...
invoke SendMessage, hWnd, WM_GETFONT, 0, 0
invoke GetObject, eax, sizeof LOGFONT, addr LF

MichaelW

If the control is using the system font, then the WM_GETFONT message should be returning null. The attachment is a quick demo based on a MASM32 in-memory dialog.
eschew obfuscation

hotrod

Thanks MichaelW, I found a problem with my thinking after looking at your code. I did not notice the FONT directive in the .rc which was my problem because I was using ChooseFont after the dialog loaded which had a different font connected with it. Need to do a better job of investigating.