Or to rotate basically anything at all (not just text):
CPaintDC dc(this);
int OldGMode = SetGraphicsMode(dc.m_hDC, GM_ADVANCED);
static const double pi = 4*atan(1.0); // Gives up pi.
static const double a = 30*(pi/180); // Angle in radians.
XFORM xf = {cos(a), sin(a), -sin(a), cos(a), 0, 0};
SetWorldTransform(dc.m_hDC, &xf);
int OldBkMode = dc.SetBkMode(TRANSPARENT);
dc.TextOut(0, 0, _T("This text is rotated."));
dc.SetBkMode(OldBkMode);
dc.Rectangle(100, 100, 200, 200);
SetGraphicsMode(dc.m_hDC, OldGMode);
NOTE: Doesn't work in 95/98/ME Steve