图片显示问题
本帖最后由 孤独一掷 于 2017-12-11 22:17 编辑图片显示不出来啊
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
RECT rect;
GetClientRect(hWnd, &rect);
int weight = rect.right - rect.left;
int height = rect.bottom - rect.top;
HBITMAP bmp = LoadBitmap(hInst, TEXT("G:\link.jpg"));
HDC memdc = CreateCompatibleDC(hdc);
SelectObject(memdc, bmp);
BitBlt(hdc, 0, 0, weight, height, memdc, 0, 0, SRCCOPY);
EndPaint(hWnd, &ps);
}
页:
[1]