The MASM Forum

General => The Workshop => Windows API => Topic started by: jj2007 on July 15, 2024, 07:42:44 PM

Title: WM_SETFONT behaviour changed between Win7 and Win10
Post by: jj2007 on July 15, 2024, 07:42:44 PM
invoke SendMessage, hControl, WM_SETFONT, hFont, 0

That worked fine in Windows 7, but Windows 10 requires 1 as redraw flag
Title: Re: WM_SETFONT behaviour changed between Win7 and Win10
Post by: NoCforMe on July 16, 2024, 07:35:44 AM
Not sure I understand; W10 requires redrawFlag=TRUE in order to set the font at all?

That certainly seems contrary to the documented behavior (https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-setfont).
Title: Re: WM_SETFONT behaviour changed between Win7 and Win10
Post by: zedd151 on July 16, 2024, 08:04:04 AM
Quote from: NoCforMe on July 16, 2024, 07:35:44 AMNot sure I understand;
It appears that Microsoft no longer believes in backward compatibility. I have not tested this myself, though. If that is correct, another reason to avoid Windows 10 and above.
Title: Re: WM_SETFONT behaviour changed between Win7 and Win10
Post by: NoCforMe on July 16, 2024, 08:08:00 AM
I'm going to dash off an angry letter to Raymond Chen!
Title: Re: WM_SETFONT behaviour changed between Win7 and Win10
Post by: NoCforMe on July 16, 2024, 08:08:54 AM
Quote from: zedd151 on July 16, 2024, 08:04:04 AMIf that is correct, another reason to avoid Windows 10 and above.

Windows 7 foreva!
Title: Re: WM_SETFONT behaviour changed between Win7 and Win10
Post by: zedd151 on July 16, 2024, 08:38:21 AM
Quote from: NoCforMe on July 16, 2024, 08:08:00 AMI'm going to dash off an angry letter to Raymond Chen!
:biggrin: