Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Virtual key to character translation (Windows API)

Reply
Thread Tools

Virtual key to character translation (Windows API)

 
 
lolzy@live.nl
Guest
Posts: n/a
 
      08-21-2011
On 21 aug, 21:00, Keith Thompson <(E-Mail Removed)> wrote:
> (E-Mail Removed) writes:
>
> [...]
>
> > I will ask this in a windows group, you are totaly right.

>
> Probably comp.os.ms-windows.programmer.win32.
>
> > LPWORD is a pointer to void thats contains a string, in this case with
> > a maximum size of 3 characters (2 chars + \0).

>
> Actually it's a pointer to a WORD, where a WORD is a typedef for
> unsigned short (which is 16 bits under Windows). *Windows makes heavy
> use of UTF-16 for character data. *If you're setting an LPWORD to point
> to a 3-byte object, you're probably doing something wrong. *(C experts
> can tell you why it's wrong; Windows experts can tell you how to do it
> right.)
>
> > * * * * * * * * * * * * * * * * * ** * * * * *Also putc() expect just
> > 1 argument, its a macro:

>
> > #define putc(x) fputc(x, stdout)

>
> Incorrect, putc() takes two arguments. *putchar() takes one. *(I *hope*
> nobody has redefined putc() as a macro taking 1 argument.)
>
> --
> Keith Thompson (The_Other_Keith) (E-Mail Removed) *<http://www.ghoti.net/~kst>
> Nokia
> "We must do something. *This is something. *Therefore, we must do this."
> * * -- Antony Jay and Jonathan Lynn, "Yes Minister"


I am sorry, mixed up with putchar() haha. Thank you very much for your
anwsers!
 
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
How do I find the virtual key code for a certain key? Ikke C++ 4 08-19-2009 09:51 PM
Getting and Setting key character in key event Jeff Javascript 4 08-21-2007 01:28 PM
Convert virtual key to actual character lakepeir@yahoo.com C++ 3 06-09-2006 04:14 AM
Replace Tab Key to Return Key (Enter Key) from Web Forms? M P ASP General 1 08-06-2004 08:32 AM



Advertisments