I was trying to add a Help button onto my Open, Save, Find and Print common dialogs in Delphi 2009.
I thought the proper way to do it was to set frShowHelp to true in the Options property of the dialog:
But when I do, the dialog comes up the same as without the option, e.g.:
I'm expecting to see a Help button below the Cancel button, but it's not there.
I'm developing under Windows Vista. Did Microsoft eliminate the capability of adding the Help button to their common dialogs, or am I doing something wrong?
Find dialog
Include
frShowHelpinOptionsand the help button will appear. It's very hard to understand why that would not be working for you.Print dialog
Include
poHelpinOptionsand the help button will appear.File dialogs
Now these did change when Vista was introduced. The new dialogs do not have, built-in, the capability to show a help button.
You can always revert to the legacy XP dialogs by setting
Dialogs.UseLatestCommonDialogstoFalse. If you do that you can setofShowHelp,HelpContextetc.You should prefer to use the new dialogs if they available though. For those dialogs you need to use
IFileDialogCustomizeto add a help button.In Delphi, for Vista and up, you would need to use
TFileOpenDialogorTFileSaveDialogdirectly rather thanTOpenDialogandTSaveDialog. You would create the dialog object and then request theIFileDialogCustomizeinterface from theDialogproperty. The best place to do this is in theDoExecuteevent of the dialog control.