Click here to Skip to main content
15,900,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I refuse to resize if a window is getting too big/small? Pin
Andrew Peace22-Aug-04 5:30
Andrew Peace22-Aug-04 5:30 
AnswerRe: How do I refuse to resize if a window is getting too big/small? Pin
PJ Arends22-Aug-04 5:57
professionalPJ Arends22-Aug-04 5:57 
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 
I'm trying to translate virtual key codes into strings. I've found that one can translate the virtual key code into a scan code, and then convert the scan code into a string using GetKeyNameText(). GetKeyNameText() works 90% of the time as I'd like. The other 10% confuses the user. For instance, Insert is translated into NUM 0 and Delete into NUM DECIMAL.

I can understand why as scan codes are the "ultimate truth". Since there may be more than one scan code per virtual key (there are two deletes on the keyboard since the AT-model), it has to choose one. I think it chooses the numeric key because of legacy (old XT-keyboards).

Anyway, does anyone know a good way to translate virtual keys into strings? Or do I have to do it manually? (Sigh | :sigh: )

[edit]I think I could specialize the translation for all keys which have doubles. The doubles are those which resides both on the numeric keyboard and the alphanumeric keyboard.[/edit]

(I am going to use the strings in menus to highlight accelerators, if that explains my problem any clearer)

--
...Coca Cola, sometimes war...
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 
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 

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.