为什么自己的bmp图片显示不了?
为什么自己的bmp图片显示不了?hInstance = ((LPCREATESTRUCT)lParam) -> hInstance;
我按照书上的写的..可是没有显示,希望大师能够帮助我..嘻嘻!
case WM_PAINT :
hdc = BeginPaint(hwnd, &ps);
hBitmap = LoadBitmap(hInstance, "C:\\Users\\Administrator\\Desktop\\girl.bmp");
GetObject(hBitmap, sizeof(BITMAP), &bitmap);
cxSource = bitmap.bmWidth;
cySource = bitmap.bmHeight;
hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem, hBitmap);
BitBlt(hdc, 0, 0, cxSource, cySource, hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);
EndPaint(hwnd, &ps);