MFC MDI default Child Frame creation
-
I have created a simple MFC MDI application using the MFC application wizard and apparently it creates a child window when I start the application. The application I'm writing ONLY provides the possibility to open certain files. This means that I do NOT want a child window when i start the application. Is there some way i can avoid this 'default' behaviour, without having to create child windows myself (through 'Create' or 'LoadFrame')? Any help will be greatly appreciated. Er zit een korstje op mijn aars.
-
I have created a simple MFC MDI application using the MFC application wizard and apparently it creates a child window when I start the application. The application I'm writing ONLY provides the possibility to open certain files. This means that I do NOT want a child window when i start the application. Is there some way i can avoid this 'default' behaviour, without having to create child windows myself (through 'Create' or 'LoadFrame')? Any help will be greatly appreciated. Er zit een korstje op mijn aars.
I wish you luck, because I have the same problems... The text books I have don't take me far enough into the nuts and bolts of what I really want to do. I will keep my eye on this thread Thomas
-
I wish you luck, because I have the same problems... The text books I have don't take me far enough into the nuts and bolts of what I really want to do. I will keep my eye on this thread Thomas
Well....i found the reason for this behaviour. The 'CCommandLineInfo' class, which is commonly created in the 'InitInstance' of the 'CWinApp' derived class, contains a 'CCommandLineInfo::FileNew' command by default. You can prevent a child frame from being created by assigning a 'FileNothing' command to the 'm_nShellCommand' attribute:
CCommandLineInfo cmdInfo; cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; ParseCommandLine(cmdInfo);
Er zit een korstje op mijn aars.