Im trying to load a BMP onto a DialogBox, but it never displays...
heres my code:
In my resource.rc file i have this:
In my Resource.h file i have the following:
IDB_WALLS BITMAP "wall.bmp"
IDD_TESTBMP DIALOGEX 225, 200, 486, 313
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
#define IDB_WALLS 501
Now the dimensions of the BMP are 305x278, and im unsure the BitBlt() function call has the correct parameters? Im sure its something like im drawing on the wrong portion of the DialogBox? Ive also checked the file is in the correct directory also, and im using DevC++ / WinXP
hDC = BeginPaint(hWnd, &Ps);
walls = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_WALLS));
if(walls == NULL)
MessageBox(hwnd, "Could not load Bitmap!", "Error", MB_OK | MB_ICONEXCLAMATION);
MemDC = CreateCompatibleDC(hDC);
BitBlt(hDC, 0, 0, 305, 278, MemDC, 0, 0, SRCCOPY);
Any help appreciated greatly !