Really basic Win32 question

How would I make the whole inside of my window show a image, and do it as soon as the window opens?
closed account (G309216C)
Hi,

Obviously there are resources floating around internet every where. It is matter of where you look.

The Code to show a image although this can be easily change to cover the whole Window. It needs few minor adjustments.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
LRESULT CALLBACK Loginpage (HWND hwnd , UINT msg , WPARAM wParam , LPARAM lParam)
{
	switch(msg)
	{
		PAINTSTRUCT ps;
	HDC hdc;
	HDC compatible_bitmap_hdc;
	HBITMAP bitmap;
	
	case WM_PAINT:
		hdc = BeginPaint(hwnd, &ps);

		bitmap = (HBITMAP)LoadImage(NULL, "Skynet Logo.bmp", IMAGE_BITMAP,0, 0, LR_LOADFROMFILE);

		compatible_bitmap_hdc = CreateCompatibleDC(hdc);
		SelectObject(compatible_bitmap_hdc, bitmap);

		SetStretchBltMode(hdc, HALFTONE);
		StretchBlt(hdc,400, 0, 397, 300, compatible_bitmap_hdc, 0, 0, 640, 480, SRCCOPY);

		
		DeleteDC(compatible_bitmap_hdc);
		DeleteObject(bitmap);

		EndPaint(hwnd, &ps);

		break;
Topic archived. No new replies allowed.