ofnhookproc

Customizing Win32's Save File Dialog

旧时模样 提交于 2019-12-30 12:51:11
问题 I am trying to save a file using GetSaveFileName and want to have a couple extra popups at the bottom of my save file dialog to allow the user to specify further options. I am trying to follow the MSDN documentation (specifically the Explorer-style customization) on the subject but can't seem to get my custom item to appear. I believe I set up the OPENFILENAME struct properly as I'm getting calls into my OFNHookProc . As far as I know it is during the WM_INITDIALOG message that I should be

OFN_ENABLEHOOK modifies the look of GetOpenFileName()

拥有回忆 提交于 2019-12-07 21:47:30
问题 Why does adding a hook procedure (with the OFN_ENABLEHOOK and OFN_EXPLORER flags) to GetOpenFileName() causes a different dialog to be displayed in Windows 7, if the hook procedure just returns FALSE without doing anything? Update: Apparently getting the Vista/Windows 7 look with a hook is impossible... can someone confirm or counter this? 回答1: The reason for this is that MS completely re-organised the file dialogs for Vista. Hooks are used to extend a file dialog by supplying a resource file

OFN_ENABLEHOOK modifies the look of GetOpenFileName()

佐手、 提交于 2019-12-06 07:13:14
Why does adding a hook procedure (with the OFN_ENABLEHOOK and OFN_EXPLORER flags) to GetOpenFileName() causes a different dialog to be displayed in Windows 7, if the hook procedure just returns FALSE without doing anything? Update: Apparently getting the Vista/Windows 7 look with a hook is impossible... can someone confirm or counter this? The reason for this is that MS completely re-organised the file dialogs for Vista. Hooks are used to extend a file dialog by supplying a resource file. This gives the customiser too much power. They can all too easily modify standard elements of the dialog