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
diff --git a/rfb_win32/ToolBar.cxx b/rfb_win32/ToolBar.cxx
index 4061bb3..6392ebd 100644
--- a/rfb_win32/ToolBar.cxx
+++ b/rfb_win32/ToolBar.cxx
@@ -209,3 +209,8 @@
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 feed1a0..2242c2a 100644
--- a/rfb_win32/ToolBar.h
+++ b/rfb_win32/ToolBar.h
@@ -118,6 +118,9 @@
// hide() hides the toolbar window.
void hide();
+ // isVisible() check the toolbar window on visible.
+ bool isVisible();
+
protected:
HWND hwndToolBar;
HWND parentHwnd;