Jump to content

Recommended Posts

Posted

Hi there,

 

I'm allowing the user to select a font which saves the selected font as a HFONT. How would I get the name of the font being used? E.g. Times New Roman.

 

Thanks,

Posted

LOGFONT lf;

GetObject(hFont, sizeof(lf), &lf);

 

lf.lfFaceName contains the name of the font

 

See MSDN help on GetObject and the LOGFONT structure for more details.

 

Rob

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...