Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Several dialog boxes Pin
Maximilien17-Feb-05 10:21
Maximilien17-Feb-05 10:21 
GeneralRe: Several dialog boxes Pin
joy00717-Feb-05 13:37
joy00717-Feb-05 13:37 
GeneralTrap and remap a key for a specific application Pin
Berkelium17-Feb-05 4:47
Berkelium17-Feb-05 4:47 
GeneralRe: Trap and remap a key for a specific application Pin
RaajaOfSelf17-Feb-05 10:28
RaajaOfSelf17-Feb-05 10:28 
QuestionHow to truncate text at the beginning? Pin
Kribb17-Feb-05 4:35
Kribb17-Feb-05 4:35 
AnswerRe: How to truncate text at the beginning? Pin
David Crow17-Feb-05 6:10
David Crow17-Feb-05 6:10 
GeneralRe: How to truncate text at the beginning? Pin
Kribb17-Feb-05 11:46
Kribb17-Feb-05 11:46 
GeneralHooking &screening keyboard input - unique problem Pin
amg_developer17-Feb-05 2:54
amg_developer17-Feb-05 2:54 
I've searched through a lot of forums and found a lot of clues to my problem, but I'm still a bit in the dark about it. I need to screen keyboard input to determine if it is a valid sequence, or if it is a repeated entry. After doing some research, I decided that a system-wide hook may fit my needs. Here is an example of the specific problem I am trying to tackle:

Forklift drivers log onto their system (win xp tablet pc with an internet explorer based mainframe emulator) using a keyboard, then scan the loads they move. All of the input comes in through the keyboard, since the barcode scanner is spliced into the ps2 port. The problem is, if they are supposed to log on with '55555', and they enter '54556', the mainframe terminal lets them, and they don't get credit for doing any work until they log in correctly; or they may scan the same barcode twice in a row, creating a duplicate entry. I can't get to the mainframe app to add error checking and error messages, so I want to manipulate the input before it's posted to the terminal window, disregarding it and issuing an error message box so the forklift driver can enter the correct data.

I've done a lot of reading about hooks, and starting working on a low level keyboard hook (WH_KEYBOARD_LL) in a dll, and got it to work, although it doesn't do anything other than return success. I'm relatively new to Windows API programming, and I think I need a little bit of direction. Here is what I want to do:

Hold the data in some type of field (array, string, etc), and check it against a list of valid data. I suppose I could do this by checking the keydown event for vk_return, but then how would I erase the bad data from the terminal window? Can I hold all the data somewhere until enter is pressed, check it, then dump it or let it pass to the active window? I've read several articles and forum posts about this, but most of them have to do with trapping single keys. If there is a better way to accomplish this than a system wide hook, that's ok, since I'm trying to solve a problem more than learn a new technique. Any advice or thoughts would be helpful. Just ask if any further clarification is required. Thanks!Confused | :confused:
GeneralVisio 2000 in IE Pin
pankajdaga17-Feb-05 2:12
pankajdaga17-Feb-05 2:12 
Generalclasses and namespaces Pin
Alan Chambers17-Feb-05 1:29
Alan Chambers17-Feb-05 1:29 
GeneralRe: classes and namespaces Pin
Bob Ciora17-Feb-05 1:40
Bob Ciora17-Feb-05 1:40 
GeneralRe: classes and namespaces Pin
Alan Chambers17-Feb-05 1:50
Alan Chambers17-Feb-05 1:50 
GeneralRe: classes and namespaces Pin
digwizfox17-Feb-05 6:29
digwizfox17-Feb-05 6:29 
GeneralRe: classes and namespaces Pin
Mike Dimmick17-Feb-05 1:50
Mike Dimmick17-Feb-05 1:50 
GeneralRe: classes and namespaces Pin
Alan Chambers17-Feb-05 1:58
Alan Chambers17-Feb-05 1:58 
GeneralRe: classes and namespaces Pin
toxcct17-Feb-05 9:09
toxcct17-Feb-05 9:09 
GeneralRe: classes and namespaces Pin
«_Superman_»17-Feb-05 2:26
professional«_Superman_»17-Feb-05 2:26 
GeneralMenu handle from the floating menu bar Pin
Vaibhav Sanghavi17-Feb-05 1:02
Vaibhav Sanghavi17-Feb-05 1:02 
GeneralRe: Menu handle from the floating menu bar Pin
«_Superman_»17-Feb-05 4:20
professional«_Superman_»17-Feb-05 4:20 
GeneralRe: Menu handle from the floating menu bar Pin
Anonymous20-Feb-05 18:45
Anonymous20-Feb-05 18:45 
GeneralRe: Menu handle from the floating menu bar Pin
Vaibhav Sanghavi20-Feb-05 18:51
Vaibhav Sanghavi20-Feb-05 18:51 
GeneralRe: Menu handle from the floating menu bar Pin
Vaibhav Sanghavi20-Feb-05 18:56
Vaibhav Sanghavi20-Feb-05 18:56 
Generalautocad automation with VC++ Pin
Ajesh.P.S17-Feb-05 0:48
Ajesh.P.S17-Feb-05 0:48 
GeneralRe: autocad automation with VC++ Pin
Aza17-Feb-05 1:31
Aza17-Feb-05 1:31 
GeneralExcel COM from C++ Pin
MJWhiteman217-Feb-05 0:47
MJWhiteman217-Feb-05 0:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.