CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2000
    Location
    Germany
    Posts
    369

    catching WM_PAINT messages from other applications

    Hello!
    I need to catch the messages from another application. Is there a possibility that my apllication notice when a WM_PAINT message would be send to a specific window. I need a solution without hooks!

    Thanks!

  2. #2
    Join Date
    Sep 2002
    Posts
    1,747
    You will need to do this in the memory context of the application you wish to intercept the message queue for. Often, the easy way (and less platform specific way) is to inject a DLL into that process (which is basically the way of hooks) though you can accomplish this by writing a subclassing procedure to the remote process (WriteProcessMemory) and executing it (either CreateRemoteThread or hijacking the CONTEXT of an existing thread in that process). Another possibility is to make your process a debugger for the remote process and placing a breakpoint on the message loop. However, I am curious as to why you would desire to do this without hooks...
    */*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/

    "It's hard to believe in something you don't understand." -- the sidhi X-files episode

    galathaea: prankster, fablist, magician, liar

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