Board index » delphi » Help Integration Problem and TMainMenu

Help Integration Problem and TMainMenu

Hy

    When you press F1 key when having menu open, windows sends WM_HELP
message to that window. The result is that lParam points to the HELPINFO
structure (see win32.hlp). Write a messagehandler to handle WM_HELP message
and respont to it the way you want and override the original message
processing. I hope this'll help.

Tomaz

Quote
Mark Eason wrote in message <34e03c64.97199...@news.ibi.co.za>...
>Hi

>I have a fairly simple problem, but have yet to figure it out.  I have
>a TMainMenu and I have assigned the appropriate filename to
>Application.HelpFile.  When I push F1 from the menu, WinHelp gives an
>error saying it can't find the topic.  F1 seems to be built-in to
>TMainMenu.  Do I have to override TMainMenu with the form's OnKeyDown
>event to catch F1 before it gets to TMainMenu?  I want the Help
>Contents Page to come up when I push F1.

>Please let me know if there's a simple solution to this...
>Thanks.

>Mark.

 

Re:Help Integration Problem and TMainMenu


Hi

I have a fairly simple problem, but have yet to figure it out.  I have
a TMainMenu and I have assigned the appropriate filename to
Application.HelpFile.  When I push F1 from the menu, WinHelp gives an
error saying it can't find the topic.  F1 seems to be built-in to
TMainMenu.  Do I have to override TMainMenu with the form's OnKeyDown
event to catch F1 before it gets to TMainMenu?  I want the Help
Contents Page to come up when I push F1.

Please let me know if there's a simple solution to this...
Thanks.

Mark.

Re:Help Integration Problem and TMainMenu


Quote
On Tue, 10 Feb 1998 11:51:40 GMT, mea...@usa.net (Mark Eason) wrote:
>Hi

>I have a fairly simple problem, but have yet to figure it out.  I have
>a TMainMenu and I have assigned the appropriate filename to
>Application.HelpFile.  When I push F1 from the menu, WinHelp gives an
>error saying it can't find the topic.  F1 seems to be built-in to
>TMainMenu.  Do I have to override TMainMenu with the form's OnKeyDown
>event to catch F1 before it gets to TMainMenu?  I want the Help
>Contents Page to come up when I push F1.

>Please let me know if there's a simple solution to this...
>Thanks.

>Mark.

Well, as I understand it, Delphi's approach is that, if the user
presses F1 when a menu item has the focus, it is the contextual help
for that menu item that should be displayed. This is why each menu
item has a HelpContext property... You should display the help
contents based on some event you define (menu item, help button...)

Pierre Gemis

Other Threads