I now have the Windows Help Dialog launching and typing into my Application. (Still a little work to do on the Help file, but it works quite well).
My only remaining problem is that after the WinHelp is called, I don't seem to be able to set the FOCUS back to the control it was on. (Unless I put a MSGBOX after the WinHelp call). I *think* its due to the fact that my application is no longer the Top-Most Window (the Help Dialog is util its closed). Anybody have a solution to this little quirk?
Thanks,
Ray
*** The Code I'm Using looks like this ***
Code:
CASE %WM_HELP LOCAL lphi AS HELPINFO PTR, a$ lphi = CBLPARAM HlpDlg = CBHNDL HlpControl = @lphi.iCtrlId IF HlpControl THEN CONTROL GET TEXT CBHNDL, HlpControl TO a$ IF HlpControl>1 AND HlpControl<60000 THEN LOCAL hwnd AS LONG LOCAL lpHelpFile AS ASCIIZ * 12 LOCAL dwData AS LONG hwnd = ghDlg lpHelpFile = "pabop.hlp" dwData = HlpControl WinHelp hwnd, lpHelpFile, %HELP_CONTEXT, dwData ' MSGBOX "HELP!!! - you asked for help on control ID#" & STR$(@lphi.iCtrlId) & $CRLF & _ ' "The control text = """ & a$ & """",, "Context Help" END IF CONTROL SET FOCUS HlpDlg, HlpControl
If I allow the MSGBOX to run the 'CONTROL SET FOCUS' works, but w/o the MSGBOX the form reverts back to 1st field/control on the screen. (Its really annoying).
Thanks Again,
Ray
------------------
Leave a comment: