显示资源图片

CClientDC dc(this);
CDC *mdc=new CDC;
mdc->CreateCompatibleDC(&dc);
CBitmap bitmap;
bitmap.m_hObject = (HBITMAP)::LoadImage(NULL,"Before.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
mdc->SelectObject(bitmap);
CRect rect;
GetDlgItem(IDC_BEFORE)->GetWindowRect(&rect);
ScreenToClient(&rect);
//GetClientRect(&rect);
dc.BitBlt(rect.left,rect.top,rect.Width(),rect.Height(),mdc,0,0,SRCCOPY);

你可能感兴趣的:(image,null)