Link to home
Start Free TrialLog in
Avatar of sternocera
sternocera

asked on

Context sensitive help in MFC app

Hello,

I'm developing an MFC application that I'd like to provide context sensitive help for. Does MFC provide such a facility? I think that .chm files are deprecated in Windows vista - something called MAML is used instead.

My questions is, what is the modern, preferred way to create context sensitive help within MFC?

Regards,
Sternocera
Avatar of itsmeandnobodyelse
itsmeandnobodyelse
Flag of Germany image

>>>> Does MFC provide such a facility?
Yes. If you create an MFC app by wizard, one of the default options you have is 'context sensitive help' switched on. It provides a menu entry in the help menu where the mouse cursor turns to an arrow with question mark upon top and where moving it to a control it could show help text if supplied by your application. It uses both the IDD of the dialog form and the IDC of the control to identify the text provided.

>>>> I think that .chm files are deprecated in Windows vista
Probably. Two points: Is your MFC app for Vista only? If yes you might consider changing to Windows Forms and .NET what surely has a more Vista like look-and-feel. Second, instead of chm you could switch to HTML help. There are a lot of tools which do both. Yoe easily can find them by googling for 'MFC help compiler HTML' or similar.
Avatar of sternocera
sternocera

ASKER

>>>> If yes you might consider changing to Windows Forms and .NET what surely has a more Vista like look-and-feel.

My MFC app has a perfect Vista look and feel (All the more so because of the Visual studio 2008 extensions). Changing over to windows forms or .NET isn't practical anyway. I have a large MFC codebase here.

.chm *is* HTML Help.

Since I did not originally specify that context sensitive help should be used, how can I retrofit chm help into my application?

Regards,
Sternocera

ASKER CERTIFIED SOLUTION
Avatar of itsmeandnobodyelse
itsmeandnobodyelse
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
itsmeandnobodyelse,

Thanks for that.

How can I actually invoke Html help from within MFC? I see that html workshop has a small C API bundled with it. I can spawn HTML help that way. However, I'd prefer to do so using CWnd::HtmlHelp. I cannot see to figure out what arguments I'm expected to supply to this function to get it to open a specific HTML help file.

Regards,
Sternocera
SOLUTION
Avatar of help-info
help-info
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have succesfully called context sensitive help through CWnd::HtmlHelp. This is enough of a starting point for me. Plenty of current Apps use HTML help, so I'm happy enough to use it for the time being,

Thanks,
Sternocera