]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
wxITEM_FOO instead of wxItem_Foo, for the sake of consistency
[wxWidgets.git] / src / msw / window.cpp
index 3f8bd5c12bd51a28faeaf18c41b843229fe39e10..4ee8e7b1f36dfbd65187e9e42c997bc09f4a05b1 100644 (file)
@@ -1084,7 +1084,8 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
     if ( flags & wxCLIP_SIBLINGS )
         style |= WS_CLIPSIBLINGS;
 
     if ( flags & wxCLIP_SIBLINGS )
         style |= WS_CLIPSIBLINGS;
 
-    if ( (flags & wxBORDER_MASK) != wxBORDER_NONE )
+    wxBorder border = (wxBorder)(flags & wxBORDER_MASK);
+    if ( border != wxBORDER_NONE && border != wxBORDER_DEFAULT )
         style |= WS_BORDER;
 
     // now deal with ext style if the caller wants it
         style |= WS_BORDER;
 
     // now deal with ext style if the caller wants it
@@ -1103,6 +1104,7 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
 
             case wxBORDER_NONE:
             case wxBORDER_SIMPLE:
 
             case wxBORDER_NONE:
             case wxBORDER_SIMPLE:
+            case wxBORDER_DEFAULT:
                 break;
 
             case wxBORDER_STATIC:
                 break;
 
             case wxBORDER_STATIC:
@@ -1113,7 +1115,6 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
                 *exstyle |= WS_EX_WINDOWEDGE;
                 break;
 
                 *exstyle |= WS_EX_WINDOWEDGE;
                 break;
 
-            case wxBORDER_DEFAULT:
             case wxBORDER_SUNKEN:
                 *exstyle |= WS_EX_CLIENTEDGE;
                 break;
             case wxBORDER_SUNKEN:
                 *exstyle |= WS_EX_CLIENTEDGE;
                 break;
@@ -1644,15 +1645,6 @@ void wxWindowMSW::DoSetClientSize(int width, int height)
             break;
         }
 
             break;
         }
 
-        if ( i == 3 )
-        {
-            // how did it happen? maybe OnSize() handler does something really
-            // strange in this class?
-            wxFAIL_MSG( _T("logic error in DoSetClientSize") );
-
-            break;
-        }
-
         int widthClient = width,
             heightClient = height;
 
         int widthClient = width,
             heightClient = height;
 
@@ -5157,6 +5149,7 @@ wxPoint wxGetMousePosition()
 {
     POINT pt;
     GetCursorPos( & pt );
 {
     POINT pt;
     GetCursorPos( & pt );
+
     return wxPoint(pt.x, pt.y);
 }
 
     return wxPoint(pt.x, pt.y);
 }