windows win32:检查窗口是否最小化
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4309282/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:41:38 来源:igfitidea点击:
win32: check if window is minimized
提问by Claudiu
How can one check whether a window is minimized using the win32 api?
如何使用win32 api检查窗口是否最小化?
回答by GolezTrol
Use the IsIconic Windows API.
使用 IsIconic Windows API。
回答by Claudiu
Try GetWindowLongand test for the WS_MINIMIZE style:
尝试GetWindowLong并测试WS_MINIMIZE 样式:
LONG lStyles = GetWindowLong(GWL_STYLE);
if( lStyles & WS_MINIMIZE )
ATLTRACE(_T("minimized"));
else
ATLTRACE(_T("not minimized"));
You can also query for GWL_EXSTYLES
您还可以查询GWL_EXSTYLES