Matt Jacobs
I can't really answer your question other than that I think that
it's not possible to get keys sent to DOS apps.
What I's like to know is why my program that uses a SetWindowsHookEx
for WH_GETMESSAGE works when I compile it using MS' 16bit compiler,
but not when I (after porting it to work with VC++ 4.2) compile it
for 32bit. I haven't changed the SetWinHookEx line and I checked
the docs to make sure that the function still works the same (which
it does more or less).
Does anybody have a working example of a VC++ 4.x project that
implements a system-wide hook? I would appreciate a copy or at
least a piece of it. ;-)
Thanks
- Tako
--
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/_/ Tako Schotanus /_/
/_/ mailto: quin...@xs4all.nl /_/
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
This post caught my eye as I'm trying to find out if it's possible
(under Windows 3.1 or 95) to work with "simutanious" keystrokes. In
other words pressing more than one AnphaNumeric key at a time!
I did it in Dos based C but it's timing sensitive and relies on reading
straight from the ports. I now need a windows version.
Any ideas or pointers on this would be a great help.
Thanks
Gerry
This only works under Windows 95, under Windows 3.1, I had to modify the Keyboard driver, VKD.386
to achieve the same result.
Dave Myers.
>What I's like to know is why my program that uses a SetWindowsHookEx
>for WH_GETMESSAGE works when I compile it using MS' 16bit compiler,
>but not when I (after porting it to work with VC++ 4.2) compile it
>for 32bit. I haven't changed the SetWinHookEx line and I checked
>the docs to make sure that the function still works the same (which
>it does more or less).
>
>Does anybody have a working example of a VC++ 4.x project that
>implements a system-wide hook? I would appreciate a copy or at
>least a piece of it. ;-)
Make suer that your proc is in a sperate DLL as in 16 bit it was all
easy as everything was shared but in 32 bit the Proc has to be mapped
into the address space of all processes and therefore must live in a
DLL and you must be very carefull with you data and use GLOBAL
EXPORTED data if you want all instances of your proc to share data.
>
>Thanks
> - Tako
>
>
>--
>/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>/_/ Tako Schotanus /_/
>/_/ mailto: quin...@xs4all.nl /_/
>/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Darryn Davis
Darry...@cit.com.au
>Hi there,
>
>This post caught my eye as I'm trying to find out if it's possible
>(under Windows 3.1 or 95) to work with "simutanious" keystrokes. In
>other words pressing more than one AnphaNumeric key at a time!
>
>I did it in Dos based C but it's timing sensitive and relies on reading
>straight from the ports. I now need a windows version.
You are notified whenever the keys are pressed with WM_KEYDOWN
messages, and when they go up whit WM_KEYUP messages. If you want to
get the state of a key, use GetKeyState or GetAsyncKeyState. There's
no restriction on the number of keys that can be held down at once.
---
Robert Mashlan R2M Software rmas...@r2m.com
Internet Resources for Windows Developers http://www.r2m.com/windev/