I have a simple MFC application, where I want to customize the Help Button functions provided by the application. When clicking on F1 or Help button, it opens up a Windows help support page by default. How can I disable this default behavior and have it show nothing?
By show nothing, I mean not show the default windows support page. Ideally, when I should press F1 or click on help button, it should open no windows.
In the MainFrame.cpp, declare the MessageMap:
Then, call the
OnCommandHelp()
that is a message handler which will be used to process F1 when in disabled mode.Here, WinHelp() is called which launches Windows Help (Winhelp.exe) and passes additional data that indicates the nature of the help requested by the application.
HELP_QUIT
as one of its parameters, closes the default windows help support page requested.Also, don't forget to declare the
OnCommandHelp()
in MainFrame.h :