Create a Window that is initially maximized.

Does any one know how to make a windows program start up with a full screen instead of small screen.

In looking in Microsoft SDK under CreateWindow I see that the dwStyle has a function WS_MAXIMIZE that seems to indicate it will cause the program to start up with a full screen. So far I have not been able to get this to work. Here is what I have tried;

Create Window(
szWinName,
Text ("Name"),
WS_OVERLAPPEDWINDOW | WS_MAXIMIZE,

Any help would be apprished.
Bill
Try this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
	hwnd = CreateWindow(
		g_szClassName,
		"Serpentine's Auto Farmer V 1.0",
		WS_OVERLAPPEDWINDOW,
		CW_USEDEFAULT, CW_USEDEFAULT, 300, 200,
		NULL, NULL, hInstance, NULL);

	if(hwnd == NULL)
	{
		MessageBox(NULL, "Failed To Create Window!", "Error!",
			MB_ICONEXCLAMATION | MB_OK);
		return 0;
	}

	ShowWindow(hwnd, SW_MAXIMIZE); //<<<<<<<<<<<<<<<<<<<<<<<<<<<
	UpdateWindow(hwnd);
Hi guestgulkan,

The solution worked very well. I was looking in the wrong place.

Thank you for your solution.

Bill

Topic archived. No new replies allowed.