Page 1 of 1

How to support the Chinese?

PostPosted: Mar 31, 2008 @ 4:03pm
by wdfwdf

Re: How to support the Chinese?

PostPosted: Mar 31, 2008 @ 6:45pm
by Marijn

PostPosted: Apr 1, 2008 @ 6:45am
by wprintf

Re: How to support the Chinese?

PostPosted: Apr 1, 2008 @ 2:22pm
by wdfwdf

Re: How to support the Chinese?

PostPosted: Apr 1, 2008 @ 2:55pm
by Johan

PostPosted: Jun 18, 2008 @ 6:46am
by pytyj
// 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);
}