Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Convert virtual key to actual character

Reply
Thread Tools

Convert virtual key to actual character

 
 
lakepeir@yahoo.com
Guest
Posts: n/a
 
      06-08-2006
Hello,

I'm trying to convert the virtual key received from a
MSG_WM_LBUTTONDOWN message to the keyboard equivalent character (a,b,c,
etc). in the OnLButtonDown method.

Thanks!

 
Reply With Quote
 
 
 
 
phlip
Guest
Posts: n/a
 
      06-08-2006
lakepeir wrote:

> I'm trying to convert the virtual key received from a MSG_WM_LBUTTONDOWN
> message to the keyboard equivalent character (a,b,c, etc). in the
> OnLButtonDown method.


Don't do that. Either handle WM_CHAR, and let Win32 process the keystrokes
for you, or get a control that already does whatever you are trying to do.

Going forward, this newsgroup is not qualified to discuss the Win32
libraries. Try news:microsoft.public.vc.language for C++ topics, and a
Win32 GUI programming group for the low-level topics.

--
Phlip

 
Reply With Quote
 
 
 
 
lakepeir@yahoo.com
Guest
Posts: n/a
 
      06-08-2006
The OnLButtonDown() take two parameters and neither is a WM_CHAR.
phlip wrote:
> lakepeir wrote:
>
> > I'm trying to convert the virtual key received from a MSG_WM_LBUTTONDOWN
> > message to the keyboard equivalent character (a,b,c, etc). in the
> > OnLButtonDown method.

>
> Don't do that. Either handle WM_CHAR, and let Win32 process the keystrokes
> for you, or get a control that already does whatever you are trying to do.
>
> Going forward, this newsgroup is not qualified to discuss the Win32
> libraries. Try news:microsoft.public.vc.language for C++ topics, and a
> Win32 GUI programming group for the low-level topics.
>
> --
> Phlip


 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      06-09-2006
lakepeir wrote:

> The OnLButtonDown() take two parameters and neither is a WM_CHAR.


Please learn a little SDK architecture. Messages start as integers, before a
library such as MFC wraps them in methods. WM_CHAR probably drives OnChar().
Use that, with help from an on-topic forum.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert string with control character in caret notation to realcontrol character string. Bart Vandewoestyne C Programming 8 09-25-2012 12:41 PM
Virtual key to character translation (Windows API) lolzy@live.nl C Programming 10 08-21-2011 07:09 PM
Convert an Character to the ASCII Character Code John Gregory Ruby 0 07-05-2009 10:32 PM
check and convert lower character to upper character alessio211734@yahoo.it C++ 3 11-18-2007 11:28 AM
Getting and Setting key character in key event Jeff Javascript 4 08-21-2007 01:28 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57