This content has been marked as final. Show 8 replies
I've never seen a closed HTMLHelp file not give focus back to the calling program. What does get focus?
When you close the app the help closes. This is sometimes annoying. For example, I have a troubleshooting script in my help file that has the user close the program - poof! there go the instructions. But is usually something we live with. This is because in the Windows world, windows belong to the program that created them. The only way I know to avoid this is to have hh.exe open the help. This is the program that opens the help window when you click on it in Windows Explorer. It can be called by the app instead of using the HtmlHelp API, but is probably not worth doing. It will make all the context sensitive help more difficult to implement.
When I close the Help file, nothing has focus. I agree that it can be annoying that the Help file closes when the app does. I'm not looking for that, but I would live with it.
So is there a way to tell the Robo-created Help file to give focus back to the "host" app upon closing?
Thanks for your response, John.
I believe that can only be accomplished in the app, by the developers. That is, instructions to open and close can only go in one direction, from app to help.
But when the Help file is open, that's the app that's in control of giving focus back to the original app. At least, the developers tell me it's the responsibility of the Help file.
Hi, word wiz,
I think there are two possibilities here.
1) In their context help calls, your developers may not be passing to your .chm file the "handle" of the window from which help is called. The consequence of this is that the help file is not owned by the window, and as a result focus is not returned to the window when the help file is closed. You can read more about this here:
//Begin to support previous HHActiveX invoking
//End to support previous HHActiveX invoking
The developers are going to try "passing the handle." I'll let you know how it goes.
Many thanks for your help.. jd
Have you had any further progress with this? I have the same problem (see this thread: My version of the RoboHelp focus problem )
The thing I find most irritating is that the behavior I see is IDENTICAL whether a CHM file is called from my app or directly via double-click from Windows Explorer. A CHM file developed with RoboHelp does NOT return focus in either case. A CHM file from another source returns the focus no matter what.
AND... The help file for RoboHelp itself DOES NOT return focus to RoboHelp! ! !
Thanks for the help!