// CGapiSurface* m_background;
if (SUCCEEDED(m_background->GetDC(&hdcSurf)))
{
CDC dc;
dc.Attach(hdcSurf);
//设置显示字体
dc.SetBkMode(TRANSPARENT);
CFont font;
VERIFY(font.CreateFont(
40, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_BOLD,//FW_NORMAL, // nWeight
FALSE, // bItalic
FALSE, // bUnderline
0, // cStrikeOut
ANSI_CHARSET, // nCharSet
OUT_DEFAULT_PRECIS, // nOutPrecision
CLIP_DEFAULT_PRECIS, // nClipPrecision
DEFAULT_QUALITY, // nQuality
DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily
_T("宋体"))); // lpszFacename
dc.SelectObject(&font);
//dc.SetTextColor(RGB(0,0,255)); //设置字体颜色白色
CString txt(_T("你好"));
dc.DrawText(txt,CRect(10,30,200,70),DT_LEFT);
font.DeleteObject();
m_background->ReleaseDC(hdcSurf);
}