[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Override the Save

Posted on 1998-06-24
2
Medium Priority
?
323 Views
Last Modified: 2013-11-20
Using MFC,  I am trying to override the OnSave Function.  Yet, If I click Save As it still goes to the System Controlled Dialog Box, before going to my function.   This also happens if I save for the first time. How do I get around this?  There doesn't seem to be an OnSaveAs Function to override, at least not in ClassWizard.  

Thanks!!  
0
Comment
Question by:smithc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 200 total points
ID: 1318374
You user chooses File Save command WM_COMMAND message with ID_FILE_SAVE is sent to main application window and is handled by cDocument class OnFileSave function. you can override this behaviour by declaring your own message handler in your document class.
Add to your document class message map
ON_COMMAND(ID_FILE_SAVE, OnFileSave)
add afx_msg void OnFileSave() to your document class declaration
and add OnFileSave() function implementation
0
 

Author Comment

by:smithc
ID: 1318375
Perfect.   I wonder why I couldn't find the option to override OnFileSave in ClassWizard??

Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question