Using SetFont and Trying to Display PI(the symbol)
-
I'm trying to display the PI symbol on certain static text variables in a Dialog box. I know I can set all the text in the dialog box to the symbol font but is there a way using SetFont in the OnInitDialog() function to allow me to change the only certain ones to the symbol PI? Also how would I put a subscript/superscript on a static text? Would this be done using some sort of RichEdit? Any help would be nice. J Guds Masters Student Kansas University
-
I'm trying to display the PI symbol on certain static text variables in a Dialog box. I know I can set all the text in the dialog box to the symbol font but is there a way using SetFont in the OnInitDialog() function to allow me to change the only certain ones to the symbol PI? Also how would I put a subscript/superscript on a static text? Would this be done using some sort of RichEdit? Any help would be nice. J Guds Masters Student Kansas University
CFont font; font.CreateFont( 14, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_BOLD, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily _T("MS Sans Serif")); btn = (CButton*)GetDlgItem(IDC_BUTTON_EXIT); btn->SetFont(&font); Ellis Li
-
CFont font; font.CreateFont( 14, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_BOLD, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily _T("MS Sans Serif")); btn = (CButton*)GetDlgItem(IDC_BUTTON_EXIT); btn->SetFont(&font); Ellis Li
-
1. Remember to delete your font after use. 2. This is only a sample, please custom it yourself Ellis Li
why delete the font after you used the SetFont()? Please refer to : http://www.flounder.com/detach.htm Ellis Li
-
why delete the font after you used the SetFont()? Please refer to : http://www.flounder.com/detach.htm Ellis Li
Did you know that you could modify your original response instead of creating more?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)