Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Dialog Controls    [ Add a report in this area ]  
Report #:  79725   Status: Need Feedback
Help function in common dialogs broken
Project:  Delphi Build #:  12.0.3420.21218
Version:    12.3 Submitted By:   Stefan Hagel
Report Type:  Basic functionality failure Date Reported:  11/22/2009 11:43:57 PM
Severity:    Commonly encountered problem Last Updated: 1/9/2010 5:58:54 PM
Platform:    All platforms Internal Tracking #:  
Resolution: Need More Info (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
TCommonDialog descendants (TOpenDialog, TSaveDialog...) with ofShowHelp included in the Options property correctly display a Help button, but it does not invoke anything (nor does F1 work).

The problem seems to be that

    Application.HookMainWindow(MessageHook);

is not called in TCommonDialog.TaskModalDialog as it was in versions prior to Delphi 2009.
Steps to Reproduce:
Put a TOpenDialog on your form, include ofShowHelp in the Options, assign it a valid HelpContext (Help file set for application and appropriate Viewer assigned), invoke its Execute method, click on its Help button - nothing happens.
Workarounds
Add

    Application.HookMainWindow(MessageHook);

right before the first "asm" statement in

    Application.HookMainWindow(MessageHook);

in the Dialogs unit (line 1422).

I don't know whether this has unwanted side effects, though - was there some reason to cut the hooking here?
Attachment
None
Comments

Tomohiro Takahashi at 11/24/2009 5:53:18 PM -
Could you please attach sample project and files to reproduce your issue?

Server Response from: ETNACODE01