Important: Please read the Qt Code of Conduct -

How get handle of Qwidget Child with ?

  • hi
    I really need help

    i can't read text of Qwidget class

    and can't sendmessage to press button on this class

    but in other application no problem .

    please help me .

    my sample vb code to get text of rich textbox of word pad in windows :

    Dim hwnd As Integer = FindWindow(Nothing, "Document - WordPad")
    Dim hwndchild As Integer = FindWindowEx(hwnd, 0, "RICHEDIT50W", vbNullString)
    Dim TextLen As Integer = SendMessage(hwndchild, WM_GETTEXTLENGTH, 0, 0) + 200
    Dim Buffer As String = New String(" "c, TextLen)
    SendMessageByString(hwndchild, WM_GETTEXT, TextLen, Buffer)

  • i can get handle of Qwidget Object
    but i thinking I cant access to child of parent.

  • You will not be able to do this.
    Qt does not use windows controls for their widgets, they use custom implementations and don't use real windows for all widgets. This way needs much less windows resources.

    What can be done is using the accessibility support.

  • Thanks for the answer
    What is your proposed solution?
    Tell us more
    My information is low
    can I access to them handle and command to this controls in .NET And Vb?

  • The only option I know is use MS Accessibility support. How to use that, I don't know, ask google.
    Why do you want to access Qt widgets from

  • use MS Accessibility support??
    what is this?
    please Tell us more :)
    example ,sample code ,...
    i work on a project that
    when command receive to my application ,similar Robot run and Doing This command .

  • Do you read what others write?
    I said, I only know it works, ask google.

    But you will not send messages to Qt widget, that does not work with standard windows messages.

  • i very searched but not found related this subject.... :(

  • Hi,

    ther very first HIT from google:

    that describes what MS Accessibility is.
    I don't know what you want to do.
    I don't know why you want to do that.

    You can't send windows messages to Qt widgets. You wanted to access the widgets, that is possible via MSAA, the only way I know on windows (if you do not have Qt for that).

Log in to reply