I am trying to overload the CFiledialog class to add functionalities as per my need. I am not getting the solution for restricting user from changing folder in certain situation as mentioned below.
When user is attempting to change folder.
- I need to check if there any folder is selected or not?
- If selected I need to check, if any of the selected folder is containing the desired file or not?
- If the selected folder is having the desired file, then in such case I want to disable the change folder functionality.
I have tried to override virtual void OnFolderChange(); function, but call to this function comes after the folder is already changed.
Any suggestion will be greatly appreciated!
Thanks
I overridden the default handler for IDOK(ie Open button). Same as explained in the article in the link below.
http://www.codeguru.com/cpp/controls/toolbar/miscellaneous/article.php/c5497/Adding-Toolbar-button-in-CFileDialog.htm