]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tbar95.cpp
fixed sorting the items which have indirect data (i.e. images set for open/closed...
[wxWidgets.git] / src / msw / tbar95.cpp
index 470d5e5cfafe81b98ae865c5db87995193d32a51..40119dce3bd8017efd824ea887c1b0616fcb90ac 100644 (file)
@@ -218,14 +218,17 @@ bool wxToolBar::Create(wxWindow *parent,
                        long style,
                        const wxString& name)
 {
+    // toolbars never have border, giving one to them results in broken
+    // appearance
+    style &= ~wxBORDER_MASK;
+    style |= wxBORDER_NONE;
+
     // common initialisation
     if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
         return FALSE;
 
     // prepare flags
     DWORD msflags = 0;      // WS_VISIBLE | WS_CHILD always included
-    if (style & wxBORDER)
-        msflags |= WS_BORDER;
 
    if ( style & wxCLIP_SIBLINGS )
         msflags |= WS_CLIPSIBLINGS;
@@ -833,8 +836,9 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
             //     this case
 
             size_t lenAnsi = help.Len();
-            #ifdef __MWERKS__
+            #if defined( __MWERKS__ ) || defined( __CYGWIN__ )
                 // MetroWerks doesn't like calling mbstowcs with NULL argument
+                // neither Cygwin does
                 size_t lenUnicode = 2*lenAnsi;
             #else
                 size_t lenUnicode = mbstowcs(NULL, help, lenAnsi);