
File Open Dialog - Open button Enable&Disable
Quote:
> In my MFC project, I am using Windows' FileOpen dialog.
> My requirement is that the "Open" button should be disabled when no files
> are selected in the file open dialog,
> and when a file iis selected, the "Open" button should become enabled.
> How can I do this?
I'd post again in an MFC group to find out what your option are.
At the level of the API you can call GetOpenFileName() and specify a hook
procedure. The hook procedure should (I've never tried) allow you to enable
and disable controls on the dialog. Read the docs for the description of the
OFNHookProcOldStyle() function that you'll have to develop. Note carefully
the restrictions and the distinction between old-style and Explorer style
hooks.
Regards,
Will