CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: window handlers

  1. #1
    Join Date
    Apr 2008
    Posts
    4

    window handlers

    Hi,

    I have created an application that can capture the window handle "hwnd" using mouse pointer,but the problem is if i open word i receive a handle,then if i close word and open it again i receive a different handle.My problem is am trying to find something fix that will tell me it is word other than the window title,i need to always know that my mouse pointer is on this application if if i closed it and opened it again.To be more precise how to distinguish a window from another.

    Any help would be appreciated.
    Last edited by snow_cap; August 5th, 2010 at 10:05 AM.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: window handlers

    Check the TITLE of the window
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: window handlers

    In your own words, you are saying that you need to find the handle of a window, without using it's text. Well, if GetWindowText already works, why do you need another way? It is quite reliable, isn't it?

    If you really want a different way, have you heard of a program called Spy++? It may be useful, it may not be useful, but try it at least. I still can't see your reasoning behind this though

  4. #4
    Join Date
    Apr 2008
    Posts
    4

    Re: window handlers

    thx guys,but the handle is not helpful because it changes when you close or open the application.And for the title,in some application titles change.i tried the spy software and it wasn't much of help.

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