How to Use ToAscii() in Eastern European WindowsLast reviewed: January 15, 1998Article ID: Q123072 |
3.10
WINDOWS
kbinterop kbprg
The information in this article applies to:
SUMMARYKEYBOARD.DRV in Eastern European versions of Windows version 3.1 has additional virtual keys. The ToAscii() function is modified in these versions of Windows to support the dual mode keyboard driver.
MORE INFORMATIONHere's the syntax for ToAxcii():
ToAscii(UINT uVirtKey, UINT uScanCode, BYTE FAR* lpbKeyState, DWORD FAR* lpdwTransKey, UINT fuState)In Easter European versions of Windows version 3.1, uVirtKey has a few additional values specifically intended for these Windows.
VK_GETSTATUS 0x8A VK_SET_PRI 0x88 VK_SET_SEC 0x89By using these Eastern European specific virtual keycodes, the application can check the current keyboard status, or set the keyboard mode. To Check keyboard status, use this code:
uiStatus = ToAscii(VK_GETSTATUS,....); if(uiStatus == VK_SET_PRI) MessageBox(hWnd, "Primary Mode"...); else if(uiStatus == VK_SET_SEC) MessageBox(hWnd, "Secondary Mode"...); else MessageBox(hWnd, "You use non-EE KEYBOARD.DRV"...);To set Primary mode, use this code:
ToAscii(VK_SET_PRI,...);To set Secondary mode, use this code:
ToAscii(VK_SET_SEC,...); |
Additional reference words: 3.10 WM_KEYBOARDCHANGE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |