Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCreating new database Pin
Alex Che22-Aug-04 1:27
Alex Che22-Aug-04 1:27 
GeneralFor MySQL Pin
Ivan Cachicatari22-Aug-04 2:10
Ivan Cachicatari22-Aug-04 2:10 
GeneralRe: Creating new database Pin
PJ Arends22-Aug-04 11:29
professionalPJ Arends22-Aug-04 11:29 
GeneralAbout MySQL connection Pin
Ivan Cachicatari23-Aug-04 7:50
Ivan Cachicatari23-Aug-04 7:50 
GeneralxDirectx Programming in VC++ Pin
JohnExalt22-Aug-04 1:24
JohnExalt22-Aug-04 1:24 
GeneralTranslating virtual key codes into human readable format Pin
Jörgen Sigvardsson22-Aug-04 1:16
Jörgen Sigvardsson22-Aug-04 1:16 
GeneralRe: Translating virtual key codes into human readable format Pin
PJ Arends22-Aug-04 5:49
professionalPJ Arends22-Aug-04 5:49 
GeneralRe: Translating virtual key codes into human readable format Pin
Jörgen Sigvardsson22-Aug-04 6:49
Jörgen Sigvardsson22-Aug-04 6:49 
PJ Arends wrote:
Not that it helps you any, but I think the problem is with your keyboard driver. According to MSDN the driver maintains a list of the key names, and GetKeyNameText gets the names from the driver.

Yeah, provided that I give it the correct scan code. I think the problems lies in that I am reading an accelerator table. In the accelerator table I have virtual key codes only. Since there may be n scan codes for every virtual key code, the keyboard driver/win32 kernel has to guess. I think it just picks an arbitrary scan code which matches the virtual key code. What else could it do? Unsure | :~


PJ Arends wrote:
I think you could do it manually for your keyboard, but then you will probably run into problems when your users use a different make and/or model of keyboard from what you are using.

I'm doing both sort of. For every key which there is a 1:1 mapping between "physical" key and "virtual" key, I use GetKeyNameText() on the scan code which MapVirtualKeyEx() gives me. It's smart enough to take my locale into consideration (I have an english version of XP, but it gives me swedish names as that is my locale/regional settings).

For other keys, such as Delete, Insert, et al, which there is an n:1 mapping, I am translating the virtual key code myself rather than the scan code. I think it's weird that the Win32 API doesn't offer (not that I can see anyway) a function to do this for me.

Oh well, the menus are rendering nicely now, without full help from Microsoft. Cool | :cool:

--
...Coca Cola, sometimes war...
GeneralRe: Translating virtual key codes into human readable format Pin
PJ Arends22-Aug-04 11:21
professionalPJ Arends22-Aug-04 11:21 
GeneralRe: Translating virtual key codes into human readable format Pin
Jörgen Sigvardsson22-Aug-04 11:30
Jörgen Sigvardsson22-Aug-04 11:30 
GeneralRe: Translating virtual key codes into human readable format Pin
PJ Arends22-Aug-04 12:13
professionalPJ Arends22-Aug-04 12:13 
GeneralRe: Translating virtual key codes into human readable format Pin
Jörgen Sigvardsson22-Aug-04 12:15
Jörgen Sigvardsson22-Aug-04 12:15 
GeneralRe: Translating virtual key codes into human readable format Pin
PJ Arends22-Aug-04 12:28
professionalPJ Arends22-Aug-04 12:28 
GeneralRe: Translating virtual key codes into human readable format Pin
Jörgen Sigvardsson22-Aug-04 12:30
Jörgen Sigvardsson22-Aug-04 12:30 
GeneralRe: Translating virtual key codes into human readable format Pin
Jörgen Sigvardsson23-Aug-04 10:19
Jörgen Sigvardsson23-Aug-04 10:19 
GeneralGetModuleHandle Problem Pin
Abin22-Aug-04 0:50
Abin22-Aug-04 0:50 
GeneralRe: GetModuleHandle Problem Pin
Blake Miller30-Aug-04 7:05
Blake Miller30-Aug-04 7:05 
GeneralDirectShow error Pin
Andre Massada21-Aug-04 22:37
Andre Massada21-Aug-04 22:37 
GeneralWSB_PROP_PALETTE Pin
Franc Morales21-Aug-04 20:09
Franc Morales21-Aug-04 20:09 
GeneralRe: WSB_PROP_PALETTE Pin
Junaij21-Aug-12 19:46
Junaij21-Aug-12 19:46 
Generalvisual studios 6.0 question Pin
Tyrus18221-Aug-04 18:22
Tyrus18221-Aug-04 18:22 
GeneralRe: visual studios 6.0 question Pin
Ravi Bhavnani21-Aug-04 18:35
professionalRavi Bhavnani21-Aug-04 18:35 
GeneralRe: visual studios 6.0 question Pin
Tyrus18221-Aug-04 18:44
Tyrus18221-Aug-04 18:44 
GeneralRe: visual studios 6.0 question Pin
Ravi Bhavnani21-Aug-04 18:47
professionalRavi Bhavnani21-Aug-04 18:47 
GeneralRe: visual studios 6.0 question Pin
cmk22-Aug-04 16:00
cmk22-Aug-04 16:00 

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.