summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp34
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;
+ }
}