PRB: DialogBox() Call w/ Desktop Window Handle Disables MouseLast reviewed: May 1, 1995Article ID: Q129597 |
The information in this article applies to:
SYMPTOMSUnder Windows NT and Windows 95, you can call DialogBox() using the return from GetDesktopWindow() as the parent window handle. However, doing the same thing under Win32s will disable the mouse. Clicking any mouse button results in a beep, and you must reboot the computer to enable the mouse again.
CAUSEThis is a bug in Windows, not Win32s. The same thing occurs from a 16-bit Windows-based application. Internally, Windows disables the parent window by calling EnableWindow(hwndParent, FALSE). If the handle is the desktop window handle, the desktop window is disabled. This disables the mouse as well, due to the bug in the Windows code.
RESOLUTIONDo not call DialogBox() with the desktop window handle as the parent window handle.
|
Additional reference words: 1.20 HWND_DESKTOP
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |