문제

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....!

올바른 솔루션이 없습니다

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top