TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CHRISTOPHER BUTLER
from: CHRISTIAN ANDERSEN
date: 1997-04-10 09:14:00
subject: Scroll Lock

Hello Christopher.
05 Apr 97 22:44, Christopher Butler wrote to All:
 CB> Does anyone have some C++ code that checks the condition of Scroll
 CB> Lock?
If you're programming Windows/Windows Console you can use:
GETKEYSTATE:
The GetKeyState function retrieves the status of the specified virtual key. 
The status specifies whether the key is up, down, or toggled (on, off _ 
alternating each time the key is pressed).
SHORT GetKeyState(
    int  nVirtKey   // virtual-key code
   );
Return Value
If the function succeeds, the return value specifies the status of the given 
virtual key. If the high-order bit is 1, the key is down; otherwise, it is 
p.
>If the low-order bit is 1, the key is toggled. A key, such as the CAPS
>LOCK key, is toggled if it is turned on. The key is off and untoggled if
the low-order bit is 0. A toggle key's indicator light (if any) on the
keyboard will be on when the key is toggled, and off when the key is
untoggled.
Christian
--- GoldED 2.50 UNREG
---------------
* Origin: Kokain i Kinder‘g - det jo hele 4 ting (2:235/335.22)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.