September 28th, 1999, 02:47 PM
Hello all,
I was wondering if anyone could tell me how to create a font of "Wingdings" using "CreateFont" for I am not sure what parameters I should use for the create font that will actually create the font.
Thanks
September 28th, 1999, 05:30 PM
//I would use CreateFontIndirect as follows:
CFont font;
LOGFONT logfont;
memset(&logfont, 0, sizeof( LOGFONT ));
logfont.lfHeight = -height; //Replace height with height based on mapping mode
logfont.lfWeight = FW_NORMAL;
logfont.lfCharSet = SYMBOL_CHARSET;
logfont.lfOutPrecision = OUT_TT_ONLY_PRECIS;
logfont.lfQuality = PROOF_QUALITY;
logfont.lfPitchAndFamily = VARIABLE_PITCH | FF_DECORATIVE;
strcpy( logfont.lfFaceName, "Wingdings" );
font.CreateFontIndirect( &logfont );
//*****
//If you prefer to use CreateFont, this should do the same thing
//(replace height with the desired font height):
font.CreateFont(-height,0,0,0,FW_NORMAL,0,0,0,SYMBOL_CHARSET, 0, 0,PROOF_QUALITY,VARIABLE_PITCH | FF_DECORATIVE, "Wingdings" );