Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO : Capture the open and save event in a File Open/Save dialog.

 
Subscribe to the RSS feed for this forum  Forum Index -> EZNamespaceExtensionsMFC
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Thu Dec 06, 2007 8:42 am    Post subject: HOWTO : Capture the open and save event in a File Open/Save dialog.

Note : To display your namespace extension in file Open/Save dialogs, see
http://www.ssware.com/support/viewtopic.php?t=380

Whenever the Open or Save button of a File Open/Save dialog is clicked, the OnCommonDialogOKButtonClicked method of CNSEFolder is called. You must override this method and synchronize your data source with the file system. You can use the GetHostType method of CNSEFolder to determine whether your namespace extension is being viewed in a Open dialog or a Save dialog.

In case of an Open dialog, your OnCommonDialogOKButtonClicked method must bring the data corresponding to the item that was selected in the Open dialog to the file system location to which the namespace extension item maps (The mapped location is returned from the GetDisplayNameEx method when the parameter is NSEDNF_ForParsing).

In case of a Save dialog, you have to use a background process to monitor the contents of the mapped location. When a file is created/deleted or modified in the mapped location ( or its sub-folder), you must synchronize your source (database/FTP location/etc) with the changes. A background process is required for this because the file is saved directly by the application - Windows does not have any way of exposing the saved data to the namespace extension. Using a background watcher process is the only to monitor when files are created/deleted or modified.
Back to top
Display posts from previous:   
Forum Index -> EZNamespaceExtensionsMFC All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group