Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinQueryActiveWindow (1.2)
◄Changes► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINWINDOWMGR
HWND WinQueryActiveWindow(hwndDesktop, fLock)
HWND hwndDesktop; /* desktop handle */
BOOL fLock; /* lock/unlock flag */
The WinQueryActiveWindow function retrieves the active frame window.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hwndDesktop Identifies the desktop window. This parameter can be
HWND_DESKTOP or the desktop window handle.
fLock This parameter is ignored by MS OS/2 versions 1.2 and later.
Return Value
The return value is the handle of the active window if the function is
successful; it is NULL if no window was active at the time of the call or
the desktop handle is invalid.
Comments
If this function is called while the active window is changing, it may
return NULL, indicating that no window was active at the time of the call.
Because a NULL value can also be returned if the hwndDesktop handle is
invalid, the WinGetLastError function must be called to determine if a NULL
return value is caused by an invalid hwndDesktop handle or because the
active window was changing when WinQueryActiveWindow was called.
See Also
WinGetLastError, WinLockWindow, WinQueryFocus
♦