In this example, the WinQueryWindowUShort call is used to query the window words to see if a window has been minimized.
#define INCL_WINWINDOWMGR #include <OS2.H> HWND hwnd; USHORT usResult; usResult = WinQueryWindowUShort(hwnd, QWS_XMINIMIZE); if (-1 == (LONG)usResult) { /* Window has not been minimized */ }