[RESOLVED] Get window handle from process name
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: [RESOLVED] Get window handle from process name

  1. #1
    Join Date
    Feb 2011
    Posts
    32

    [RESOLVED] Get window handle from process name

    Hi, there's an application that doesn't have anything written on the window title, so I can't use FindWindow() to get its handle.

    So I wanted to know how to get the window handle from the process name. Any ideas?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    18,969

    Re: Get window handle from process name

    If you mean the full name of the App exe then use EnumWindows +
    GetWindowModuleFileName
    Victor Nijegorodov

  3. #3
    Join Date
    Mar 2010
    Location
    Melbourne Australia
    Posts
    454

    Re: Get window handle from process name

    you can also use findwindow if you know the title of the window your application as has created

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    18,969

    Re: Get window handle from process name

    Quote Originally Posted by aamir121a View Post
    you can also use findwindow if you know the title of the window your application as has created
    I wonder did you read the OP?

    Quote Originally Posted by Toshioo View Post
    Hi, there's an application that doesn't have anything written on the window title, so I can't use FindWindow() to get its handle
    Victor Nijegorodov

  5. #5
    Join Date
    Feb 2011
    Posts
    32

    Re: Get window handle from process name

    Quote Originally Posted by VictorN View Post
    If you mean the full name of the App exe then use EnumWindows +
    GetWindowModuleFileName
    Thanks a lot!

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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)