]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
extracted duplicated code from src/*/data.cpp in a common file
[wxWidgets.git] / src / msw / control.cpp
index 6593d6eed17d4f5b2308390a849e18f69ab613a0..4eb36ecd3a7fa85a9a2dd4e7a10d285ef5922aa8 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     01/02/97
 // RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart and Markus Holzem
+// Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -78,11 +78,10 @@ bool wxControl::Create(wxWindow *parent,
 bool wxControl::MSWCreateControl(const wxChar *classname,
                                  const wxString& label,
                                  const wxPoint& pos,
-                                 const wxSize& size,
-                                 long style)
+                                 const wxSize& size)
 {
     WXDWORD exstyle;
-    WXDWORD msStyle = MSWGetStyle(style, &exstyle);
+    WXDWORD msStyle = MSWGetStyle(GetWindowStyle(), &exstyle);
 
     return MSWCreateControl(classname, msStyle, pos, size, label, exstyle);
 }
@@ -156,7 +155,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
     InheritAttributes();
 
     // set the size now if no initial size specified
-    if ( w == 0 || h == 0 )
+    if ( w <= 0 || h <= 0 )
     {
         SetBestSize(size);
     }