From 1a557d9a0a9339a865f21be23e8c8c019dba1ac3 Mon Sep 17 00:00:00 2001 From: george82 Date: Sat, 5 Nov 2005 04:54:51 +0000 Subject: [PATCH] Added new method ToolBar::isVisible() in the rfb_win32 library. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@375 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- rfb_win32/ToolBar.cxx | 5 +++++ rfb_win32/ToolBar.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/rfb_win32/ToolBar.cxx b/rfb_win32/ToolBar.cxx index 4061bb38..6392ebdc 100644 --- a/rfb_win32/ToolBar.cxx +++ b/rfb_win32/ToolBar.cxx @@ -209,3 +209,8 @@ void ToolBar::show() { void ToolBar::hide() { ShowWindow(getHandle(), SW_HIDE); } + +bool ToolBar::isVisible() { + DWORD style = GetWindowLong(getHandle(), GWL_STYLE); + return (bool)(style & WS_VISIBLE); +} diff --git a/rfb_win32/ToolBar.h b/rfb_win32/ToolBar.h index feed1a02..2242c2a4 100644 --- a/rfb_win32/ToolBar.h +++ b/rfb_win32/ToolBar.h @@ -118,6 +118,9 @@ namespace rfb { // hide() hides the toolbar window. void hide(); + // isVisible() check the toolbar window on visible. + bool isVisible(); + protected: HWND hwndToolBar; HWND parentHwnd; -- 2.39.5