Thanks, CaptainCPS-X. Your posts are very useful and I added them all. ^_^
I use Visual Style under WinXP, I found the menu height was not 25, so I changed StretchBitmap function to this, now the bitmap fills full the screen.
// This is for background image, performs the needed stretching
// for avoiding the use of more images for this :)
// Extra Stretch Code for any BMP Size by CaptainCPS-X
// Made posible ThanX to FerchogtX Info about BMP attributes
void StretchBitmap(HDC hDC, HWND hWnd, HBITMAP hBitmap)
{
HDC memDC; BITMAP bm; RECT re; RECT reMenu;
memDC = CreateCompatibleDC(hDC);
HGDIOBJ hOldObj = SelectObject(memDC, hBitmap);
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
// get menu height
HMENU hMenu = FBALoadMenu(hAppInst, MAKEINTRESOURCE(IDR_MENU));
GetMenuItemRect(hWnd, hMenu, 0, &reMenu);
long mH = reMenu.bottom - reMenu.top;
GetClientRect(hWnd, &re);
if (bMenuEnabled) {
StretchBlt(hDC, 0, mH, re.right, re.bottom-mH, memDC, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
} else {
StretchBlt(hDC, 0, 0, re.right, re.bottom, memDC, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
}
SelectObject(memDC, hOldObj);
DeleteDC(memDC);
}