WindowHooking?

This is a discussion on WindowHooking? within the Windows Programming forums, part of the Platform Specific Boards category; hi im hooking to a window using GetCursorPos and WindowFromPoint one problem the window im hooking to is the same ...

  1. #1
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214

    WindowHooking?

    hi im hooking to a window using GetCursorPos and WindowFromPoint
    one problem the window im hooking to is the same in other windows on the program..same classname but different handle
    is there a way so if its not the one in view it sends to it instead of the one in view..thanks

  2. #2
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Quote Originally Posted by Rare177
    hi im hooking to a window using GetCursorPos and WindowFromPoint
    one problem the window im hooking to is the same in other windows on the program..same classname but different handle
    is there a way so if its not the one in view it sends to it instead of the one in view..thanks
    Well, you could just try to find the window title of the certain program.

    So, just do this:

    Code:
    // code above
    if(FindWindow("TheWindowYouWantToFind")){
    // enter hook code here
    }

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21