Original Post
okay, so i've got my image working and loading... now i need to make it so that the image appears the same size as the dialog when i run the program and so that it resizes whenever i maximize the program... Here is what I have: Once again, no links please. I've gone all over MSDN, so that certainly won't help.
case WM_INITDIALOG:
{
BITMAP bm;
hBitmap = (HBITMAP)LoadImage(0,"page2.bmp",IMAGE_BITMAP,
0, 0,
LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_DEFAULTSIZE);
} break;
case WM_PAINT:
{
// Just a note, never use a MessageBox from inside WM_PAINT
// The box will cause more WM_PAINT messages and you'll probably end up
// stuck in a loop
BITMAP bm;
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
HDC hdcMem = CreateCompatibleDC(hdc);
HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem, hBitmap);
GetObject(hBitmap, sizeof(bm), &bm);
//BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY);
StretchBlt(
hdc,
100,
0,
bm.bmWidth * 2,
bm.bmHeight * 2,
hdcMem,
50,
0,
bm.bmWidth,
bm.bmHeight,
SRCCOPY);
SelectObject(hdcMem, hbmOld);
DeleteDC(hdcMem);
EndPaint(hWnd, &ps);
}


