SAMPLE: Code Demonstrates Windows 3.1 WH_MOUSE HookLast reviewed: February 15, 1996Article ID: Q81333 |
The information in this article applies to:
MOUSHOOK is a file in the Software Library that demonstrates installing and using a WH_MOUSE mouse message hook. The mouse message hook in MOUSHOOK disables the right mouse button for all applications in the system by discarding WM_RBUTTONDOWN and WM_NCRBUTTONDOWN messages. The mouse hook function beeps each time it discards a message. The MOUSHOOK file contains the source to an application program, TESTAPP, and a dynamic-link library (DLL), MOUSHOOK, that implements the mouse hook. The MOUSHOOK DLL uses the new hook functions provided by Windows 3.1: SetWindowsHookEx(), UnhookWindowsHookEx(), and CallNextHookEx(). TESTAPP calls MOUSHOOK to install the mouse hook. When TESTAPP is closed, it removes the mouse hook from the system. Download MOUSHOOK.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
|
Additional reference words: 3.10 softlib MOUSHOOK.EXE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |