Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic "Save / SaveAs" question

Status
Not open for further replies.

rdalton

Programmer
Dec 5, 2002
24
0
0
US
I'm trying to add some customized code when the user chooses to save or saveAs in a SDI. I have a function that
handles the command message for ID_FILE_SAVE and ID_FILE_SAVEAS from either the toolbar or the "File" menu, but the code is not getting called. A saveAs dialog box opens, but it isn't the one that I want. I need to figure out how to bypass that default saveAs dialog and load mine instead. Any suggestions? Thanks.

Bob
 
It is calling the default handler first.

One easy way is to edit the menu and assign those menu items , new IDS like ID_FILE_MYSAVE and ID_FILE_MYSAVEAS
and then map the handlers for it through classwizard.


 
OnSaveDocument is a member function of CDocument you need to override to get rid of the default behaviour.
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top