CFontDialog m_OTheFontDialog; FontFamily* pOFontFamily = NULL; m_OTheFontDialog.m_cf.Flags |= CF_TTONLY; if(m_OTheFontDialog.DoModal() == IDOK) { m_OTheFontDialog.GetCurrentFont(&m_SFontInformation); m_SFontInformation.lfQuality = ANTIALIASED_QUALITY; m_crTextColor = m_OTheFontDialog.GetColor(); if(m_OTheFontDialog.IsBold()) iFontStyle = iFontStyle | FontStyleBold; if(m_OTheFontDialog.IsItalic()) iFontStyle = iFontStyle | FontStyleItalic; if(m_OTheFontDialog.IsStrikeOut()) iFontStyle = iFontStyle | FontStyleStrikeout; if(m_OTheFontDialog.IsUnderline()) iFontStyle = iFontStyle | FontStyleUnderline; if(!wcscmp(m_SFontInformation.lfFaceName, _T(""))) return false; pOFontFamily = new FontFamily(m_SFontInformation.lfFaceName); m_pOBrush = new SolidBrush(Color(255, GetRValue(m_crTextColor), GetGValue(m_crTextColor), GetBValue(m_crTextColor))); m_pOTheFont = new Font(pOFontFamily, (float)ulFontHeight, iFontStyle, UnitPixel); }
m_pMainWnd->SetWindowPos(&CWnd:: wndTopMost, 0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_SHOWWINDOW);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)