Is there any way at all in which i can have a program find a right click even if any other program is open and active without using a dll file?
Printable View
Is there any way at all in which i can have a program find a right click even if any other program is open and active without using a dll file?
do you know the name of the window (title)?
No..... because to do this you need a global-systemwide hook......with this, an item of code (that you design) is run by a thread before the message is dispached to a WndProc...Quote:
Originally posted by canine
Is there any way at all in which i can have a program find a right click even if any other program is open and active without using a dll file?
Therefore to offer this code to the OS to allow it to be used, it must be housed in a seperate module.....which is best done with a dll
ok but is there much more complications with handling that dll
Yes & no :)......depends on what you want to do.....Quote:
Originally posted by canine
ok but is there much more complications with handling that dll
Sorry to be vague, but its not very easy to answer
I basicly just want some code to be executed when a right click is pressed anywhere
Well what's the issue with having a DLL?
From MSDN under SetWindowsHookEx()Quote:
Originally posted by -KEN-
Well what's the issue with having a DLL?
Quote:
The system hooks are a shared resource, and installing one affects all applications. All system hook functions must be in libraries.
Look on my site....under "remote keyboard hook" there's a little prog I wrote to read all keystrokes and relay them to a server.....Quote:
Originally posted by canine
I basicly just want some code to be executed when a right click is pressed anywhere
Your code would be simpler....
uh fordy this may sound stupid but i have never used a dll your example int the source of the dll and some time made it seem not so hard
but when i try to compile my dll it says declaration santax error at DLLExport int Set Globals and then for some reason displays the code #define DLLExport extern "C" __declspec(dllexport) this was written at the top i know.
I have absolutely no idea what any of it means so if u have any ideas they wouyld be appreciated
uh scratch that last post i cant get any of it to work. i know a full example is asking a lot but i have no other ideas.