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

Re: How to click on toolbar's buttons?

Expand Messages
  • Dennis K. Paulsen
    I brielfy took a look at implementing ToolBar support a month or so ago, but I haven t had much time lately... :-( ... detect a ... tip, and get ... clever ...
    Message 1 of 12 , Jan 8, 2005
    • 0 Attachment
      I brielfy took a look at implementing ToolBar support a month or so
      ago, but I haven't had much time lately... :-(

      --- In perlguitest@yahoogroups.com, Coleman Tom <tom.coleman@s...>
      wrote:
      >
      >
      > I look forward to hearing of a "true" solution, where you can
      detect a
      > toolbar by it's title, then select a button by it's id or tool
      tip, and get
      > the button enable state from some api. But I don't know of such
      clever
      > things, so...
      >
      > I use a work around, there are a few below.
      > best of luck,
      > tom
      >
      >
      > Work arounds for interacting with the toolbar:
      >
      > - use the menu,
      > most applications have menu items that duplicate the
      functionality
      > of toolbar buttons. If they do not gently invite them to read a
      book on
      > software usability, such as _The Inmates are Running the Asylum_.
      >
      > - use the menu hot key,
      > many menu items have a hot key associated...
      > Ctrl + S = save
      > if the feature needs to be tested sometimes the program can
      be
      > modified to make the feature more easily accessible.
      >
      > - use the keyboard to navigate the menu...
      > Alt + F, S = save
      >
      > - use the keyboard to navigate to the toolbar...
      > 1. Alt = get to the menu
      > 2. Ctrl + Tab = get to the next toolbar
      > 3. arrow keys = move the toolbar button of interest
      > 4. enter = select the toolbar button
      >
      > -----Original Message-----
      > From: ved billorey [mailto:vedbillore@y...]
      > Sent: Wednesday, January 05, 2005 5:14 AM
      > To: perlguitest@yahoogroups.com
      > Subject: [perlguitest] How to click on toolbar's buttons?
      >
      >
      >
      >
      > I am doing automation using Win32::GUITest for an
      > application where I need to click on toolbar's buttons
      > to perform certain operations. I have no idea how to
      > do that.
      >
      > Is there any function for the same?
      >
      > Regards,
      > Ved.
      >
      >
      >
      > __________________________________
      > Do you Yahoo!?
      > All your favorites on one personal page - Try My Yahoo!
      > http://my.yahoo.com
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      > -------------------------------------------------------------------
      ------------
      > This message and any included attachments are from Siemens Medical
      Solutions
      > USA, Inc. and are intended only for the addressee(s).
      > The information contained herein may include trade secrets or
      privileged or
      > otherwise confidential information. Unauthorized review,
      forwarding, printing,
      > copying, distributing, or using such information is strictly
      prohibited and may
      > be unlawful. If you received this message in error, or have
      reason to believe
      > you are not authorized to receive it, please promptly delete this
      message and
      > notify the sender by e-mail with a copy to
      Central.SecurityOffice@s...
      >
      > Thank you
      >
      > [Non-text portions of this message have been removed]
    • Wenjie Wang
      I ve done something similar like following and it s simple and works fine with me: my $myToolbar = GetDNACallModeToolbar(); if ($myToolbar) {
      Message 2 of 12 , Jan 9, 2005
      • 0 Attachment
        I've done something similar like following and it's simple and works fine with me:

        my $myToolbar = GetDNACallModeToolbar();

        if ($myToolbar)

        {

        PushChildButton($myToolbar, 1280, 0.3);

        }

        Ofcourse I'm testing my own GUI written in MFC and I have knowledge of all the control IDs. But you could always use spy++ to find out resource ID of toolbar button.




        Coleman Tom <tom.coleman@...> wrote:


        I look forward to hearing of a "true" solution, where you can detect a
        toolbar by it's title, then select a button by it's id or tool tip, and get
        the button enable state from some api. But I don't know of such clever
        things, so...

        I use a work around, there are a few below.
        best of luck,
        tom


        Work arounds for interacting with the toolbar:

        - use the menu,
        most applications have menu items that duplicate the functionality
        of toolbar buttons. If they do not gently invite them to read a book on
        software usability, such as _The Inmates are Running the Asylum_.

        - use the menu hot key,
        many menu items have a hot key associated...
        Ctrl + S = save
        if the feature needs to be tested sometimes the program can be
        modified to make the feature more easily accessible.

        - use the keyboard to navigate the menu...
        Alt + F, S = save

        - use the keyboard to navigate to the toolbar...
        1. Alt = get to the menu
        2. Ctrl + Tab = get to the next toolbar
        3. arrow keys = move the toolbar button of interest
        4. enter = select the toolbar button

        -----Original Message-----
        From: ved billorey [mailto:vedbillore@...]
        Sent: Wednesday, January 05, 2005 5:14 AM
        To: perlguitest@yahoogroups.com
        Subject: [perlguitest] How to click on toolbar's buttons?




        I am doing automation using Win32::GUITest for an
        application where I need to click on toolbar's buttons
        to perform certain operations. I have no idea how to
        do that.

        Is there any function for the same?

        Regards,
        Ved.



        __________________________________
        Do you Yahoo!?
        All your favorites on one personal page - Try My Yahoo!
        http://my.yahoo.com






        Yahoo! Groups Links








        -------------------------------------------------------------------------------
        This message and any included attachments are from Siemens Medical Solutions
        USA, Inc. and are intended only for the addressee(s).
        The information contained herein may include trade secrets or privileged or
        otherwise confidential information. Unauthorized review, forwarding, printing,
        copying, distributing, or using such information is strictly prohibited and may
        be unlawful. If you received this message in error, or have reason to believe
        you are not authorized to receive it, please promptly delete this message and
        notify the sender by e-mail with a copy to Central.SecurityOffice@...

        Thank you

        [Non-text portions of this message have been removed]






        ---------------------------------
        Yahoo! Groups Links

        To visit your group on the web, go to:
        http://groups.yahoo.com/group/perlguitest/

        To unsubscribe from this group, send an email to:
        perlguitest-unsubscribe@yahoogroups.com

        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



        ------------------------------------------------------------------------------------------
        Wenjie Wang(a.k.a. William) wwang@...
        WANG Infonology Systems Ph: (02)-98712018 Mobile: 0412688380
        http://users.bigpond.net.au/WISeAgent http://www.websamba.com/wiseagent
        ==================================================


        ---------------------------------
        Find local movie times and trailers on Yahoo! Movies.


        [Non-text portions of this message have been removed]
      • Ofer Ben-Yacov
        Hi, can you let me know where can I find the resource ID of a button in a toolbar using spy ++ ? I could not find it. Thanks, Ofer. ... From: Wenjie Wang
        Message 3 of 12 , Jan 9, 2005
        • 0 Attachment
          Hi,
          can you let me know where can I find the resource ID of a button in a
          toolbar using spy ++ ?
          I could not find it.

          Thanks,
          Ofer.


          ----- Original Message -----
          From: "Wenjie Wang" <wiseagent2000@...>
          To: <perlguitest@yahoogroups.com>
          Sent: Monday, January 10, 2005 12:53 AM
          Subject: RE: [perlguitest] How to click on toolbar's buttons?


          >
          >
          > I've done something similar like following and it's simple and works fine
          > with me:
          >
          > my $myToolbar = GetDNACallModeToolbar();
          >
          > if ($myToolbar)
          >
          > {
          >
          > PushChildButton($myToolbar, 1280, 0.3);
          >
          > }
          >
          > Ofcourse I'm testing my own GUI written in MFC and I have knowledge of all
          > the control IDs. But you could always use spy++ to find out resource ID
          > of toolbar button.
          >
          >
          >
          >
          > Coleman Tom <tom.coleman@...> wrote:
          >
          >
          > I look forward to hearing of a "true" solution, where you can detect a
          > toolbar by it's title, then select a button by it's id or tool tip, and
          > get
          > the button enable state from some api. But I don't know of such clever
          > things, so...
          >
          > I use a work around, there are a few below.
          > best of luck,
          > tom
          >
          >
          > Work arounds for interacting with the toolbar:
          >
          > - use the menu,
          > most applications have menu items that duplicate the functionality
          > of toolbar buttons. If they do not gently invite them to read a book on
          > software usability, such as _The Inmates are Running the Asylum_.
          >
          > - use the menu hot key,
          > many menu items have a hot key associated...
          > Ctrl + S = save
          > if the feature needs to be tested sometimes the program can be
          > modified to make the feature more easily accessible.
          >
          > - use the keyboard to navigate the menu...
          > Alt + F, S = save
          >
          > - use the keyboard to navigate to the toolbar...
          > 1. Alt = get to the menu
          > 2. Ctrl + Tab = get to the next toolbar
          > 3. arrow keys = move the toolbar button of interest
          > 4. enter = select the toolbar button
          >
          > -----Original Message-----
          > From: ved billorey [mailto:vedbillore@...]
          > Sent: Wednesday, January 05, 2005 5:14 AM
          > To: perlguitest@yahoogroups.com
          > Subject: [perlguitest] How to click on toolbar's buttons?
          >
          >
          >
          >
          > I am doing automation using Win32::GUITest for an
          > application where I need to click on toolbar's buttons
          > to perform certain operations. I have no idea how to
          > do that.
          >
          > Is there any function for the same?
          >
          > Regards,
          > Ved.
          >
          >
          >
          > __________________________________
          > Do you Yahoo!?
          > All your favorites on one personal page - Try My Yahoo!
          > http://my.yahoo.com
          >
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
          >
          > -------------------------------------------------------------------------------
          > This message and any included attachments are from Siemens Medical
          > Solutions
          > USA, Inc. and are intended only for the addressee(s).
          > The information contained herein may include trade secrets or privileged
          > or
          > otherwise confidential information. Unauthorized review, forwarding,
          > printing,
          > copying, distributing, or using such information is strictly prohibited
          > and may
          > be unlawful. If you received this message in error, or have reason to
          > believe
          > you are not authorized to receive it, please promptly delete this message
          > and
          > notify the sender by e-mail with a copy to
          > Central.SecurityOffice@...
          >
          > Thank you
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          >
          >
          >
          > ---------------------------------
          > Yahoo! Groups Links
          >
          > To visit your group on the web, go to:
          > http://groups.yahoo.com/group/perlguitest/
          >
          > To unsubscribe from this group, send an email to:
          > perlguitest-unsubscribe@yahoogroups.com
          >
          > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
          >
          >
          >
          > ------------------------------------------------------------------------------------------
          > Wenjie Wang(a.k.a. William) wwang@...
          > WANG Infonology Systems Ph: (02)-98712018 Mobile: 0412688380
          > http://users.bigpond.net.au/WISeAgent http://www.websamba.com/wiseagent
          > ==================================================
          >
          >
          > ---------------------------------
          > Find local movie times and trailers on Yahoo! Movies.
          >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
        • pkaluski
          Hi, I don t think it s possible with Spy++. I would try using Visual Studio. Try to open executable file as a resource file. BTW, why do you need a resource id
          Message 4 of 12 , Jan 10, 2005
          • 0 Attachment
            Hi,
            I don't think it's possible with Spy++. I would try using Visual
            Studio. Try to open executable file as a resource file.
            BTW, why do you need a resource id of a button?
            -Piotr

            --- In perlguitest@yahoogroups.com, "Ofer Ben-Yacov" <oferb@1...>
            wrote:
            >
            > Hi,
            > can you let me know where can I find the resource ID of a button in
            a
            > toolbar using spy ++ ?
            > I could not find it.
            >
            > Thanks,
            > Ofer.
            >
            >
            > ----- Original Message -----
            > From: "Wenjie Wang" <wiseagent2000@y...>
            > To: <perlguitest@yahoogroups.com>
            > Sent: Monday, January 10, 2005 12:53 AM
            > Subject: RE: [perlguitest] How to click on toolbar's buttons?
            >
            >
            > >
            > >
            > > I've done something similar like following and it's simple and
            works fine
            > > with me:
            > >
            > > my $myToolbar = GetDNACallModeToolbar();
            > >
            > > if ($myToolbar)
            > >
            > > {
            > >
            > > PushChildButton($myToolbar, 1280, 0.3);
            > >
            > > }
            > >
            > > Ofcourse I'm testing my own GUI written in MFC and I have
            knowledge of all
            > > the control IDs. But you could always use spy++ to find out
            resource ID
            > > of toolbar button.
            > >
            > >
            > >
            > >
            > > Coleman Tom <tom.coleman@s...> wrote:
            > >
            > >
            > > I look forward to hearing of a "true" solution, where you can
            detect a
            > > toolbar by it's title, then select a button by it's id or tool
            tip, and
            > > get
            > > the button enable state from some api. But I don't know of such
            clever
            > > things, so...
            > >
            > > I use a work around, there are a few below.
            > > best of luck,
            > > tom
            > >
            > >
            > > Work arounds for interacting with the toolbar:
            > >
            > > - use the menu,
            > > most applications have menu items that duplicate the
            functionality
            > > of toolbar buttons. If they do not gently invite them to read a
            book on
            > > software usability, such as _The Inmates are Running the Asylum_.
            > >
            > > - use the menu hot key,
            > > many menu items have a hot key associated...
            > > Ctrl + S = save
            > > if the feature needs to be tested sometimes the program can
            be
            > > modified to make the feature more easily accessible.
            > >
            > > - use the keyboard to navigate the menu...
            > > Alt + F, S = save
            > >
            > > - use the keyboard to navigate to the toolbar...
            > > 1. Alt = get to the menu
            > > 2. Ctrl + Tab = get to the next toolbar
            > > 3. arrow keys = move the toolbar button of interest
            > > 4. enter = select the toolbar button
            > >
            > > -----Original Message-----
            > > From: ved billorey [mailto:vedbillore@y...]
            > > Sent: Wednesday, January 05, 2005 5:14 AM
            > > To: perlguitest@yahoogroups.com
            > > Subject: [perlguitest] How to click on toolbar's buttons?
            > >
            > >
            > >
            > >
            > > I am doing automation using Win32::GUITest for an
            > > application where I need to click on toolbar's buttons
            > > to perform certain operations. I have no idea how to
            > > do that.
            > >
            > > Is there any function for the same?
            > >
            > > Regards,
            > > Ved.
            > >
            > >
            > >
            > > __________________________________
            > > Do you Yahoo!?
            > > All your favorites on one personal page - Try My Yahoo!
            > > http://my.yahoo.com
            > >
            > >
            > >
            > >
            > >
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > > ------------------------------------------------------------------
            -------------
            > > This message and any included attachments are from Siemens
            Medical
            > > Solutions
            > > USA, Inc. and are intended only for the addressee(s).
            > > The information contained herein may include trade secrets or
            privileged
            > > or
            > > otherwise confidential information. Unauthorized review,
            forwarding,
            > > printing,
            > > copying, distributing, or using such information is strictly
            prohibited
            > > and may
            > > be unlawful. If you received this message in error, or have
            reason to
            > > believe
            > > you are not authorized to receive it, please promptly delete this
            message
            > > and
            > > notify the sender by e-mail with a copy to
            > > Central.SecurityOffice@s...
            > >
            > > Thank you
            > >
            > > [Non-text portions of this message have been removed]
            > >
            > >
            > >
            > >
            > >
            > >
            > > ---------------------------------
            > > Yahoo! Groups Links
            > >
            > > To visit your group on the web, go to:
            > > http://groups.yahoo.com/group/perlguitest/
            > >
            > > To unsubscribe from this group, send an email to:
            > > perlguitest-unsubscribe@yahoogroups.com
            > >
            > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            Service.
            > >
            > >
            > >
            > > ------------------------------------------------------------------
            ------------------------
            > > Wenjie Wang(a.k.a. William) wwang@b...
            > > WANG Infonology Systems Ph: (02)-98712018 Mobile: 0412688380
            > > http://users.bigpond.net.au/WISeAgent
            http://www.websamba.com/wiseagent
            > > ==================================================
            > >
            > >
            > > ---------------------------------
            > > Find local movie times and trailers on Yahoo! Movies.
            > >
            > >
            > > [Non-text portions of this message have been removed]
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            > >
            > >
            > >
          • pkaluski
            Hmm... To be honest I am a little bit surprised that it really worked for you. Could you please provide me with more details: 1. What type of control is it
            Message 5 of 12 , Jan 10, 2005
            • 0 Attachment
              Hmm...
              To be honest I am a little bit surprised that it really worked for
              you. Could you please provide me with more details:
              1. What type of control is it (this toolbar). Is it a common windows
              control?
              2. How many buttons does it have?
              3. How do you select which button to push?

              -Piotr

              --- In perlguitest@yahoogroups.com, Wenjie Wang <wiseagent2000@y...>
              wrote:
              >
              > I've done something similar like following and it's simple and
              works fine with me:
              >
              > my $myToolbar = GetDNACallModeToolbar();
              >
              > if ($myToolbar)
              >
              > {
              >
              > PushChildButton($myToolbar, 1280, 0.3);
              >
              > }
              >
              > Ofcourse I'm testing my own GUI written in MFC and I have knowledge
              of all the control IDs. But you could always use spy++ to find out
              resource ID of toolbar button.
              >
            • Wenjie Wang
              1. launch your app and then launch spy++ 2. clicking on find toolbar button, using find tool and drop the cursor to the control you re going to inspect; or
              Message 6 of 12 , Jan 10, 2005
              • 0 Attachment
                1. launch your app and then launch spy++
                2. clicking on "find" toolbar button, using "find tool" and drop the cursor to the control you're going to inspect; or find the window in whatever way you prefer
                3. double click on the window entry in the left hand side navigational treel view to bring up "window property" for the window
                4. Under "general" tab, there is an item named "Control ID" which is the hex value of your control ID. when using the value in perl, prefix it with "0x", or convert it to decimal.

                Regards,
                W Wang


                +-Wenjie Wang a.k.a William -------------------------------------+
                | WANG Infonology Systems |EMail : wwang@... |
                | Phone : (02) 9871 2018 | WISeAgent2000@... |
                | Mobile: 0412 688 380 |http://users.bigpond.net.au/WISeAgent |
                +-------------------------+--------------------------------------+

                Ofer Ben-Yacov <oferb@...> wrote:

                Hi,
                can you let me know where can I find the resource ID of a button in a
                toolbar using spy ++ ?
                I could not find it.


                ------------------------------------------------------------------------------------------
                Wenjie Wang(a.k.a. William) wwang@...
                WANG Infonology Systems Ph: (02)-98712018 Mobile: 0412688380
                http://users.bigpond.net.au/WISeAgent http://www.websamba.com/wiseagent
                ==================================================


                ---------------------------------
                Find local movie times and trailers on Yahoo! Movies.


                [Non-text portions of this message have been removed]
              • Wenjie Wang
                I m using function Win32::Guitest::PushChildButton($ParentWnd, $BtnID, $delay); In my case, there are moer then one button have the same window title and I
                Message 7 of 12 , Jan 10, 2005
                • 0 Attachment
                  I'm using function
                  Win32::Guitest::PushChildButton($ParentWnd, $BtnID, $delay);

                  In my case, there are moer then one button have the same window title and I have to use control ID to distinguish between them;-)

                  btw, spy++ will provide teh hex value of resource ID of your control as "control ID" in the "window properties" popup under "general" tab.

                  Cheers,
                  WWang

                  +-Wenjie Wang a.k.a William -------------------------------------+
                  | WANG Infonology Systems |EMail : wwang@... |
                  | Phone : (02) 9871 2018 | WISeAgent2000@... |
                  | Mobile: 0412 688 380 |http://users.bigpond.net.au/WISeAgent |
                  +-------------------------+--------------------------------------+


                  pkaluski <pkaluski@...> wrote:

                  Hi,
                  I don't think it's possible with Spy++. I would try using Visual
                  Studio. Try to open executable file as a resource file.
                  BTW, why do you need a resource id of a button?
                  -Piotr



                  ------------------------------------------------------------------------------------------
                  Wenjie Wang(a.k.a. William) wwang@...
                  WANG Infonology Systems Ph: (02)-98712018 Mobile: 0412688380
                  http://users.bigpond.net.au/WISeAgent http://www.websamba.com/wiseagent
                  ==================================================


                  ---------------------------------
                  Find local movie times and trailers on Yahoo! Movies.


                  [Non-text portions of this message have been removed]
                • Wenjie Wang
                  The toolbar itself is dialog based class #32770 (Dialog) with button, combo and other controls. The toolbar is attached to window s rebar. It has more than
                  Message 8 of 12 , Jan 10, 2005
                  • 0 Attachment
                    The toolbar itself is dialog based class "#32770 (Dialog)" with button, combo and other controls. The toolbar is attached to window's rebar.

                    It has more than one buttons in the toolbar, and that's why I need to use control ID of the button to distinguish between them.

                    Again, control ID of the button control is used when calling PushChildButton function.

                    Cheers,
                    WWang


                    +-Wenjie Wang a.k.a William -------------------------------------+
                    | WANG Infonology Systems |EMail : wwang@... |
                    | Phone : (02) 9871 2018 | WISeAgent2000@... |
                    | Mobile: 0412 688 380 |http://users.bigpond.net.au/WISeAgent |
                    +-------------------------+--------------------------------------+

                    pkaluski <pkaluski@...> wrote:

                    Hmm...
                    To be honest I am a little bit surprised that it really worked for
                    you. Could you please provide me with more details:
                    1. What type of control is it (this toolbar). Is it a common windows
                    control?
                    2. How many buttons does it have?
                    3. How do you select which button to push?

                    -Piotr

                    --- In perlguitest@yahoogroups.com, Wenjie Wang <wiseagent2000@y...>
                    wrote:
                    >
                    > I've done something similar like following and it's simple and
                    works fine with me:
                    >
                    > my $myToolbar = GetDNACallModeToolbar();
                    >
                    > if ($myToolbar)
                    >
                    > {
                    >
                    > PushChildButton($myToolbar, 1280, 0.3);
                    >
                    > }
                    >
                    > Ofcourse I'm testing my own GUI written in MFC and I have knowledge
                    of all the control IDs. But you could always use spy++ to find out
                    resource ID of toolbar button.
                    >






                    ---------------------------------
                    Yahoo! Groups Links

                    To visit your group on the web, go to:
                    http://groups.yahoo.com/group/perlguitest/

                    To unsubscribe from this group, send an email to:
                    perlguitest-unsubscribe@yahoogroups.com

                    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



                    ------------------------------------------------------------------------------------------
                    Wenjie Wang(a.k.a. William) wwang@...
                    WANG Infonology Systems Ph: (02)-98712018 Mobile: 0412688380
                    http://users.bigpond.net.au/WISeAgent http://www.websamba.com/wiseagent
                    ==================================================


                    ---------------------------------
                    Find local movie times and trailers on Yahoo! Movies.


                    [Non-text portions of this message have been removed]
                  • pkaluski
                    Hi, This is a summary response to your last 3 posts (702-704). You are right. I have also observed that for basic controls like Edits, ComboBoxes etc. resource
                    Message 9 of 12 , Jan 11, 2005
                    • 0 Attachment
                      Hi,
                      This is a summary response to your last 3 posts (702-704).

                      You are right. I have also observed that for basic controls like
                      Edits, ComboBoxes etc. resource ID is equal to control ID. However,
                      this is only an observation. I haven't found any document saying that
                      control id = resource id (if anyone can confirm/deny, please do it).
                      From the other hand I have seen controls defined by CONTROL command
                      in rc file, which had resource ID != 0 and control ID = 0. You can
                      try with VC++. Create a project with application hosting an
                      Activex control. You will see the control will have Control ID = 0,
                      in the same time having resource id != 0.

                      As for handling a toolbar. According to your description you are not
                      dealing with the standard toolbar, like ToolbarWindow32 (used in
                      Spy++, for example). You deal with a custom made toolbar, which
                      is actually a dialog box with button controls on it. For such a case
                      you are right - it works and you can select buttons by control ID.
                      However, it is not going to work for standart toolbars (present in
                      Spy++ or in basic MFC applications created by AppWizard). As you can
                      see, there are no children of such a toolbar control. The standard
                      control toolbar works this way - you pass it a set of bitmaps which
                      should appears as buttons. Toolbar control is resposible for
                      notifying you, which button was clicked (when you click on it). You
                      can check the link http://msdn.microsoft.com/library/default.asp?
                      url=/library/en-
                      us/shellcc/platform/commctls/toolbar/toolbar_overview.asp.
                      You can also check Jeff's Prosize "Programming Windows with MFC (2nd
                      edition)", chapter 12.

                      -Piotr


                      --- In perlguitest@yahoogroups.com, Wenjie Wang <wiseagent2000@y...>
                      wrote:
                      >
                      > The toolbar itself is dialog based class "#32770 (Dialog)" with
                      button, combo and other controls. The toolbar is attached to
                      window's rebar.
                      >
                      > It has more than one buttons in the toolbar, and that's why I need
                      to use control ID of the button to distinguish between them.
                      >
                      > Again, control ID of the button control is used when calling
                      PushChildButton function.
                    • wenjie wang
                      ... However, ... that ... it). ... command ... 0, ... not ... case ... can ... which ... You ... (2nd ... Thanks for the summary. It has presented a better
                      Message 10 of 12 , Jan 11, 2005
                      • 0 Attachment
                        --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...> wrote:
                        >
                        > Hi,
                        > This is a summary response to your last 3 posts (702-704).
                        >
                        > You are right. I have also observed that for basic controls like
                        > Edits, ComboBoxes etc. resource ID is equal to control ID.
                        However,
                        > this is only an observation. I haven't found any document saying
                        that
                        > control id = resource id (if anyone can confirm/deny, please do
                        it).
                        > From the other hand I have seen controls defined by CONTROL
                        command
                        > in rc file, which had resource ID != 0 and control ID = 0. You can
                        > try with VC++. Create a project with application hosting an
                        > Activex control. You will see the control will have Control ID =
                        0,
                        > in the same time having resource id != 0.
                        >
                        > As for handling a toolbar. According to your description you are
                        not
                        > dealing with the standard toolbar, like ToolbarWindow32 (used in
                        > Spy++, for example). You deal with a custom made toolbar, which
                        > is actually a dialog box with button controls on it. For such a
                        case
                        > you are right - it works and you can select buttons by control ID.
                        > However, it is not going to work for standart toolbars (present in
                        > Spy++ or in basic MFC applications created by AppWizard). As you
                        can
                        > see, there are no children of such a toolbar control. The standard
                        > control toolbar works this way - you pass it a set of bitmaps
                        which
                        > should appears as buttons. Toolbar control is resposible for
                        > notifying you, which button was clicked (when you click on it).
                        You
                        > can check the link http://msdn.microsoft.com/library/default.asp?
                        > url=/library/en-
                        > us/shellcc/platform/commctls/toolbar/toolbar_overview.asp.
                        > You can also check Jeff's Prosize "Programming Windows with MFC
                        (2nd
                        > edition)", chapter 12.
                        >

                        Thanks for the summary. It has presented a better picture of our
                        discussion.

                        As far as GUI concern, I'm mainly using win32 API / MFC / ATL. I'm
                        using PERL for other purpose. It happened that I have to perform
                        automated GUI manipulation in one of my new project and GuiTest
                        module is picked for the project. I haven't spent much time
                        investigating it futher till I read your comments in your web site.
                        and then dive into guitest.pm;-)

                        Luckily, what I've done so far is valid and works fine for my
                        project.

                        Regards
                        W Wang

                        +-Wenjie Wang a.k.a William -------------------------------------+
                        | WANG Infonology Systems |EMail : wwang@... |
                        | Phone : (02) 9871 2018 | WISeAgent2000@... |
                        | Mobile: 0412 688 380 |http://users.bigpond.net.au/WISeAgent |
                        +-------------------------+--------------------------------------+
                      Your message has been successfully submitted and would be delivered to recipients shortly.