Changing the font stly in CView
-
How do I change the font style of the text in CView to the font style selected from the fontdialog?
LOGFONT newlf; CFontDialog fd; if(fd.DoModal() == IDOK) { fd.GetCurrentFont(&newlf); setfont(newlf); UpdateData(FALSE); }
The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V
-
LOGFONT newlf; CFontDialog fd; if(fd.DoModal() == IDOK) { fd.GetCurrentFont(&newlf); setfont(newlf); UpdateData(FALSE); }
The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V
-
Thanks. I have used this method, font style of the text is changed but the alignment of the text is not proper. How do I ensure that the text alignment isn't changed?
Hi, You can change the alignment using SetTextAlign(); pDCMem->SetTextAlign (TA_BASELINE);
The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V