How to change the scan code while posting WM_KEYDOWN and WM_KEYUP messages?


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,
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

I am trying to search on 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. 


lmadhavi (10)
2/3/2005 5:21:29 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 1

>I am trying to search on site for this information, but
>couldn't get any useful link

Try here:

davidl7375 (2060)
2/3/2005 7:54:12 AM

Similar Artilces:

coding a UI like Windows media Player in vc++
hi there i am writing an app which involves the management of digital stills and audio, and writing it in vc++6 i will use wmp to play audio, and i may have to write a custom skin just a general qst - what api/sdk is best to use to get that cool ui that microsoft have in wmp - ie, non-regular buttons etc cheers bhu ...

Is there a way I can only print the reply instead of the entire email message
I wonder if there is a way I can only print the reply to an email message, instead of printing the entire message? My choice for selection only seem to be gone with Outlook 2003 printing options. Any help is appreciated.............Peter ...

Change only size of a thumb (CSliderCtrl)
When I extend size of CSliderCtrl, size of a thumb also grows as same ratio. Is there anyway to change size of thumb independently? i think they are bound together. The only way to do that is, you derive a your own sliderctrl, and do the draw work by yourself. ...

Error message in Outlook Express
My question is regarding Outlook Express (I couldn't find a separate newsgroup for it hence posting it in the Outlook newsgroup). Every time I open Outlook Express I get an error message that says "Msnmsgr has caused an error in <unkwown>. Msnmsgr will now close. If you continue to experience problems, try restarting your computer." I have disabled "Automatically log on to Windows Messenger" feature in the Tools-Options-General tab. What else can I do to get rid of this error message everytime I open Outlook Express? Thanks for your time. Here is the l...

Change IP Address of passive node in CCR
We have a CCR cluster on Windows Server 2008. The cluster is formed over a stretched subnet. Setup is as follows: Node01 - and Node02 - and We need to move Node02 to a new building which involves changing the IP addresses. Anyone got some help or assistance on doing this? Any gotchas to look out for? Appreciate your advice. ...

Outlook replication changes valid email to lastname firstname
CRM 4.0, Outlook 2007, CRM Outlook Online Client with latest Rollup. When some users are sync contact information between Outlook and CRM, sync changes email address in CRM to format lastname firstname. Not happen to all users. One reason can be there are also mobile sync between Outlook (Exchange) and mobile phone. But this is also used by many users and only some have problems. It is look like email is populated with Outlook display value, not the real email. Any ideas what setting (and where) is not right? Jukka Majander ...

Hello, Is there an IDE which hast something like code-completition? eg. If I type Set objShell = CreateObject("Shell.Application") and then: objShell. (point) then all the possible values/methods,props, etc. will be schown? Does anybody knows such an IDE? The VB Express 2k8 doesn't work with VB Scripts. Thomas "Thomas Steinbach" <> said this in news item news:hi2d8h$j8s$01$ > Hello, > > Is there an IDE which hast something like code-completition? > eg. If I type > >...

Change subform from a subform
I have a form named frmToday with a subform named frmMyView. The default subform for frmMyView is frmCalls. I change this with a button by using a private Sub routine Forms!frmTODAY!frmMYVIEW.Form.SourceObject = "frmDupes." I have a button on frmDupes with Forms!frmTODAY!frmMYVIEW.Form.SourceObject = "frmCalls" as a Private Sub routine. The intent is to change back to the original setup. It doesn't work. What do I need to do? Thanks! ...

Changing Inventory Item Types #2
In GP7.5, is there any way to change inventory item types once they have been used? Can the item be deleted and then recreated at the end of a year? Are there any utility programs that can do this? In particular, I've got some "sales inventory" items that I want to convert to "kits" and others that need to be "services" We are on 8.0, but I don't think it is possible to change the item type - not even with Professional System Tools. We have changed the item name (via tools) to include the word Discontinued. Then we set up a new item to repl...

Excel VB Code Error
I am trying to create a .csv file from an Excel workbook using a VB module and am wondering if someone can tell me what's wrong with the below code: Public Sub CSV2() Application.DisplayAlerts = False Sheets.Add ActiveSheet.Name = "Temp_10001" For Each ws In Worksheets If ws.Name <> "Temp_10001" Then ws.UsedRange.Copy Sheets("Temp_10001").Range("A1").Activate x = ActiveSheet.UsedRange.Rows.Count If x > 1 Then ActiveCell.Offset(x, 0).Select ActiveCell.PasteSpec...

during install, E2007, Error Code is 1603 (exchangeserver.msi) failed
Installing E2007 on a server to migrate from E2003, the BPA shows no issues, we get no warnings in the setup, but, when it starts to COPY FILES we get the following: Installing product C:\Exchange 2007\exchangeserver.msi failed. Fatal error during installation. Error code is 1603. Last error reported by the MSI package is 'Module D:\Exchange\Bin\ExSMime.dll failed to register. HRESULT -2147010895. Contact your support personnel.'. I've copied the media to the C drive (we're installing E2007 on the "D" drive array, and run it from C or the CD/DVD, b...

Replication Message (Ver 5.5.1960)
Hi, We have an Exchange 5.5 organization with 6 sites. The sites are connected by an Exchange server that has X400 Connectors. In this server, Messages with subject:"Replication Message (Ver 5.5.1960)" fill the DS mailbox and then this result in problem. Problem is that changes are not replicated but mailing is working. When I noticed, the mailbox had more than 150000 items and then I deleted all messages. After that the replication started working. But the same problem happened a few days later and I solved it in the same way. But this repeates and I can't find any perm...

Changing row height in a CListCtrl
Hello, I'm trying to change the row height of a list control by means of a slider. Currently, we're doing that by changing the font height. This works perfectly, except for one thing: The font actually changes as well (d'uh). For the items itself it's not really a huge issue, I'm using custom draw and can set the font height to a "fixed" value. But I can't do that for the headers. Is there perhaps another way to change the row height of a list control, or is changing the font height the only way to do it? Thanks, -- Maarten Kools ___________________...

Refresh pivot chart when info in a cell changes
To all, I am looking for help with a Macro. What I ultimately want to do is refresh a pivot chart when the user makes a selection from a list (in a data validation cell). For example, I am an end user that selects my territory from a "drop down". The pivot chart will update to the information that is directly related to my territory. Thanks in advance for your help. Excel 2007, PivotTable With Table dependent drop-downs instead of data validation drop-downs. With non-event-driven macros. ...

External smtp email to public folder shown as post, not shown as email
Hi there, Exch2003 FE & BE servers, both running on w2k3 server, BE server also a DC & GC server. Now config public folder at BE, mail enabled it. For internal users, if sent email to public folder, it shown up as email. For external parties, if sent email to public folder, it shown up as post. Wondering how to tweak public folder so that external emails will shown as email instead of post? Many thanks! Try looking at the following KB: Martin Moustgaard "Zac" <> skrev i en meddelelse news:Og20iL...

Converting Eml files to Msg files with code
Hi. Sorry if this question is overly simple. I'm developing an integration project between Exchange and SPS. I read the message on a public folder of Exchange with ADO. I use ADO's stream object and save the message as a file. Created file formatted as .EML file and has .EML extension. We want to read this file in Outlook but it can't open the file. Because of this I need to format this file as .MSG file. I don't need a tool. I should make this process in code. Is there any API or code sample. Thanks in advance. ...

Publish Form Changes without restarting IIS?
Is there another way to publish form changes without restarting IIS? We run a 24x7 IT shop and taking down a production system for every change is a pain. thank you. Mike Presumably as you are 24/7 you have multiple CRM servers, so you only need to IISRESET one CRM server at a time, thus users will not notice any loss of service "BWIT" <> wrote in message news:ObSXFVvWFHA.4036@TK2MSFTNGP10.phx.gbl... > Is there another way to publish form changes without restarting IIS? We > run a 24x7 IT shop and taking down a production system for every chang...

How do you change the formatting for envelops in the normal templ.
the envelop paragraph formatting is 1.15 and 10 pt at end - this is not what I want - How do I change it to be single and 0 pts for all documents based on the normal template? Modify (or reset) the Envelope Address style, which by default does not have these characteristics. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA "dcluchi" <> wrote in message > the envelop paragraph formatting is 1.15 and 10 pt at e...

Truncated incoming messages
I send email to an Outlook Express user in Canada. Often, unless I'm sending in plain text instead of HTML, parts of my message to her are truncated, dropping of ends of paragraphs, etc. Any idea why this happens and if there's a setting to rectify this? ...

Flagged message in DRAFTS folder is automatically "complete"
I'm trying to flag messages in my Outlook 2003 Drafts folder aso they show up in "For Follow Up" and I remember to complete them. Unfortuantely the flag is automatically set to complete and cannot be changed in the right click menu Igrayed out). Does anyone have a solution for this? Hmmm... It works here. Are you using a pst or Exchange account? Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http:...

Change Hyperlink Destination Folder
In an Excel 2002 worksheet I need to change the destination folder in a column (750 rows) of hyperlinks. For example: file:///C:\Documents and settings\myname\Application Data\Microsoft\Data\12345.mht needs to be changed to file:///E:\My Documents\Travel\2005\Data\12345.mht file:///C:\Documents and settings\myname\Application Data\Microsoft\Data\56789.mht changed to file:///E:\My Documents\Travel\2005\Data\56789.mht All the ".mht" files are now in the folder E:\My Documents\Travel\2005\Data\ TIA Why don't you do a find and replace. Replace it with some...

Excel 2007 chart color change based on the label.
I have 12 charts 1 for each person and the data changes every week and some of the values have 0 so are filtered out. On the chart I want 0-15 to be blue, 16-30 to be light purple, 31-60 to be a cream color, 61-90 to be light blue, and 90+ to be dark purple. With the code below I can change the color if I take the if statement out but I would like to change the color based on the label. I have tried several things like .text, .name, and .label. I just can't fine the right name. Name1 0-15 1 61-90 1 90+ 3 Name 2 0-15 14 16-30 5 31-60 1 61-90 6 90+ 12 For i = 1 To A...

Simple coding in Excel
I have created a series of forms which go from one to another via a macro, which is simply: Sheets("Implementation").Select DialogSheets("Implementation").Show (created by record macro). There are two issues: 1. This same code does not work when assigned to auto_macro for the first form? 2. After moving to subsequent forms, the previous forms are visible (but not accessible) in the background. This just looks untidy and I would like a command to close them. Many thanks Have you tried? Sheets("Sheet Name").Visible = True Sheets("Sheet N...

Exchange 2000 Instant Messaging Server not working properly
After I upgrade my windows enviroment from 2k to 2k3.The exchange enviroment is still in Exchange 2000 native mode. But my Instant Messaging Server start having problem. User can not login into the services intermitantly. Is there any solution or explaination for this? ...

"Message Tracking Center" showing incorrect time #3
I have applied all of the DST patches for the OS and Exchange Server. OS is Server 2003 Standard (latest patches) and Exchange 2003 Standard (latest patches). I noticed today that when I go into the "message tracking center" teh defult end log time is one hour ahead of the computer time. Also, all of the sent times being tracked are showing as being sen one hour in the future. (i.e. real time is 3:00 PM, messages in tarckign center show having been sent at 4:00 PM). Any ideas? Thanks, Bob I don't have an answer, but I'm seeing the same thing on my system. "Bob...