]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
Reordered includes to have OS2EMX_PLAIN_CHAR defined prior to including os2.h
[wxWidgets.git] / src / msw / control.cpp
index 71bc3e6f1e68388e570d2fcdf657d14d179f028b..df2d8b11095b5a7d491ca688c8593dfa1922379d 100644 (file)
@@ -59,7 +59,7 @@ bool wxControl::Create(wxWindow *parent,
                        const wxPoint& pos,
                        const wxSize& size,
                        long style,
-                       const wxValidator& validator,
+                       const wxValidator& wxVALIDATOR_PARAM(validator),
                        const wxString& name)
 {
     if ( !wxWindow::Create(parent, id, pos, size, style, name) )
@@ -106,11 +106,15 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
         style |= WS_VISIBLE;
     }
 
+    // choose the position for the control
     int x = pos.x == -1 ? 0 : pos.x,
         y = pos.y == -1 ? 0 : pos.y,
         w = size.x == -1 ? 0 : size.x,
         h = size.y == -1 ? 0 : size.y;
 
+    // ... and adjust it to account for ap ossible parent frames toolbar
+    AdjustForParentClientOrigin(x, y);
+
     m_hWnd = (WXHWND)::CreateWindowEx
                        (
                         exstyle,            // extended style