CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2013
    Posts
    4

    how to read things inside any window

    I'd like to know how to read buttons or body text from some child window.
    I already found the window handle

    It's the clipboard-window I'd like to read to capture the cut-addresses:
    Name:  excel 2010 clipboard.JPG
Views: 1722
Size:  41.5 KB

  2. #2
    Join Date
    Dec 2001
    Posts
    6,332

    Re: how to read things inside any window

    Have you tried the GetWindowText API function?
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  3. #3
    Join Date
    Jun 2013
    Posts
    4

    Re: how to read things inside any window

    yheah, but GetWindowText only returns the title: "20 of 24 - Clipboard"

    Maybe there is something that isn't a child window, but more like a child-button I need to address?

  4. #4
    Join Date
    Dec 2001
    Posts
    6,332

    Re: how to read things inside any window

    If you got the title of a parent window, then the window handle you used doesn't belong to the child window you want to read. How are you locating the window handle? Have you used EnumerateChildWindows?
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  5. #5
    Join Date
    Jun 2013
    Posts
    4

    Re: how to read things inside any window

    Thank you for helping me out.

    I used spy++8.
    it's the buttons text I want to read ;-)
    Name:  spy++ office-clipboard.jpg
Views: 1438
Size:  52.9 KB

  6. #6
    Join Date
    Dec 2001
    Posts
    6,332

    Re: how to read things inside any window

    It appears to me that it's not a button. It's sorta like a list, but then there's a down arrow to bring up a menu, yes? Do you get a different window handle for a list item than for the area above the list?
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  7. #7
    Join Date
    Jun 2013
    Posts
    4

    Re: how to read things inside any window

    No handles at all, only these two I've shown.
    I came to understand that it could be windowless controls. But I can't find any VB(a) coding that does anything with it. Msdn lack also of much information!

  8. #8
    Join Date
    Dec 2001
    Posts
    6,332

    Re: how to read things inside any window

    It is possible that the list isn't a separate control from the window containing the title. If it is a windowless control, then perhaps it may only be possible to read items through the use of character recognition. Although I think I read someplace that a windowless control has a window only when the user is interacting with it.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured