Click to See Complete Forum and Search --> : Question about std. font dialog


Jebediah
September 2nd, 1999, 04:23 PM
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