WhorlyWhelk
September 5th, 2007, 10:09 PM
case WM_PAINT:
{
HDC hdc2,mdc;
HBITMAP bmp;
PAINTSTRUCT ps2;
HFONT font14,font18,font60;
hdc2=BeginPaint(hwnd,&ps2);
mdc=CreateCompatibleDC(hdc2);
bmp=LoadBitmap(GetWindowInstance(hwnd),MAKEINTRESOURCE(gra1));
SelectObject(mdc,bmp);
BitBlt(hdc2,20,5,12,6,mdc,0,0,SRCCOPY);
...
...
...
in resource.h...
#define gra1 41
in proj.rc...
gra1 BITMAP DISCARDABLE "thepic.bmp"
Doesn't work. No matter what I do bmp is always NULL right after I call either LoadBitmap or LoadImage.
Any idea?
Oh... it works when I just load the file not through the resource... :=|
Thanks for any help.
{
HDC hdc2,mdc;
HBITMAP bmp;
PAINTSTRUCT ps2;
HFONT font14,font18,font60;
hdc2=BeginPaint(hwnd,&ps2);
mdc=CreateCompatibleDC(hdc2);
bmp=LoadBitmap(GetWindowInstance(hwnd),MAKEINTRESOURCE(gra1));
SelectObject(mdc,bmp);
BitBlt(hdc2,20,5,12,6,mdc,0,0,SRCCOPY);
...
...
...
in resource.h...
#define gra1 41
in proj.rc...
gra1 BITMAP DISCARDABLE "thepic.bmp"
Doesn't work. No matter what I do bmp is always NULL right after I call either LoadBitmap or LoadImage.
Any idea?
Oh... it works when I just load the file not through the resource... :=|
Thanks for any help.