Original Post
Using: Microsoft Visual C++ .NET 2003 7.1, Windows XP SP1 I'm writing a Win32 program in C++ in which the main window should initially be maximized. I have the window style set as WS_OVERLAPPEDWINDOW | WS_MAXIMIZE. This seems to work fine when I run the application from the Visual Studios Debugger (in both Debug and Release mode). However, when I open the application from its execute file the main window does not maximize. Why would opening the application from the Visual Studios Debugger recognize the WS_MAXIMIZE style and a manual execution not? (I've worked arround the problem by forcing the maximize with ShowWindow() and SM_MAXIMIZE, but this solution is rather unattractive.)