Re: [PATCH] Add definitions to winuser.h
"Luke Dunstan" <[email protected]>
| Newsgroups | gmane.comp.gnu.mingw.patches |
|---|---|
| Message-ID | <[email protected]> |
----- Original Message ----- From: "Earnie Boyd" <earnie_boyd-/[email protected]> To: "Luke Dunstan" <[email protected]> Cc: "Danny Smith" <[email protected]>; "Casper Hornstrup" <[email protected]>; <[email protected]> Sent: Wednesday, June 19, 2002 7:22 PM Subject: Re: [MinGW-patches] [PATCH] Add definitions to winuser.h > Luke Dunstan wrote: > > > > > > > > #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. > > > > So we could `#define VK_0 VkKeyScan(_T('1'))' and be safe. > > Earnie. > That might cause more confusion if people use them in certain places (e.g. "case VK_0:" in a switch). I think it would be better to not define them, like we are doing now. If Wine needs them for some reason we should figure out why, and if it can't be avoided, maybe add them in a different header or in a conditional section. Luke ------------------------------------------------------- Bringing you mounds of caffeinated joy >>> http://thinkgeek.com/sf <<<