16,471
社区成员
发帖
与我相关
我的任务
分享
void AddRobotDialog::OnPaint()
{
CPaintDC dc(this); // d
UpdateWindow();
CClientDC *pDC = new CClientDC(GetDlgItem(IDC_HEAD_PIC));
CRect rect;
GetDlgItem(IDC_HEAD_PIC)->GetWindowRect(&rect);
Graphics graphics(pDC->m_hDC);
wchar_t wcstring[256];
MultiByteToWideChar(CP_ACP, 0, m_headPath, -1, wcstring, 256);
Image image(wcstring);
graphics.DrawImage(&image, 0, 0, image.GetWidth(), image.GetHeight());
delete pDC;
}