|
-
September 2nd, 1999, 04:23 PM
#1
Question about std. font dialog
The CFontDialog has a control that says Script: and then lists "Western, Greek, Turkish, ..." in a combo box. I can set this value, get a logfont, and the next time I initialize the CFontDialog with my logfont it is still set. However, it has no effect on how my text looks on the screen.
Here is the part of my OnDraw() function where the text is written to the screen, where m_pTextFont is an LPLOGFONT
if(m_pTextFont){
NewFont.CreatePointFontIndirect(m_pTextFont,pDC);
pOldFont = pDC->SelectObject(&NewFont);
}
CRect textRect=m_Position;
pDC->DrawText(m_strText,textRect,m_nTextOptions);
if(pOldFont){
pDC->SelectObject(pOldFont);
}
I use CFontDialog::GetCurrentFont(m_pTextFont) to get my LOGFONT initialized (after creating it with "new" first).
I look forward to your suggestions
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|