Re: [PATCH] Add definitions to winuser.h
"Luke Dunstan" <[email protected]>
| Newsgroups | gmane.comp.gnu.mingw.patches |
|---|---|
| Message-ID | <[email protected]> |
----- Original Message ----- From: "Danny Smith" <[email protected]> To: "Casper Hornstrup" <[email protected]>; <[email protected]> Sent: Wednesday, June 19, 2002 8:10 AM Subject: Re: [MinGW-patches] [PATCH] Add definitions to winuser.h > > ----- Original Message ----- > From: "Casper Hornstrup" <[email protected]> > > > > Index: include/winuser.h > > =================================================================== > > RCS file: /cvsroot/mingw/w32api/include/winuser.h,v > > retrieving revision 1.16 > > diff -b -u -r1.16 winuser.h > > --- include/winuser.h 14 Jun 2002 11:44:47 -0000 1.16 > > +++ include/winuser.h 15 Jun 2002 12:33:01 -0000 > > @@ -1587,6 +1587,42 @@ > > #define VK_INSERT 45 > > #define VK_DELETE 46 > > #define VK_HELP 47 > > +#define VK_0 48 > ==snip== > > +#define VK_Z 90 > > Hard coding VK_0-VK9 and VK_A-VKZ as per classic C-locale table okay as > long as we stick to C-locale, but I'm not sure how it will affect other > locales/keyboards. Would it be safer to define like > > #define VK_0 '0' > #define VK_1 '1' > etc. > > maybe it doesn't matter, but a report to mingw-users said that MS header > does not define these at all. > > Danny Correct, the MSVC 6 headers do not define them, and contain only a comment in winuser.h about VK_A to VK_Z being equivalent to the ASCII character codes. I don't know much about it but I think that virtual key codes should be defined as numbers because they should be the same for all applications. After a brief look at the docs, I think that a program that needs the virtual key code for character '1' should use VkKeyScan(_T('1')), not VK_1. Luke Dunstan ---------------------------------------------------------------------------- Bringing you mounds of caffeinated joy >>> http://thinkgeek.com/sf <<<