GetWindowRect() Returns TRUE with Desktop Window Handle

ID: Q129598


The information in this article applies to:
  • Microsoft Win32s version 1.2


SUMMARY

Under Windows NT and Windows 95, GetWindowRect() returns FALSE (to indicate failure) if the desktop window handle is used. Under Win32s, GetWindowRect() returns TRUE if the desktop window handle is used, however, the RECT structure is not correctly filled in.

On Win32s, GetWindowRect() returns TRUE unconditionally because the 16-bit Windows GetWindowRect() has no return value. Therefore, before calling GetWindowRect() on Win32s, you should first check that the window handle is not the desktop window handle.

Additional query words: 1.20 GetDesktopWindow HWND_DESKTOP

Keywords :
Version : WINDOWS:1.2
Platform : WINDOWS
Issue type :


Last Reviewed: January 10, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.