Click here to Skip to main content
15,914,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBrowsing for Named Pipes Pin
Bram van Kampen22-Sep-08 15:44
Bram van Kampen22-Sep-08 15:44 
QuestionPrevent resizing taskbars Pin
AeJai22-Sep-08 13:01
AeJai22-Sep-08 13:01 
QuestionGetting VC6 code to compile on VS2008 Pin
Ylno22-Sep-08 12:09
Ylno22-Sep-08 12:09 
AnswerRe: Getting VC6 code to compile on VS2008 Pin
Wes Aday22-Sep-08 12:49
professionalWes Aday22-Sep-08 12:49 
AnswerRe: Getting VC6 code to compile on VS2008 Pin
Mark Salsbery22-Sep-08 12:53
Mark Salsbery22-Sep-08 12:53 
AnswerRe: Getting VC6 code to compile on VS2008 Pin
David Crow22-Sep-08 16:57
David Crow22-Sep-08 16:57 
AnswerRe: Getting VC6 code to compile on VS2008 Pin
Hamid_RT22-Sep-08 18:53
Hamid_RT22-Sep-08 18:53 
Questiontypedef enum Pin
feanorgem22-Sep-08 11:30
feanorgem22-Sep-08 11:30 
AnswerRe: typedef enum Pin
Saurabh.Garg22-Sep-08 15:01
Saurabh.Garg22-Sep-08 15:01 
GeneralRe: typedef enum Pin
feanorgem22-Sep-08 17:55
feanorgem22-Sep-08 17:55 
QuestionVC++ _ Application Terminated in unusual way Pin
balu1234522-Sep-08 9:17
balu1234522-Sep-08 9:17 
AnswerRe: VC++ _ Application Terminated in unusual way Pin
Saurabh.Garg22-Sep-08 15:04
Saurabh.Garg22-Sep-08 15:04 
AnswerRe: VC++ _ Application Terminated in unusual way Pin
Hamid_RT22-Sep-08 18:55
Hamid_RT22-Sep-08 18:55 
GeneralRe: VC++ _ Application Terminated in unusual way Pin
balu1234522-Sep-08 19:10
balu1234522-Sep-08 19:10 
GeneralRe: VC++ _ Application Terminated in unusual way Pin
Hamid_RT22-Sep-08 19:36
Hamid_RT22-Sep-08 19:36 
GeneralRe: VC++ _ Application Terminated in unusual way Pin
balu1234514-Oct-08 7:13
balu1234514-Oct-08 7:13 
GeneralRe: VC++ _ Application Terminated in unusual way Pin
Hamid_RT14-Oct-08 8:20
Hamid_RT14-Oct-08 8:20 
QuestionConverting virtual key codes to ASCII Pin
hxhl9522-Sep-08 7:26
hxhl9522-Sep-08 7:26 
Hey everyone,

I'm writing an application in which I need to convert an input of virtual key codes to an ASCII output. Currently I have something like this:

if (logchar>0x40 && logchar<0x5a){
		if ((shiftKeyDown==FALSE && capslockKeyDown==FALSE) 
			|| (shiftKeyDown==TRUE && capslockKeyDown==TRUE)) logchar+=0x20;
	}
	else if (logchar>=0x30 && logchar<0x40 && shiftKeyDown==TRUE){
		switch(logchar)
		{
		case 0x31:
			logchar='!';
			break;


logchar contains the virtual key code.

So far, I've successfully implemented the alphabet. Unfortunately, I can't convert other symbols like ,./<>?;':"[]{} etc. I have absolutely no idea what logchar would equal if the input is a key like ~ or |. If anyone could give me a list of the virtual key codes for each key on the keyboard that would be appreciated.

And if there is any other function that would make this easier that would also be appreciated. I'm doing everything with switch and if/else statements and it's getting quite messy.

Thanks in advance.
AnswerRe: Converting virtual key codes to ASCII Pin
James R. Twine22-Sep-08 7:38
James R. Twine22-Sep-08 7:38 
GeneralRe: Converting virtual key codes to ASCII [modified] Pin
hxhl9522-Sep-08 18:30
hxhl9522-Sep-08 18:30 
AnswerRe: Converting virtual key codes to ASCII Pin
Cedric Moonen22-Sep-08 7:39
Cedric Moonen22-Sep-08 7:39 
GeneralRe: Converting virtual key codes to ASCII Pin
hxhl9522-Sep-08 18:26
hxhl9522-Sep-08 18:26 
AnswerRe: Converting virtual key codes to ASCII Pin
Rajesh R Subramanian22-Sep-08 21:04
professionalRajesh R Subramanian22-Sep-08 21:04 
GeneralRe: Converting virtual key codes to ASCII Pin
hxhl9523-Sep-08 18:39
hxhl9523-Sep-08 18:39 
GeneralRe: Converting virtual key codes to ASCII Pin
Rajesh R Subramanian24-Sep-08 20:02
professionalRajesh R Subramanian24-Sep-08 20:02 

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.