CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2004
    Location
    Pakistan
    Posts
    260

    how to know if window's text got change

    hi,
    I am writing monitoring application , which enum and save every handles which is running. by sending and reciving WM_GETTEXT messages i retrieve some information as well. Bu this process runs everytime even if text is not changed. Is there any way to trigger text extraction process if that specific windows get change.

    Suppose if i am extracting aol text , then is there anyway to extract text only when data gets change otherwise leave it. I dont wana play with Strings to compare what was the last message but i need to find a way on event call of window change...

    i hope i have cleared what ia m asking

    thanks in advamce

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: how to know if window's text got change

    You have to install a hook on the process that owns the window handle. You can then trap WM_SETTEXT message.

  3. #3
    Join Date
    Aug 2004
    Location
    Pakistan
    Posts
    260

    Re: how to know if window's text got change

    any other choice than hooking??

  4. #4
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: how to know if window's text got change

    Not to my knowledge

  5. #5
    Join Date
    Jan 2008
    Posts
    48

    Re: how to know if window's text got change

    Yes, the other method (WE) has been given many times on Win32 api ng, but not too old (1999)..

  6. #6
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: how to know if window's text got change

    Laurentis, quite a few of your posts end up with referring to ng without giving a clue as to what to search for in there. So, your posts are utterly useless in that regard. This is a forum to help others help themselves , and with millions of posts searching itself can be a task in itself. If you know what keywords to search for , please post those also here, so your post really becomes helpful. For example, you say "other method (WE)". What does that mean. Are we supposed to search for keyword "other method" and "WE" ?

  7. #7
    Join Date
    Aug 2004
    Location
    Pakistan
    Posts
    260

    Re: how to know if window's text got change

    yes please if you know anything then describe little more so we can understand what your refering here ..

  8. #8
    Join Date
    Aug 2002
    Posts
    12

    Re: how to know if window's text got change

    As kirants said, the windows hook is the eastest way.

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