Claudiu
Claudiu

Reputation: 229291

win32: check if window is minimized

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

Upvotes: 12

Views: 12267

Answers (3)

user206705
user206705

Reputation:

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

Upvotes: 10

John Knoeller
John Knoeller

Reputation: 34128

use the IsIconic function.

Upvotes: 28

GolezTrol
GolezTrol

Reputation: 116100

Use the IsIconic Windows API.

Upvotes: 11

Related Questions