C++有判断窗口是否显示隐藏的api吗?

wangsky2 2012-07-06 11:07:18
如题。。。。。。。。。。。。。。
...全文
1517 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Piao_Polar 2012-07-06
  • 打赏
  • 举报
回复
C++一般没窗口的说法吧
如果你是说MFC,就是 IsWindowVisible
赵4老师 2012-07-06
  • 打赏
  • 举报
回复
查MSDN是Windows程序员必须掌握的技能之一。

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.

Remarks
The visibility state of a window is indicated by the WS_VISIBLE style bit. When WS_VISIBLE is set, the window is displayed and subsequent drawing into it is displayed as long as the window has the WS_VISIBLE style.

Any drawing to a window with the WS_VISIBLE style will not be displayed if the window is obscured by other windows or is clipped by its parent window.

QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Import Library: Use user32.lib.

See Also
Windows Overview, Window Functions, ShowWindow


zhanshen2891 2012-07-06
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 的回复:]
大家多原谅啊,菜鸟。我的意思是,自己创建的Button,可以用ShowWindow(m_hWnd, SW_HIDE)来隐藏,用ShowWindow(m_hWnd, SW_SHOW)来显示,不知道有没有判断函数来判断它是否隐藏?
[/Quote]

有啊,IsWindowVisible(m_hWnd)
wangsky2 2012-07-06
  • 打赏
  • 举报
回复
大家多原谅啊,菜鸟。我的意思是,自己创建的Button,可以用ShowWindow(m_hWnd, SW_HIDE)来隐藏,用ShowWindow(m_hWnd, SW_SHOW)来显示,不知道有没有判断函数来判断它是否隐藏?
W170532934 2012-07-06
  • 打赏
  • 举报
回复
C++是语言,API归API啦。
Piao_Polar 2012-07-06
  • 打赏
  • 举报
回复
恩,windows也有,但问题是人家说C++,好吧,我执着了
烟袅许伊 2012-07-06
  • 打赏
  • 举报
回复
应该有吧?Windows编程。。。怎么会没有窗口的说法。。。
[Quote=引用 1 楼 的回复:]

C++一般没窗口的说法吧
如果你是说MFC,就是 IsWindowVisible
[/Quote]

64,643

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧