Knowledge Base

GetWindowRect() Returns TRUE with Desktop Window Handle

PSS ID Number: 129598

Article Last Modified on 1/12/2000


The information in this article applies to:


This article was previously published under Q129598

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: KB129598
Technology: kbWin32s120 kbWin32sSearch