When using VS2008 and MFC I automatically get the Vista look on my file open dialogs. But when I have added a template this is not included :-( I can then retrieve the GetIFileDialogCustomize interface and add controls. And this also works for me. * How can I better control the placement of the controls? E.g. if I wan to add a large edit field called Comments, I cannot control the size of it? My other question is about the events. * Is there an easy way to overwrite the control events in MFC CFileDialog? In the MFC implementation I can see the the events are implemented, but how do I get access or overwrites then. E.g. the OnButtonClicked?
Re Control placement: Use the dialog editor and change the size. To do that at run time (and unusual requirement), get a CWnd* to the control of interest, then use the MoveWindow() function.
Re Event Button Handlers: Use the Dialog Editor. Select the the button in the dialog. Press Ctrl+W to bring up the MFC ClassWizard. By defautl, the first time you do this for a button, it will add a member function for the OnClick event.
Is it possible to make a CFileOpen dialog using the resource editor, and the class wizard?
I try to inherit from CFileDialog, but I cannot get access to the IFileDialogControlEvents interface and methods since it is implemented and overwritten in the CFileDialog class.
I apologize. In haste, I misread the question. I have not worked with the IFileDialog interface; it is Vista-specific and most of my clients are not there yet.
I have customized the dialog that results from using a CFileDialog. It involves locating the child windows (typically by knowing the control IDs) and sending messages to them. It appears that the IFileDialog interface is designed to make all of that unnecessary (so the code will not break if the common dialog changes).