I am working with CFileDialog in MFC SDI application. When I open a file for ex: test.txt from File->Open menu, the contents of the file are read and displayed on the view. When I select, File->Save option to save the contents of the file, a CFileDialog is displayed. When the selected file from CFileDialog is the same file as the opened one i.e test.txt, then a special message should be displayed to the user and the default windows warning message asking for replacing the file should not be displayed. However if any different already existing file is selected, then the default windows warning message should be displayed. In other words, I want to ovveride the function that is called when we click on CFileDialog's save button.
Can anyone please give me some inputs for doing this?