philrosenberg
Technical User
I'm having a bit of trouble drawing text on a window. I am trying to get the text vertical so I'm getting the LOGFONT from the default font, spinning it 900 tenths of a degree then creationg a new font with this LOGFONT, selecting it with the DC and then using TextOut to output the text. However the text still appears horizontally. My code is below
CFont vertFont;
LOGFONT lf;
pDC->GetCurrentFont()->GetLogFont(&lf);
lf.lfOrientation=900;
vertFont.CreateFontIndirect(&lf);
pDC->SelectObject(&vertFont);
pDC->TextOut(-50, 300, "Vertical Text");
if anyone can spot what I'm doing wrong I'd be very grateful
Phil
CFont vertFont;
LOGFONT lf;
pDC->GetCurrentFont()->GetLogFont(&lf);
lf.lfOrientation=900;
vertFont.CreateFontIndirect(&lf);
pDC->SelectObject(&vertFont);
pDC->TextOut(-50, 300, "Vertical Text");
if anyone can spot what I'm doing wrong I'd be very grateful
Phil