visual c++ - Overriding CDocument OnFileSave() -
how do this? if please kindly include code message map , function itself, appreciated.
edit:
more wondering how onfilesave() links onsavedocument(lpcstr lpszpathname) how onfilesave lpszpathname?
you don't need special override onsavedocument(...)
it's virtual function in cdocument, derived class can declare virtual bool onsavedocument(lpctstr lpszpathname);
in it's header, implement in document. nothing needed in message map. onsavedocument called framework part of onfilesave handler in base class id_file_save. lpszpathname refers m_strpathname when called onfilesafe, set when opening file or calling setpathname. if it's empty when saving, user prompted file name.
Comments
Post a Comment