你自己不会搜啊
CFileDialog
dlg(TRUE,
"bmp",
"*.bmp");
if(dlg.DoModal())
{
CString
name;
name=dlg.GetFileName();
hBmp=(HBITMAP)LoadImage(0,
name,
IMAGE_BITMAP,
0,
0,
LR_LOADFROMFILE);
ASSERT(hBmp);
CDC
*dc=NULL;
CDC
memdc;
dc=GetDC();
ASSERT(dc);
memdc.CreateCompatibleDC(dc);
memdc.SelectObject(hBmp);
CBitmap
bmp;
bmp.Attach(hBmp);
BITMAP
b;
bmp.GetBitmap(
&b
);
dc->BitBlt(
0,
0,
b.bmWidth,
b.bmHeight,
&memdc,
0,
0,
SRCCOPY
);
bmp.Detach();
memdc.DeleteDC();
}