I have a window using Win32 and in the message handler I have a case for WM_PAINT, so that a bitmap is drawn in the window. However on running the bitmap is not drawn, is there something I am missing? Do I need to manually send the WM_PAINT message?
Here is the code I have: http://pastebin.com/bi48LB0U
and this is the WM_PAINT case:
case WM_PAINT:
hDC = BeginPaint(hwnd, &ps);
bmp = LoadBitmap(hInst, L"C:\\example.bmp");
memDCExercising = CreateCompatibleDC(hDC);
SelectObject(memDCExercising, bmp);
BitBlt(hDC, 100, 100, 500, 500, memDCExercising, 0, 0, SRCCOPY);
DeleteDC(memDCExercising);
DeleteObject(bmp);
EndPaint(hwnd, &ps);
break;