Alex Rivera | Logout

win32: check if window is minimized

Asked 2010-11-29T23:52:25.593
12

How can one check whether a window is minimized using the win32 api?

Edit
Report

2 Answers

11

Use the IsIconic Windows API.

answered 2010-11-29T23:54:22.580
11

Try GetWindowLong and test for the WS_MINIMIZE style:

LONG lStyles = GetWindowLong(GWL_STYLE);

if( lStyles & WS_MINIMIZE )
    ATLTRACE(_T("minimized"));
else
    ATLTRACE(_T("not minimized"));

You can also query for GWL_EXSTYLES

answered 2010-11-30T00:00:02.040

Your Answer