Loading ...
Sorry, an error occurred while loading the content.
 

Re: [libertybasic] Many lines Normal Tool Tip

Expand Messages
  • Stefan Pendl
    ... This is not a long function, this is how it is done on the operating system side. You must spend some time reading the MSDN section about tool tips,
    Message 1 of 6 , Aug 3, 2012
      Am 04.08.2012 06:47, schrieb Sarmed:
      >
      >
      > Dear Sirs,
      >
      > Is there a way to change normal tool tip into many lines without using the long (CreateTooltip) balloon function?
      >

      This is not a long function, this is how it is done on the operating
      system side.

      You must spend some time reading the MSDN section about tool tips,
      without that you won't understand them.

      In addition you will have to understand how managing controls using the
      Windows API works, which is how bare C does things.

      You will find a good tutorial about Windows GUI programming at
      http://www.winprog.org/tutorial/

      To change the width of the tool tip, which results in forcing the tool
      tip to display multiple lines, you use the TTM_SETMAXTIPWIDTH message at
      http://msdn.microsoft.com/en-us/library/bb760246%28VS.85%29.aspx

      > How can we keep the tip display as long as the pointer over the control (Richard do something like that)?
      >

      You use the tracking tool tip, where I have posted an example.

      It should be fairly easy to use the GetFocus API function to determine
      the widget that is currently active.


      --
      Stefan Pendl
      http://stefanpendl.runbasichosting.com/

      LB 4.04 Pro ... http://www.libertybasic.com/assist.html
      LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

      LB Community Wiki .............. http://basic.wikispaces.com/
      LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
      LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

      Books at http://www.lulu.com/ and http://www.amazon.com/
      Alyce Watson ... APIs for Liberty BASIC
      Carl Gundel .... Beginning Programming with Liberty BASIC

      Windows 7 Home Premium 64-bit SP1
      AMD Turion X2 RM-70 2GHz, 4GB RAM
    • Sarmed N.
      Learning C or C++ language. Then learning Win 32 API. Then learning translating API functions to LIBERTY BASIC. To know how to delay the display time of tool
      Message 2 of 6 , Aug 4, 2012
        Learning C or C++ language.

        Then learning Win 32 API.

        Then learning translating API functions to LIBERTY BASIC.

        To know how to delay the display time of tool tip?


        Sir, If I going to use your example, I know how to control the width of tool tip and how to change the balloon into normal tool tip. Only I need how to delay the display of long tool tip, to give the user a plenty time to read it.
        Please don't face me with Micro Soft MSDN.


        Best Regards
        SARMED

         


        ________________________________
        From: Stefan Pendl <pendl2megabit@...>
        To: libertybasic@yahoogroups.com
        Sent: Saturday, August 4, 2012 8:05 AM
        Subject: Re: [libertybasic] Many lines Normal Tool Tip


         
        Am 04.08.2012 06:47, schrieb Sarmed:
        >
        >
        > Dear Sirs,
        >
        > Is there a way to change normal tool tip into many lines without using the long (CreateTooltip) balloon function?
        >

        This is not a long function, this is how it is done on the operating
        system side.

        You must spend some time reading the MSDN section about tool tips,
        without that you won't understand them.

        In addition you will have to understand how managing controls using the
        Windows API works, which is how bare C does things.

        You will find a good tutorial about Windows GUI programming at
        http://www.winprog.org/tutorial/

        To change the width of the tool tip, which results in forcing the tool
        tip to display multiple lines, you use the TTM_SETMAXTIPWIDTH message at
        http://msdn.microsoft.com/en-us/library/bb760246%28VS.85%29.aspx

        > How can we keep the tip display as long as the pointer over the control (Richard do something like that)?
        >

        You use the tracking tool tip, where I have posted an example.

        It should be fairly easy to use the GetFocus API function to determine
        the widget that is currently active.

        --
        Stefan Pendl
        http://stefanpendl.runbasichosting.com/

        LB 4.04 Pro ... http://www.libertybasic.com/assist.html
        LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

        LB Community Wiki .............. http://basic.wikispaces.com/
        LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
        LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

        Books at http://www.lulu.com/ and http://www.amazon.com/
        Alyce Watson ... APIs for Liberty BASIC
        Carl Gundel .... Beginning Programming with Liberty BASIC

        Windows 7 Home Premium 64-bit SP1
        AMD Turion X2 RM-70 2GHz, 4GB RAM



        [Non-text portions of this message have been removed]
      • Stefan Pendl
        ... If you don t want to be bothered with MSDN, then don t use API created widgets. There is no need to learn C/C++, just look at the example code and
        Message 3 of 6 , Aug 4, 2012
          Am 04.08.2012 09:24, schrieb Sarmed N.:
          >
          >
          >
          >
          > Learning C or C++ language.
          >
          > Then learning Win 32 API.
          >
          > Then learning translating API functions to LIBERTY BASIC.
          >
          > To know how to delay the display time of tool tip?
          >
          >
          > Sir, If I going to use your example, I know how to control the width of tool tip and how to change the balloon into normal tool tip. Only I need how to delay the display of long tool tip, to give the user a plenty time to read it.
          > Please don't face me with Micro Soft MSDN.
          >

          If you don't want to be bothered with MSDN, then don't use API created
          widgets.

          There is no need to learn C/C++, just look at the example code and
          recognize the concept.

          Starting with LB5 bothering with MSDN will be reduced to the bare
          minimum, since Windows API functions are impossible to support cross
          platform on Mac and Linux.

          ----

          From the example I posted, you just need to use the
          TTM_TRACKINGACTIVATE message to show or hide the tool tip at will, that
          is simple.

          What this message does is described at MSDN, you may find out by just
          comparing the differences between the two calls.

          I would disable the TIMER and remove the checks for the text box
          contents, so the code can be stepped through in the debugger to see what
          each of the code lines does.

          Be creative ;-)

          I am not willing to spoon-feed every solution to the members of this
          group, I don't have the time to do this.


          --
          Stefan Pendl
          http://stefanpendl.runbasichosting.com/

          LB 4.04 Pro ... http://www.libertybasic.com/assist.html
          LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

          LB Community Wiki .............. http://basic.wikispaces.com/
          LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
          LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

          Books at http://www.lulu.com/ and http://www.amazon.com/
          Alyce Watson ... APIs for Liberty BASIC
          Carl Gundel .... Beginning Programming with Liberty BASIC

          Windows 7 Home Premium 64-bit SP1
          AMD Turion X2 RM-70 2GHz, 4GB RAM
        • Stefan Pendl
          ... I have updated the Tool tip at will.bas file uploaded to the files area to be smarter. The tool tip is now displayed as long as the widget has focus, so
          Message 4 of 6 , Aug 4, 2012
            Am 04.08.2012 10:25, schrieb Stefan Pendl:
            > Am 04.08.2012 09:24, schrieb Sarmed N.:
            >>
            >> To know how to delay the display time of tool tip?
            >>

            I have updated the "Tool tip at will.bas" file uploaded to the files
            area to be smarter.

            The tool tip is now displayed as long as the widget has focus, so using
            the tab key to change focus will hide the tool tip.

            Moving the window around will force the tool tip to follow it.


            --
            Stefan Pendl
            http://stefanpendl.runbasichosting.com/

            LB 4.04 Pro ... http://www.libertybasic.com/assist.html
            LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

            LB Community Wiki .............. http://basic.wikispaces.com/
            LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
            LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

            Books at http://www.lulu.com/ and http://www.amazon.com/
            Alyce Watson ... APIs for Liberty BASIC
            Carl Gundel .... Beginning Programming with Liberty BASIC

            Windows 7 Home Premium 64-bit SP1
            AMD Turion X2 RM-70 2GHz, 4GB RAM
          • Sarmed N.
            Hello Stefan, I see you wrote a program!, It s more than I expected, I appreciate what you did. What I was simply expected, you will indicate to a number in a
            Message 5 of 6 , Aug 4, 2012
              Hello Stefan,

              I see you wrote a program!, It's more than I expected, I appreciate what you did. What I was simply expected, you will indicate to a number in a sentence represents the seconds that tool tip stay displayed before it disappears. As you did in first time when you said, use this sentence for many lines tool tip. I am sorry I took your time.

              An example for what I mean is the following sentence which has a number "40" if we change it into 00 we got no balloon shape, that's mean the normal shape of tool tip board without side thorn.
              dwStyle = _WS_POPUP or 1 or 2 or hexdec("40") or hexdec("80")

              If I know you will going to write a program, I can do that using native LB, maybe it cost less code to display delayed tool tip.

              Yes, if I don't want to deal with MSDN, I must not use API functions. But I use the examples driven by Alyce and others as a complement instructions of LB, these examples has API functions as you know. However I found each API function suffering of some insufficiency of some aspects. Like numbers only style bit.

              Next time I will be more precise when asking, many thanks to you, I always appreciate your help.

              SARMED



              ________________________________
              From: Stefan Pendl <pendl2megabit@...>
              To: libertybasic@yahoogroups.com
              Sent: Saturday, August 4, 2012 12:26 PM
              Subject: Re: [libertybasic] Many lines Normal Tool Tip


               
              Am 04.08.2012 10:25, schrieb Stefan Pendl:
              > Am 04.08.2012 09:24, schrieb Sarmed N.:
              >>
              >> To know how to delay the display time of tool tip?
              >>

              I have updated the "Tool tip at will.bas" file uploaded to the files
              area to be smarter.

              The tool tip is now displayed as long as the widget has focus, so using
              the tab key to change focus will hide the tool tip.

              Moving the window around will force the tool tip to follow it.

              --
              Stefan Pendl
              http://stefanpendl.runbasichosting.com/

              LB 4.04 Pro ... http://www.libertybasic.com/assist.html
              LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

              LB Community Wiki .............. http://basic.wikispaces.com/
              LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
              LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

              Books at http://www.lulu.com/ and http://www.amazon.com/
              Alyce Watson ... APIs for Liberty BASIC
              Carl Gundel .... Beginning Programming with Liberty BASIC

              Windows 7 Home Premium 64-bit SP1
              AMD Turion X2 RM-70 2GHz, 4GB RAM



              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.