Question

Actually am trying to get the font used in a windows form control which is running from the other application by using WM_GETFONT with SENDMESSAGE function but am ending always with 0 even if the font of the control is not System font. Plz.... help me out.

Thanks in advance....!

No correct solution

OTHER TIPS

Each control decides what font or fonts it uses. Controls intended to be used inside a dialog box should support WM_SETFONT and WM_GETFONT since that is how the dialog manager sets the dialog font. For all other controls, support for these messages is optional. Windows Forms controls do not appear in dialog boxes (they appear on Forms) so there is no reason to expect them to support WM_SETFONT or WM_GETFONT. If you know that you have a Windows Forms control, then you can use the appropriate Windows Forms methods and properties to get the font.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top