Announcement

Collapse
No announcement yet.

HelpMaker Topmost?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HelpMaker Topmost?

    Anyone know of a way to get Helpmaker .chm file to stay on top of my
    maindialog? If user moves mouse pointer over to maindialog which is
    larger than Helpmaker file, Helpmaker file goes to the background?

    Thanks,

    Brent

    P.S. Looks like Power Basic Help file has same problem?
    Last edited by BRENT GARDNER; 13 Oct 2007, 06:23 AM.

  • #2
    From the vizacc.com/nntp/ :

    The only workaround so far that I've seen is to use Help On-Top Manager from this link: http://frogleg.mvps.org/helptechnolo.../prjontop.html

    Once the computer is rebooted after installing it, the icon in the task bar area will allow the user to select an open help window to keep on top. It supports the following help formats; WinHelp, WinHelp 2000, HTML Help, MSDN, Hypertext Development Kit (HDK), and JavaHelp windows.
    thanks,
    Ms. Sally
    Pricelessware Freeware Hall of Fame Inductee 2007.
    Best Business Application Award 2003, 2004.
    Microsoft Wugnet Shareware Hall of Fame Inductee 2003.
    http://www.vizacc.com/

    Comment


    • #3
      In my apps, if I call 'help' (gHELPfile) referencing my main dialog handle (gMANhndl), the 'help' is always on top of it:

      'always on top
      HtmlHelp(gMANhndl, gHELPfile, %HH_HELP_CONTEXT, gProc_Flag(0))

      'not
      HtmlHelp(GetDesktopWindow(), gHELPfile, %HH_HELP_CONTEXT, gProc_Flag(0))

      Comment


      • #4
        If using HTML help....the HTML Help Workshop Help doth sayeth...
        HTML Help API overview
        The HTML Help application programming interface (API) enables a Windows program to create a help window that displays a help topic. The Windows program has complete control over the type, style, and position of the help window.
        Tells me you should be able to get the hWndHelp and set ExStyle %WS_EX_TOPMOST.
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Bill,

          I have been using:
          Code:
                  ExecuteHelp(0, "Files\_tmphhp\addresswinhlp.chm", sSubject)
          That was posted in the forum.

          You posted:
          Code:
          'always on top
          HtmlHelp(gMANhndl, gHELPfile, %HH_HELP_CONTEXT, gProc_Flag(0))
          How do you get "gMANhndl"?

          Thanks

          Brent

          Comment


          • #6
            You might look at http://www.powerbasic.com/support/pb...416#post105416.

            gMANhndl is the handle of the parent window for which you want the help window to be on top of (topmost). If you have a dialog that you want the help window to display on top of then gMANhndl is the dialog handle, either returned from your DIALOG NEW statement or the CBHNDL in a callback function.
            Sincerely,

            Steve Rossell
            PowerBASIC Staff

            Comment


            • #7
              Steve,

              Sorry, I meant the handle of the htmlhelp file gHELPfile.
              I do not like to have to use MSGBOX, but is only way I can figure to keep htmlhelp on top
              and have maindialog disabled is:
              Code:
              CASE %WM_CONTEXTMENU  ' Right click on button to see Helpfile index
                 IF CtlID > 0 THEN
                     ' Make HtmlHelpA topmost
                     ExecuteHelp(0, "Files\_tmphhp\mybuttonhlp.chm", sSubject) 'htmlhelp")
                     ' To keep pop up dialog on top.
                     ' This msgbox stays underneath mybuttonhlp.chm
                     yResult = MSGBOX("First Close"+$CRLF+$CRLF+"mybuttonhlp Browser... "+$CRLF+$CRLF _
                     +"before clicking or pressing [OK] button", %MB_OK OR %MB_TASKMODAL)
                     IF yResult = %IDOK THEN
                      ' Nothing
                     END IF
                 END IF 
                 ' Initialize variables
                 CtlID = 0: KEYP = 0
              Hope someone comes up with better solution.

              Thanks,

              Brent
              Last edited by BRENT GARDNER; 28 Nov 2007, 02:34 PM. Reason: format

              Comment


              • #8
                gHELPfile is just the help file name (and path).
                maybe "myhelpfile.chm". It's not a handle.

                Comment


                • #9

                  The HTML Help API supports a set of commands (uCommand values) that enable you to access functionality programmatically
                  ....
                  Code:
                  Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
                     (ByVal hwndCaller As Long, _
                     ByVal pszFile As String, _
                     ByVal uCommand As Long, _
                     dwData As Any) As Long
                  ....
                  HH_GET_WIN_HANDLE Command
                  Returns the handle (hwnd) of a specified window type.

                  pszFile Specifies the name of the compiled help (.chm) file in which the window type is
                  defined.
                  dwData Specifies the name of the window type whose handle you want to return.

                  Example:
                  Code:
                  HtmlHelp(
                           hwndCaller,
                           "c:\\MyHelpFile.chm,
                           HH_GET_WIN_HANDLE,
                           (DWORD) "MyWindowType") ;
                  MCM
                  Michael Mattias
                  Tal Systems Inc. (retired)
                  Racine WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment


                  • #10
                    Use:

                    Code:
                    ExecuteHelp(CbHndl, [etc]
                    ..to specify a parent for the help file.
                    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

                    Comment


                    • #11
                      Kev,

                      Cool! Keeps helpfile on top without a msgbox. This is probably the way
                      it should work(on top but does not disable maindialog). With my program, I worry that someone will inadvertently click on one of the
                      buttons that are not covered and delete a record. So, for now, I have
                      reverted back to Execute(0, etc...) and have a msgbox to keep maindialog disabled while helpfile is open. I see that you use hParent,
                      but doesn't disable maindialog. I guess it is because helpfile is a modeless dialog?

                      Thanks for your help,

                      Brent

                      Comment


                      • #12
                        Brent,

                        Yes, the windows help system is modeless (independant of the parent), it was not designed for modal use. I believe the parent handle is simply used to let Windows know where to keep the focus and also allows you to close the help file with your application.
                        kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

                        Comment


                        • #13
                          I may have the wrong end of the stick here but will this not do the job

                          Code:
                          CASE %WM_CONTEXTMENU  ' Right click on button to see Helpfile index
                             IF CtlID > 0 THEN
                               Dialog Disable CbHndl
                               ExecuteHelp(CbHndl, "Files\_tmphhp\mybuttonhlp.chm", sSubject) 'htmlhelp")
                               Dialog Enable CbHndl
                             END IF 
                             ' Initialize variables
                             CtlID = 0: KEYP = 0

                          Comment


                          • #14
                            No because the help system is modeless, the DIALOG ENABLE will be executed right after the help file is shown. There are probably ways around this but I am not one to encourage nonstandard behaviour I mean what if the user wants to consult the help while using the app, it can't be done with a modal help file.
                            kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

                            Comment


                            • #15
                              > No because the help system is modeless, the DIALOG ENABLE will be executed right after the help file is shown.

                              Of course.

                              Comment

                              Working...
                              X