Discussion:
How can I implement What's This help for Toolbar Items and Menu It
(too old to reply)
Cameron_C
2008-11-11 16:34:28 UTC
Permalink
Hello there,
I have been able to add F1 help for my Dialog Box items, and I am now trying
to do something similar for the Toolbar and Menu items.
My application is an MFC application. Visual Studio 2008 Pro. Maybe this is
more of an MFC question? I am not sure where the lines get drawn.

Is there any reference material for this? Anything I have found searching
the net is pretty dated. I have ordered an OLD book relating to HTMLHELP, so
perhaps it will contain the information I am looking for.

I suppose it is possible that you simply cannot offer help for the toolbar
or menus?

Could someone point me in the right direction here?

Thanks.
David Webber
2008-11-11 17:05:53 UTC
Permalink
Post by Cameron_C
Hello there,
I have been able to add F1 help for my Dialog Box items, and I am now trying
to do something similar for the Toolbar and Menu items.
My application is an MFC application. Visual Studio 2008 Pro. Maybe this is
more of an MFC question? I am not sure where the lines get drawn.
Is there any reference material for this? Anything I have found searching
the net is pretty dated. I have ordered an OLD book relating to HTMLHELP, so
perhaps it will contain the information I am looking for.
I suppose it is possible that you simply cannot offer help for the toolbar
or menus?
Could someone point me in the right direction here?
The MFC new application wizard used to generate you a toolbar button with a
question mark and arrow (also activated by Shift+F1). Using this turns the
mouse cursor into a question mark and arrow. With it in that state,
clicking on a toolbar button or menu button (or pressing a shortcut key) is
designed to bring up help for the command in question.

The MFC framework does this by adding a constant to the command ID (is it
0x20000? I'd have to look it up but it's a different one from the dialogues)
and then you use the aliases (.ali) file to define a correspondence between
this number (usually defined with #define in a .hm file) and an HTML help
topic on the command.

So yes it is an intermediate question: you need to know what MFC does and
then what aliases to have in your help project.

Do you have the question mark and arrow toolbar button? My impression is
that this is one of those ideas which Microsoft might think is old
fashioned, but I like it. OTOH the MFC app wizard has evolved rather
slower than Microsoft's fancy new interface ideas, so it may still be there
:-)

Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
Cameron_C
2008-11-13 02:58:13 UTC
Permalink
Hello David,
Yes I have the "What's This" icon available. And it works fine for Dialog
Boxes.
But I can't seem to make sence of the Menu Items. And I can't get it to work
for CFormView.

Idid the aliasing by mapping the HIDC_ defined values from the .hm file to a
new .h file for the HTML Help project.
I assumed (probably incorrectly) that I could use any value I wanteed for
the aliases.
They all work fine for the Dialog Boxes. I implemented these as text pop ups
from a .txt file.
I know it is quite a stretch, but I presumed that this would also work for
the CFormview items, the Menu items, and the toolbar items.

In another day or so, I will simply remove the "What's This" help from my
application altogether! :-)
Post by David Webber
Post by Cameron_C
Hello there,
I have been able to add F1 help for my Dialog Box items, and I am now trying
to do something similar for the Toolbar and Menu items.
My application is an MFC application. Visual Studio 2008 Pro. Maybe this is
more of an MFC question? I am not sure where the lines get drawn.
Is there any reference material for this? Anything I have found searching
the net is pretty dated. I have ordered an OLD book relating to HTMLHELP, so
perhaps it will contain the information I am looking for.
I suppose it is possible that you simply cannot offer help for the toolbar
or menus?
Could someone point me in the right direction here?
The MFC new application wizard used to generate you a toolbar button with a
question mark and arrow (also activated by Shift+F1). Using this turns the
mouse cursor into a question mark and arrow. With it in that state,
clicking on a toolbar button or menu button (or pressing a shortcut key) is
designed to bring up help for the command in question.
The MFC framework does this by adding a constant to the command ID (is it
0x20000? I'd have to look it up but it's a different one from the dialogues)
and then you use the aliases (.ali) file to define a correspondence between
this number (usually defined with #define in a .hm file) and an HTML help
topic on the command.
So yes it is an intermediate question: you need to know what MFC does and
then what aliases to have in your help project.
Do you have the question mark and arrow toolbar button? My impression is
that this is one of those ideas which Microsoft might think is old
fashioned, but I like it. OTOH the MFC app wizard has evolved rather
slower than Microsoft's fancy new interface ideas, so it may still be there
:-)
Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
Loading...