Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

D7 and Help router

Status
Not open for further replies.

sggaunt

Programmer
Jul 4, 2001
8,620
GB
I use the EHS Helprouter component to implement HTML help calls, after upgrading from D4 to D7 I noticed context sensitive help wasnt working anymore, and managed to get this fix from EHS they had changed the implementaion for D7

from ths
Code:
helprouter1.HelpContext((sender as tspeedbutton).tag);

to
Code:
Application.HelpCommand(HELP_CONTEXT, (sender as tspeedbutton).tag);

I just (after some time) noticed that context help calls from Message Dialogs are not working any more!
I assume its due to the same problem but cannot see a way round it.
Other than a work around using somthing like the line above if the dialog returns MrHelp.




Steve: Delphi a feersum engin indeed.
 
I realised later that my top of head solution wont work anyway, because message dialogs are modal.

buho: I will check out your link, otherwise its down to changing all my MD's with help buttons to custom dialogs, several of them!!



Steve: Delphi a feersum engin indeed.
 
Further digging has revealed that there is no fix for this (its all down to how D6 onwards intercepts help calls).

You can sort of get around it by adding a 'No to all' button re captioning it, and testing for MrNoToAll. But the dialog still has to close, so there's not much point.

Do you think Vista will support .HLP ?




Steve: Delphi a feersum engin indeed.
 
No idea about Vista.

If memory serves, in the helpware.net link you have a section explaining what and why they changed from compiler version to compiler version, may be you can lookup your problem there and see if it is solved or "workarounded".

In your way of thinking, I never use stock message dialogs, I have my own dialogs, so I can tweak anything as needed.

IMO, developing a MD toolbox is well applied time. Not only I can quickly fire things like "ShowError", "ShowWarning", "ShowInfo", "ShowYesNoQuery" with the due icons and buttons, I even can adapt to compiler and OS changes.

buho (A).
 
Update:
Taking Buho's advice I have made constructed my own version of messagedlg.
To be honest the code is a bit 'messy' so I wont be posting it here, unless I clean things up a bit, but it works fine.
Basically it's a form with methods that construct the required buttons, Format the text, put the correct icon on.
The icons are in user32.dll in XP's system32 folder BTW.
To use I call msgdlg function which shows its own form modally, Help buttons pick up the context from the tag field and call context help.


Steve: Delphi a feersum engin indeed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top