![]() |
|
#1
|
|||
|
|||
Can't get WH_CBT to work rightSo I've a simple window program that starts up and hooks to a dll, (I'll try only post relevant parts)
Window and calling the DLL: CPP / C++ / C Code:
DLL side: CPP / C++ / C Code:
All of this compiles and runs as expected, barring CBT, obviously. I know this because I can have my app running as a taskbar tray icon only and get a cout of window names to my console. From the CBTProc, I get nothing, no matter what I've tried to do, I've not been able to get it to print out unless the mouse is within it's own process, then if I resize, or move, or whatever, it works like I want it to. I've read through quite a few forum posts, from here and other places and there are some who think CPP / C++ / C Code:
Am I doing something elementary that is preventing it to work, or is my whole approach wrong? Would I need to go down the route of injecting my DLL into processes (I've not succeeded in this yet, either, but if I need to I'll incorporate that)? All I want is to listen for window opening and closing, to get a handle of a particular window and only run when that's open, then if / when that closes, I want my app to close too. Thank you all for any help that you could give me. |
|||
|
#2
|
|||
|
|||
Re: Can't get WH_CBT to work rightsorry to bump, but is there anyone with an idea as to where I'm going wrong? I'm really stuck with this one.
fyi, for anyone reviewing my code, read wParam for *_wParam and lParam for *_lParam, that was a mistake in my condensing for the post. |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Work at home. English proofreader needed. $14.50/hour | cascade_soft | Member Announcements, Advertisements & Offers | 0 | 05-Jun-2006 01:29 |
| Random access files | Krazy_yA | C Programming Language | 6 | 07-May-2006 02:44 |
| How do web redirection scripts work? | rhino1616 | Web Design Forum | 9 | 27-Oct-2003 10:47 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The