Hey, Thanks for your reply, yep looks like the solution I found online isn't doing it, I'll try and add it in.
But my main question really is, how do I make all applications initiate a Copy with my system wide key hook? So when you're in word, you do Ctrl + Shift + C, and it will copy the selected text and then my application will receive this hot key message and I can read the clipboard. Thanks again for your help and everyone else. --Winston On Sat, Jan 15, 2011 at 4:08 PM, Noon Silk <[email protected]> wrote: > On Sat, Jan 15, 2011 at 4:05 PM, Winston Pang <[email protected]> wrote: >> Hey guys, >> >> Just trying to implement a system wide hot key for an app I'm doing, >> however something I'm not quite understanding, so I found some code >> that will register the hot key in my WPF app, and it's all fine works >> well, for example I'm implementing the Ctrl + Shift + C key combo, and >> basically, it's a special overloaded copy specific for my custom app >> only. However one thing I don't understand is, if someone was in >> Microsoft Word for example and pressed the Ctrl + Shift + C key combo, >> sure my app will get a message and I can respond to it, but it didn't >> actually copy the text from Word itself. >> >> So my question is, am I taking an incorrect approach to this? > > It's my understanding, depending on how you've implemented this (i.e. > calling the API I've listed below), that you should call the next hook > after you've done your work. From: > > http://msdn.microsoft.com/en-us/library/ms644990%28VS.85%29.aspx > > "Calling the CallNextHookEx function to chain to the next hook > procedure is optional, but it is highly recommended; otherwise, other > applications that have installed hooks will not receive hook > notifications and may behave incorrectly as a result. You should call > CallNextHookEx unless you absolutely need to prevent the notification > from being seen by other applications. " > > >> Thanks. >> >> --Winston > > -- > Noon Silk > > http://dnoondt.wordpress.com/ (Noon Silk) | http://www.mirios.com.au:8081 > > > "Every morning when I wake up, I experience an exquisite joy — the joy > of being this signature." >
