-
March 3rd, 2004, 02:49 PM
#1
Prevent New Dialog from popping up
In my SDI application I have three views connected ton one Document. The views are divided by splitters. On start up and when clicking new in the file menu a dialog pops up. This dialog wants the user to pick a view or document (I'm not sure which) in a list and press OK. I always pick the first choice in the list and press OK. I don't want this dialog to pop up. Does anyone know how to get rid of the dialog box?
-
March 3rd, 2004, 03:23 PM
#2
In your InitInstance function of your FooApp class you should
see
PHP Code:
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
Change this to
PHP Code:
CCommandLineInfo cmdInfo;
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
FooDocTemplate->OpenDocumentFile(NULL);
Where FooDocTemplate is the desired doc template that was just created above
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
March 3rd, 2004, 03:24 PM
#3
That's probably one of the most often asked (and answered) questions here... There's even an article on that subject.
-
March 3rd, 2004, 03:33 PM
#4
Well add me to the list of people who have answered it
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
March 3rd, 2004, 03:45 PM
#5
-
March 3rd, 2004, 03:54 PM
#6
Yup, my mistake. I was assuming the new file stuff would just
be removed completely.
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|