can i get the font information from Graphics System.Drawing.Graphics in c#
Posted
by
Bahgat Mashaly
on Stack Overflow
See other posts from Stack Overflow
or by Bahgat Mashaly
Published on 2011-01-02T07:06:47Z
Indexed on
2011/01/03
4:53 UTC
Read the original article
Hit count: 239
c#
Hello
i get the Graphics from
Graphics g= System.Drawing.Graphics.FromHwnd(button1.Handle);
can i get the font information from this Graphics
i was try to get a font by using GetTextFace api function but it return "system" it mean default font in OS
and i was try to use SendMessage(button1.Handle, WM_GETFONT, 0, 0); bu it return me 0 also it is mean default font in OS
I have known the cause of the problem, it due to FlatStyle property
See this link
http://blogs.msdn.com/b/michkap/archive/2008/09/26/8965526.aspx
thanks
© Stack Overflow or respective owner