Disabling change folder in CFileDialog in MFC at certain case
-
05-07-2021 - |
Pergunta
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
Solução
I overridden the default handler for IDOK(ie Open button). Same as explained in the article in the link below.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow