I am performing maintenance on an outdated MFC application. We need to disable the "Print" button in the "Help" dialog box. The printer is not connected to the system, and the application crashes if the user clicks the Print button in the help window.
This code simply uses the standard method HtmlHelpAto invoke the Windows help dialog:
void CNiftyView::OnHelp()
{
CString csHelpFile;
csHelpFile.Format( "%s/NiftyHelp.chm", NiftyDoc::GetHelpPath() );
::HtmlHelpA( m_hWnd, csHelpFile, HH_HELP_CONTEXT, IDH_NIFTY_SECTION );
}
I found information that we can suppress the Print button with some code in the HTML help stylesheet ( http://www.sagehill.net/docbookxsl/HtmlHelp.html ). But this will require recompiling the help file, and I would prefer not to. I also found some information saying that you can customize the HTML help viewer by manipulating each structure of the HH_WINTYPE panel, but no information on how you actually do this ( http://msdn.microsoft.com/en -us / library / ms524435% 28v = vs. 85% 29.aspx ).
Is there a way to disable this Print button in the HTML help viewer programmatically?
source
share