Here is what worked for me:
CClientDC dc(this);
CFont l_font;
l_font.CreateFont(14, 0, 0, 0, FW_NORMAL,
FALSE, FALSE, FALSE, 0, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_ROMAN, "Times New Roman");
CFont* l_old_font = dc.SelectObject(&l_font); dc.TextOut(50, 50, "Hello World");
dc.SelectObject(l_old_font);
// Delete the font object.
l_font.DeleteObject();
except that I got my CDC in the OnraseBackground function of the CStatic class. Thanks everyone for helping. sb