Click to See Complete Forum and Search --> : how to rotate the text using GDIplus drawstring()


cleung
May 21st, 2004, 04:52 PM
I try to use DrawString() with the font created from CreateFontIndirect() (with lfEscapement on LOGFONT);
code:
...
lf.lfEscapement = 450;
...
HFONT hNewFont = CreateFontIndirect(&lf)
Font MyFont(pdc->m_hDC,hNewFont);
...
g.DrawString(caption[0], (INT) wcslen(caption[0]), &MyFont,pointF, & m_CaptionBrush);//& m_CaptionFormat,
...

but the text not showing rotated.

The similar code working on GDI ExtTextOut() function.

Anyone know why?

Marc G
May 29th, 2004, 04:57 AM
You can try using the RotateTransform method on your Graphics object.