Hi All,
I am launching a .chm file for Help using HtmlHelp().Now I
want the Help file to be closed whenever the dialog is closed by
pressing OK & CANCEL buttons.
So I am closing the Help file using the following code in both OnOk() &
OnCancel() functions-
if((NULL != m_hHelpWnd) && IsWindow(m_hHelpWnd))
{
HtmlHelp(NULL,NULL,HH_CLOSE_ALL,0);
}
m_hHelpWnd is the handle of the help file.
But the issue is,when the Help file is open,if I press the buttons it
is closing the help file, but if the Help file is not launched at all
and if I press Ok or cancel buttons there is a time lag.
Any other ideas to close the help file explicitly so that there will
not be any delay when Help is not at all invoked.
Note: I ve already used ::SendMessage(hHelpWnd, WM_CLOSE, 0, 0);
.....it is giving rise to some crashes.
Thanks in advance