Zdravim,
pouzivam DevC++ a ked mam takyto kod :
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HBITMAP g_hbmBall = NULL;
switch (message)
{
case WM_CREATE:
g_hbmBall = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(100));
case WM_PAINT:
BITMAP bm;
HBITMAP hbmOld;
PAINTSTRUCT ps;
HDC hdcMem;
HDC hdc;
hdc = BeginPaint(hwnd, &ps);
hdcMem = CreateCompatibleDC(hdc);
hbmOld =(HBITMAP) SelectObject(hdcMem, g_hbmBall);
GetObject(g_hbmBall, sizeof(bm), &bm);
BitBlt(hdc, 0, 0, 100, 200, hdcMem, 0, 0, SRCCOPY);
SelectObject(hdcMem, hbmOld);
DeleteDC(hdcMem);
EndPaint(hwnd, &ps);
break;
return 0;
case WM_DESTROY:
PostQuitMessage (0);
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
Ked to spustim, zobrazi sa iba klasicke okno ale ani naznak nejakej bitmapy...Kde by mohol byt problem?