summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_win32.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-04-18 14:58:49 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-04-18 14:59:08 +0200
commitb382c7e3c6645c977cd9a7bf28b639a349d5bbde (patch)
tree18813fb8f00f4814749957bd37af31de3b2c1cc3 /plugingui/nativewindow_win32.cc
parent37cb6cefcab6be0a1337e0a346d6e259f8dbbb5f (diff)
Make visible() call into nativewindow and make Win32 windows invisible on creation.
Diffstat (limited to 'plugingui/nativewindow_win32.cc')
-rw-r--r--plugingui/nativewindow_win32.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugingui/nativewindow_win32.cc b/plugingui/nativewindow_win32.cc
index 01a2fa8..f2387c7 100644
--- a/plugingui/nativewindow_win32.cc
+++ b/plugingui/nativewindow_win32.cc
@@ -367,7 +367,7 @@ NativeWindowWin32::NativeWindowWin32(void* native_window, Window& window)
m_hwnd = CreateWindowEx(0/*ex_style*/, m_className,
"DGBasisWidget",
- (native_window?WS_CHILD:WS_OVERLAPPEDWINDOW) | WS_VISIBLE,
+ (native_window?WS_CHILD:WS_OVERLAPPEDWINDOW),
0, 0, //window.x(), window.y(),
1, 1, //window.width(), window.height(),
parent_window, nullptr,
@@ -455,6 +455,11 @@ void NativeWindowWin32::hide()
ShowWindow(m_hwnd, SW_HIDE);
}
+bool NativeWindowWin32::visible() const
+{
+ return IsWindowVisible(m_hwnd);
+}
+
void NativeWindowWin32::redraw(const Rect& dirty_rect)
{
// Send WM_PAINT message. Buffer transfering is handled in MessageHandler.