Re: [PATCH] Add definitions to winuser.h
Earnie Boyd <earnie_boyd-/[email protected]>
| Newsgroups | gmane.comp.gnu.mingw.patches |
|---|---|
| Message-ID | <[email protected]> |
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.
----------------------------------------------------------------------------
Bringing you mounds of caffeinated joy
>>> http://thinkgeek.com/sf <<<