diff options
author | nyamatongwe <unknown> | 2003-04-05 03:40:42 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-04-05 03:40:42 +0000 |
commit | 0ea4986249c5a8d43f6c76a791df6640a74fcf5f (patch) | |
tree | deaf7bb6009d1a20af7081696405e76a2df72589 /win32/PlatWin.cxx | |
parent | ea7e17dd06127bc50740eb0a3af6e713d73d6d10 (diff) | |
download | scintilla-mirror-0ea4986249c5a8d43f6c76a791df6640a74fcf5f.tar.gz |
Changes to allow calltips to be popup rather than child windows.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index ffa9b81ef..09bf83ded 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -761,10 +761,19 @@ PRectangle Window::GetPosition() { void Window::SetPosition(PRectangle rc) { ::SetWindowPos(reinterpret_cast<HWND>(id), - 0, rc.left, rc.top, rc.Width(), rc.Height(), SWP_NOZORDER); -} - -void Window::SetPositionRelative(PRectangle rc, Window) { + 0, rc.left, rc.top, rc.Width(), rc.Height(), SWP_NOZORDER|SWP_NOACTIVATE); +} + +void Window::SetPositionRelative(PRectangle rc, Window w) { + LONG style = ::GetWindowLong(reinterpret_cast<HWND>(id), GWL_STYLE); + if (style & WS_POPUP) { + RECT rcOther; + ::GetWindowRect(reinterpret_cast<HWND>(w.GetID()), &rcOther); + rc.top += rcOther.top; + rc.left += rcOther.left; + rc.bottom += rcOther.top; + rc.right += rcOther.left; + } SetPosition(rc); } @@ -776,7 +785,7 @@ PRectangle Window::GetClientPosition() { void Window::Show(bool show) { if (show) - ::ShowWindow(reinterpret_cast<HWND>(id), SW_SHOWNORMAL); + ::ShowWindow(reinterpret_cast<HWND>(id), SW_SHOWNOACTIVATE); else ::ShowWindow(reinterpret_cast<HWND>(id), SW_HIDE); } |