Microsoft KB Archive/129597

{|
 * width="100%"|

PRB: DialogBox Call w/ Desktop Window Handle Disables Mouse

 * }

Q129597

-

The information in this article applies to:


 * Microsoft Win32s version 1.2

-

SYMPTOMS
Under 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.

CAUSE
This 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.

RESOLUTION
Do not call DialogBox with the desktop window handle as the parent window handle.

Additional query words: 1.20 HWND_DESKTOP

Keywords :

Issue type :

Technology : kbWin32sSearch kbWin32s120