I have this code in my WM_PAINT method
If I have no controls on the form it shows up, otherwise it's not there......whats wrongCode:hDC = BeginPaint(hWnd, &ps) ; GetClientRect(hWnd, &rect) ; hBitmap = LoadBitmap(ghInst, MAKEINTRESOURCE(IDB_BITMAP1)); GetObject(hBitmap, sizeof(BITMAP), &bm); hMemDC = CreateCompatibleDC(hDC); SelectObject(hMemDC, hBitmap); BitBlt(hDC, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY); DeleteDC(hMemDC); EndPaint(hWnd, &ps); DeleteObject(hBitmap);![]()




Reply With Quote