Forum Discussion

Mathit's avatar
Mathit
Contributor
9 years ago

Longwindow in button class

I have an object which is recognized as Mdsbuttin class but us a checkbox. In unable to capture the current state of the checkbox. Developer says he sets the longwindow property to identify checked or not.  How can we capture the current state of the checkbox

 

  • Could you please try this?

    x = Win32API.GetWindowLong(button_m.Handle, 7*4)

    (using 4 instead of 8 as the multiplier)

  • baxatob's avatar
    baxatob
    Community Hero

    Hi!

     

    That all sounds weird. Can you provide a screenshot of your element and how it presents in Object Browser?

     

    • Mathit's avatar
      Mathit
      Contributor

      This is how the properties look like.

      this is developer's code to identify

      SetWindowLong( hwndTmp, STATE_FLAGS_INDEX * sizeof( unsigned long ), BST_UNCHECKED );

      that's the Set

      and the get it uses return( GetWindowLong( hWndBtn, STATE_FLAGS_INDEX * sizeof( unsigned long ) ) );

       

      Any help is highly appreciated

      • HKosova's avatar
        HKosova
        SmartBear Alumni (Retired)

        Hi,

         

        Try adding MdsButtonClass to the Win32 check box classes in your project's Object Mapping settings. This should add the wState property to get or set the check box state. Let us know if this works.

         

        Steps:

        1. Double-click the project in the Project Explorer.
        2. Switch to Properties.
        3. Select Object Mapping.
        4. Expand "Win32 Controls and Windows > Check box".
        5. Add MdsButtonClass to the list.
        6. Save the project.
        7. Refresh the object in the Object Browser.