Announcement

Collapse
No announcement yet.

ButtonPlus in Source Code

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

    #41
    I have a weird problem when using this with PBWin10 and mixing buttonPlus with Control set color for lables and textboxes. A non-colorized or touched by code in ButtonPlus calls or Control Set Color end up in some textboxes when ButtonPlus is being used during WM_INITDIALOG or moving the mouse over a text box. Have you ever seen this? I do not have any weird ID's duplicate or do I set the checkbox twice. ANd if I do not colorize one text, with control set color , the problme will move to the next textbox.

    I will try to bring this down to a small example and post it.
    Barry

    Comment


      #42
      >and mixing buttonPlus with Control set color

      Does Button Plus create DDT-managed controls? If not, there's your problem: CONTROL SET COLOR was designed for use with DDT-managed controls.

      Besides, even CONTROL SET COLOR is not meant for buttons:

      Restrictions
      Windows does not permit the color of standard push button controls, line controls, image controls, image buttons, and most common controls to be altered by the standard CONTROL SET COLOR techniques.
      - Source: PB/Win 9.0.5 help
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


        #43
        The problem was I was saving the value of the text box as -2 instead of -1 for system.

        ANd you can mix DDT with other things and button plus uses sdk, which I have mixed with DDT for years. The CONTROL HANDLE allows pointing to the item for the sdk. And Button plus is designed to be used with DDT buttons. Since you do not use DDT, you can't see the weird thing by seeting a text background to -2 and passing your mosue over it.

        Anyway, it is working fine mixing DDT with sdk. And you can use sdk mixed with DDT controls if there is not a compatible ddt thing. I sid that for listview sort numeric back when 10.00 came out and it's DDT did not work. And originally used the sdk for listview stuff before PB had it. And I still mix progress bar ddt with progressbar sdk.

        Try it beofre you cay it can't be done.
        Barry

        Comment


          #44
          So problem solved then Barry? (hope so, because I don't really understand what was happening!).

          ButtonPlus is most definitely designed to work with DDT since I myself only resort to the API when I have to. I must admit that I haven't yet had occasion to use BP with PB10 though.
          - LJ

          Comment


            #45
            >Try it [before] you cay it can't be done

            I'm not saying things "can't be done" in the sense they might "work today;" I am saying they are not supported, and if they stop "working" in the next release of either the operating system or compiler, be neither surprised, disappointed or whiney.

            MCM
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


              #46
              Originally posted by Michael Mattias View Post
              >Try it [before] you cay it can't be done

              I'm not saying things "can't be done" in the sense they might "work today;" I am saying they are not supported, and if they stop "working" in the next release of either the operating system or compiler, be neither surprised, disappointed or whiney.

              MCM
              AS long as CONTROL HANDLE cb.hndl,%IDD to winhndl remains the same, it will work. Even with LISTVIEW, you can get the handle and use API's listview items. I place the sort arrow in the column header using sdk on the PB Listview. The worst that will happen is the Listview would have to be done in SDK and even the current PBForms uses some SDK to draw with as PB did not have the stuff when it was written and I use PB commands within those. They have worked since back in PB/DLL days.
              Barry

              Comment


                #47
                What you describe is the "valid" situation.

                I am thinking of all the times I see "CONTROL anything CBHNDL..." on a window/control NOT created by DDT (or created with CONTROL ADD "classname").

                Those calls may 'work'; they may not. They may even work today but not tomorrow.

                MCM
                Michael Mattias
                Tal Systems (retired)
                Port Washington WI USA
                [email protected]
                http://www.talsystems.com

                Comment


                  #48
                  Originally posted by Michael Mattias View Post
                  What you describe is the "valid" situation.

                  I am thinking of all the times I see "CONTROL anything CBHNDL..." on a window/control NOT created by DDT (or created with CONTROL ADD "classname").

                  Those calls may 'work'; they may not. They may even work today but not tomorrow.

                  MCM
                  CBHNDL is not valid outside of a DDT Callback, those are called by passing cb.hndl to the function from the callback and using CONTROL hdnl,iid to access the control. Or, your favorite, GLOBAL MainHndl as dword, then pass the handle from the main dialog or in the init section of it's callback. The DDT controls can be used anywhere IF the handle is passed. And not by CBHDNL or its replacement, CB.HNDL.
                  Barry

                  Comment


                    #49
                    New problem. One column in a listview won't come through when i use the DDT LISTVIEW GET TEXT hndl, id, 1,6 to stxt. All the other columns work, all are TEXT columns and this column has a file location in it: "C:\folder\subfolder\filename.ext" in it and is the only column that goes though button plus when I trace it. The stxt is empty when Button Plus is done. I don't know whey this column goes through button plus when the others do not. I do not set color of this column different than others at all.
                    Barry

                    Comment

                    Working...
                    X
                    😀
                    🥰
                    🤢
                    😎
                    😡
                    👍
                    👎