CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2000
    Posts
    44

    How to get window Hwnd without...

    Hello !
    How can I get window handle without spy++ and without know his caption?
    For example I run Internet Explore from VB program and I want to get his hwnd.
    Thanks.


  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: How to get window Hwnd without...

    You should know something about the window!, to decide if that is the window you need.

    There is a EnumWindows Api which will pass all the TOP level windows handles, one by one, to a application defined call back function. So, if you know the window caption, or class name or something about the window, then you can check that property to decide. (There is a sample in articles section of Codeguru/vb. check it out)

    If you know the class name then you can also use a FindWindow to get the match. Internet Explorer's class name seems to be "Internet Explorer_Server", got with Spy++


    RK

  3. #3
    Join Date
    Jan 2000
    Posts
    44

    Re: How to get window Hwnd without...

    Hello Ravi !
    First of all thanks about help.
    What I know about the window is the "task ID" (from Shell function) but I don't know what to with it.
    Do you can help me?


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