diff options
author | Ian C <ianc@noddybox.co.uk> | 2005-04-05 00:20:27 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2005-04-05 00:20:27 +0000 |
commit | d625e19cdc79ec54d882aad95d05d7f24577bb6b (patch) | |
tree | 51c380aefeed4de66f52274b174d161eb2e29ecc /src/window.cpp | |
parent | 3a1bf865b6c1b6b7c096eaf6dab91a465319488a (diff) |
Added Move and MoveBase to Window
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp index 1646d70..e64bd30 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -82,7 +82,39 @@ HMENU Window::GetHMENU() // bool Window::SetHMENU(HMENU menu) { - return SetMenu(m_wnd,menu) ? true:false; + return SetMenu(m_wnd,menu)!=0; +} + + +// ------------------------------------------------------------ +// +bool Window::Move(int x, int y, int width, int height, bool repaint) +{ + return MoveWindow(m_wnd,x,y,width,height,repaint ? TRUE:FALSE)!=0; +} + + +// ------------------------------------------------------------ +// +bool Window::MoveBase(Window *w, int x, int y, int width, int height, + bool repaint) +{ + RECT r; + + r.left=x; + r.top=y; + r.right=width; + r.bottom=height; + + if (MapDialogRect(w->m_wnd,&r)) + { + return MoveWindow(m_wnd,r.left,r.top, + r.right,r.bottom,repaint ? TRUE:FALSE)!=0; + } + else + { + return false; + } } |