문제

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top