Overriding WinHelp is not working in .NET

D

Devender Khari

Hi Friends,

I have an application which was developed with Visual C++ 6.0 and MFC. In
the application, the CWinApp::WinHelp method was overridden to support
context sensitive help (F1 help). After upgrading to Visual Studio .Net
2003, the help links are not working any longer. The overridden WinHelp
method in my CWinApp derived class no longer gets called when I press F1.

On some investigation within the framework code, I found that another
function CWinApp::WinHelpInternal gets called. If I just call this method
from my overridden WinHelp method then things work fine. Is this a change
made to the CWinApp class in the latest
version of MFC and is it documented somewhere? I could not find any
reference to it on the MSDN site or in the online docs.
Will the workaround I have done has any impact which I'm not aware of?

Thanks for your help.

Regards,
Devender...
 
I

ismailp

It's been years last time I used MFC. So, I am quite off from MFC case.

The WM_HELP window message is sent to the main window of the
application. If you can handle this message, you can either call your
method with proper parameters, or, display help from within the WM_HELP
handler. Besides, I guess MFC does this on your behalf - it handles
this message and calls WinHelpInternal method.

Ismail
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top