33,311
社区成员
发帖
与我相关
我的任务
分享
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hwnd,&ps);
HDC hdcmem = CreateCompatibleDC(hdc);
HANDLE hbitmap = LoadImage(NULL,"bitmap1.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
BITMAP bmap;
GetObject(hbitmap,sizeof(BITMAP),&bmap);
SelectObject(hdcmem,hbitmap);
BitBlt(hdc,11,11,bmap.bmWidth,bmap.bmHeight,hdcmem,0,0,SRCCOPY);
DeleteDC(hdcmem);
DeleteObject(hbitmap);
EndPaint(hwnd,&ps);
return 0;
}