Created
September 17, 2009 17:20
-
-
Save mrcaron/188599 to your computer and use it in GitHub Desktop.
Sets up unicode font in a rich text edit control for MFC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* SET UNICODE FONT */ | |
CDC *pDC = GetDC(); | |
LOGFONT lf; | |
memset(&lf, 0, sizeof(lf)); | |
lf.lfHeight = MulDiv(20, ::GetDeviceCaps(pDC->m_hDC, LOGPIXELSY), 72); | |
lf.lfWeight = FW_NORMAL; | |
lf.lfOutPrecision = OUT_TT_ONLY_PRECIS; | |
wcscpy(lf.lfFaceName, _T("Lucida Sans Unicode")); | |
CFont font; | |
font.CreateFontIndirect(&lf); | |
iEqnRichEditControl.SetFont(&font); | |
ReleaseDC(pDC); | |
/* END UNICODE SETUP */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment