PDA

Click to See Complete Forum and Search --> : Get Window State


Technocrat
Feb 22nd, 2001, 06:07 PM
Anyone know how to get the Window state? Like if the window is minimized or hidden?

rekcus
Feb 22nd, 2001, 07:39 PM
Use this


LONG GetWindowLong(
HWND hWnd, // handle to window
int nIndex // offset of value to retrieve
);

Vlatko
Feb 23rd, 2001, 06:26 AM
Or

IsWindowVisible
The IsWindowVisible function retrieves the visibility state of the specified window.

BOOL IsWindowVisible(
HWND hWnd // handle to window
);

Parameters
hWnd
Handle to the window to test.
Return Values
If the specified window and its parent window have the WS_VISIBLE style, the return value is nonzero.

If the specified window and its parent window do not have the WS_VISIBLE style, the return value is zero. Because the return value specifies whether the window has the WS_VISIBLE style, it may be nonzero even if the window is totally obscured by other windows.

------------------------------------------------------------------

The IsZoomed function determines whether a window is maximized.

BOOL IsZoomed(
HWND hWnd // handle to window
);

Parameters
hWnd
Handle to the window to test.
Return Values
If the window is zoomed, the return value is nonzero.

If the window is not zoomed, the return value is zero.

Technocrat
Feb 23rd, 2001, 09:55 AM
thanks guys I will give it a shot

Feb 23rd, 2001, 04:55 PM
The IsIconic function will determine whether it's minimized or not.