Get the System font

  • Thread starter Thread starter Romu
  • Start date Start date
R

Romu

Hi all,
is there a way to get the system font (I think a way like
the one used to get the system colors,
System.Colors...ActiveCation) ?

I know how to get the font reading the registry, but, in
my opinion, it is a too much hack way.
 
You need to P/Invoke GetStockObject(SYSTEM_FONT) and then use GetObject to
retrieve the LOGFONT structure. Once you have that you can create identical
CF font by name and size. For PPC it'll be Tahoma, 8
 
Thanks for your help Alex.
-----Original Message-----
You need to P/Invoke GetStockObject(SYSTEM_FONT) and then use GetObject to
retrieve the LOGFONT structure. Once you have that you can create identical
CF font by name and size. For PPC it'll be Tahoma, 8




.
 
Back
Top