Announcement

Collapse
No announcement yet.

Problem with New Development, Maybe?

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

  • #21
    Actually, Brent, the buttons are at the top of the dialog du 2-16 (2-14 for imgbuttons)
    the graphic starts at dunit 20 so they aren't within the graphic area per se.
    And the buttons work fine. I was simulating a button press (304) when the
    left or right mouse button was pressed within the graphic. All worked fine until the update.

    I have a copy of 8.01 on another computer and i can recompile it with that to make it work,
    but would love to have 8.04 working.
    Last edited by Fred Buffington; 12 Oct 2007, 07:38 PM.
    Client Writeup for the CPA

    buffs.proboards2.com

    Links Page

    Comment


    • #22
      This update is really discouraging. The Loadbitmap code I posted above, works just like the Control Graphic used to work. In Windows XP and Windows Vista. I am in the middle of redesigning my programs and this update comes along, and Vista, or I think Long Horn was a better name(path is a mile long to get to folder).
      Can't understand how LoadBitmap can work like Graphic Control used to work. I guess once this
      has been updated, they can't go back?
      Last edited by BRENT GARDNER; 13 Oct 2007, 09:25 AM.

      Comment


      • #23
        I am using winXP home and PB win 8.04. I can use %SS_CLICKED OR %SS_DBLCLK and using %SS_NOTIFY with my graphic and have the graphic respond by clicking anywhere on the graphic.

        CASE %idc_graphic1
        IF CBCTLMSG = %STN_CLICKED THEN
        'MSGBOX "you clicked the graphic"
        'DIALOG END CBHNDL, 0
        END IF

        I have a cancel button on my dialog which does not work if within the graphic with %SS_NOTIFY. Remove the %SS_NOTIFY and the cancel button works, but the graphic does not respond to a click.

        From what I see here, I could have a small graphic showing an exit sign, for example, and would not have to have a cancel button, using the code above.

        PB 8.04 seems to work as advertised here.

        John Tate

        Comment


        • #24
          Thanks John, that fixes the click. Now works for clicking on graphic
          Code:
                 CASE %IDC_GRAPHIC1
                     IF CBCTLMSG=%STN_CLICKED THEN
                       SendMessage hDlgPreview,%WM_COMMAND,304&,0
                    END IF
          Now, just one more thing. The mouse Right button still is not acknowledged.
          Before i use it to 'unzoom' if the dialog was in 'zoom' mode.

          Actually it works (rbuttondown) as long as i am NOT over the graphic. Just found that.

          I added "IF ZOOM&=0" to the send message above then added
          IF CBCTLMSG=%STN_DBLCLK THEN
          IF ZOOM&=1 THEN SendMessage hDlgPreview,%WM_COMMAND,304&,0
          END IF
          END IF

          so now click to zoom, double click to 'unzoom'.

          Thanks to everyone. you guys are the greatest.
          Last edited by Fred Buffington; 12 Oct 2007, 10:35 PM.
          Client Writeup for the CPA

          buffs.proboards2.com

          Links Page

          Comment


          • #25
            Figured out how to use CONTROL ADD GRAPHIC, so it works like
            before update 8.04, atleast for my program. Here is what I discovered:

            Control Add Graphic: For single keypress hot key to work, add
            %SS_NOTIFY style to the CONTROL ADD GRAPHIC, then before adding "&Stop" button, Add "CONTROL DISABLE hDlg43, %D_FRAM",
            which is the graphic control.
            Code:
                  CONTROL ADD GRAPHIC, hDlg43, %ID_FRAM, "",       0,  0,  660,700, %SS_NOTIFY
                  GRAPHIC ATTACH hDlg43, %ID_FRAM
                  GRAPHIC RENDER "PICT\BaloonBorder2.bmp",        (0,  0)-(660,700)
                  CONTROL ADD TEXTBOX, hDlg43, %IDS_TEXT, "",     45, 45,  570,625, _
                   %ES_MULTILINE OR %ES_READONLY OR %ES_AUTOHSCROLL OR %ES_WANTRETURN, %WS_EX_CLIENTEDGE
                  CONTROL DISABLE hDlg43, %ID_FRAM
                  CONTROL ADD BUTTON, hDlg43, %IDS_BUT, "&Stop", 300,679,   80, 20
            Code for Alt+S, or left mouse click on button and NO Single keypress hot key, works this way: (There is no %SS_NOTIFY ON graphic control and no "CONTROL DISABLE hDlg43, %ID_FRAM")
            Code:
                  CONTROL ADD GRAPHIC, hDlg43, %ID_FRAM, "",       0,  0,  660,700
                  GRAPHIC ATTACH hDlg43, %ID_FRAM
                  GRAPHIC RENDER "PICT\BaloonBorder2.bmp",        (0,  0)-(660,700)
                  CONTROL ADD TEXTBOX, hDlg43, %IDS_TEXT, "",     45, 45,  570,625, _
                   %ES_MULTILINE OR %ES_READONLY OR %ES_AUTOHSCROLL OR %ES_WANTRETURN, %WS_EX_CLIENTEDGE
                  CONTROL ADD BUTTON, hDlg43, %IDS_BUT, "&Stop", 300,679,   80, 20

            Comment


            • #26
              Great Job Brent !!

              That fixes the WM_LBUTTONDOWN and RBUTTONDOWN.

              every time i access the graphic putting new graphics on the next page,
              i simply
              CONTROL DISABLE hDlgPreview,%IDC_GRAPHIC1
              and it works as before.
              Client Writeup for the CPA

              buffs.proboards2.com

              Links Page

              Comment

              Working...
              X