MFC open dialog enhancement
-
Hey guys I am using MFC -> File Open dialog box, which works fine. I have noticed other applications use a different style of dialog box wich has quick buttons on the left that brings the navigation tree in the open dialog box to those locations. For example in Microsft Word, when you go File -> Open, there are 5 buttons on the left (History, My Documents, Desktop, Favorites, My Network places) I would also like the same type of "File Open" dialog box. How do I impliment this. I have searched the MSDN documentation and have come up with nothing. Any help appreciated George W Software Developer www.zsystems.ca
-
Hey guys I am using MFC -> File Open dialog box, which works fine. I have noticed other applications use a different style of dialog box wich has quick buttons on the left that brings the navigation tree in the open dialog box to those locations. For example in Microsft Word, when you go File -> Open, there are 5 buttons on the left (History, My Documents, Desktop, Favorites, My Network places) I would also like the same type of "File Open" dialog box. How do I impliment this. I have searched the MSDN documentation and have come up with nothing. Any help appreciated George W Software Developer www.zsystems.ca
It's called the "Places" bar, and comes with a new version of commdlg.dll. So instead of using CFileDialog, you'll have to use GetOpenFileName(). If the OPENFILENAME structure uses a hook procedure (or the OFN_ENABLETEMPLATE is set), you will get the old-style dialog; otherwise, you will get the one with the "Places" bar. This explains why MFC apps get the old dialog—because CFileDialog, like all MFC common dialogs, uses a hook procedure. Search MSDN, or the Web, for details.
-
It's called the "Places" bar, and comes with a new version of commdlg.dll. So instead of using CFileDialog, you'll have to use GetOpenFileName(). If the OPENFILENAME structure uses a hook procedure (or the OFN_ENABLETEMPLATE is set), you will get the old-style dialog; otherwise, you will get the one with the "Places" bar. This explains why MFC apps get the old dialog—because CFileDialog, like all MFC common dialogs, uses a hook procedure. Search MSDN, or the Web, for details.
Thanks for help I will look into this. George W Software Developer www.zsystems.ca