If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Overriding the Open button handler of CFileDialog

Hi,

I have subclassed CFileDialog.
I need to select both file and folder on certain case only.
Suppose I have a folder selected and it is containing desired file type.
Then in such situation, On clicking open button will not open the selected folder. But just close the CFileDialog with IDOK.

For doing this I need to provide my own implementation for Open button handler. I am not getting how I can do this.

Re: Overriding the Open button handler of CFileDialog

sorry or unclear information.

I have added "Select All" button on CFileDialog, which select all images file and subfolder containing images on clicking it. So currently I have both files and folder selected. So on clicking the open, opens one of the selected subfolder.

I've had problems before on Windows 7 with a class derived from CFileDialog that called GetParent() in some overridden function. I can't recall exactly, but the problem was that GetParent() returned NULL. The fix was to store the parent's HWND as a member variable in OnInitDialog and then later use the member variable instead of calling GetParent().

Cheers, D Drmmr

Please put [code][/code] tags around your code to preserve indentation and make it more readable.

As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.