1,显示一张位图:
int CThreadPoolDlg::ShowFace(int xPos, int yPos, CString FilePath)
{
// TODO: Add your control notification handler code here
CClientDC *pDC = new CClientDC(this);
CBitmap Bitmap;
HBITMAP hBitmap = (HBITMAP)LoadImage(NULL,FilePath,IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
Bitmap.Attach(hBitmap);
CDC DCCompatible;
DCCompatible.CreateCompatibleDC(pDC);
DCCompatible.SelectObject(&Bitmap);
BITMAP bmInfo;
Bitmap.GetObject(sizeof(bmInfo),&bmInfo);
pDC->BitBlt(xPos,yPos,bmInfo.bmWidth,bmInfo.bmHeight,&DCCompatible,0,0,SRCCOPY);
return 1;
}