Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2005, 01:17 AM
Authorized User
 
Join Date: Aug 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change the scan code while posting WM_KEYDOWN/UP

Hello,

I am working with win32 serial communication in VC++. My application communicates with a Control Panel hardware device which is similar to a Keyboard. It has various keys/buttons (”0-9 digit keys, A-Y alphabet keys and F1,F2,F3 keys”) on it , and is connected through the serial port of the PC. My application has to capture which key/button is pressed and released on the Control Panel board. When a key/button is pressed or released on the Control Panel board, my application should post the appropriate message to the main handling application which is responsible for processing the Key Down and Key Up messages received from Control Panel board.

My application can find out the keys pressed or released on the Control Panel board. Now I need to post WM_KEYDOWN and WM_KEYUP messages when keys are pressed or released to the handling main application. But I should find a way to tell the handling main application, that the posted WM_KEYUP or WM_KEYDOWN message is from the Control Panel board and not from the Key board. The handling main application should be able to distinguish between the WM_KEYDOWN and WM_KEYUP messages from the Keyboard and the Control Panel board.

When I went through the MSDN,
http://msdn.microsoft.com/library/d.../wm_keydown.asp
I found that there is a field “Scan Code” in the lParam which is of use. I want to use this field to differentiate between messages of control panel buttons and keyboard keys.

But I need some more information on this:
1. Are scan codes for keyboards standardized?
2. If scan codes are standardized, where can I get a list of the unused scan code range so that I may use them for the control panel?
3. How can I set these scan codes while posting the messages trough code?

I am trying to search on google.com site for this information, but couldn’t get any useful link. I have never worked with this type of application and hence am unable to proceed further.

Can anyone please help me in this? It would be of great help to me if you can give me some links or information on this area?
Thanks in anticipation of information.

Madhavi.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Posting Code Rich57 Forum and Wrox.com Feedback 1 May 29th, 2008 08:10 AM
posting html code via a form php rage989 PHP How-To 1 September 12th, 2006 01:22 AM
Auto Scan aidah_abdul79 VB.NET 2002/2003 Basics 0 June 7th, 2006 08:36 PM
FYI: Specify VB or C# book/code when posting jminatel BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 May 1st, 2006 07:42 PM
Virus Scan koneruvijay VS.NET 2002/2003 0 February 24th, 2004 03:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.