]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/scrolbar.cpp
Warning fixes for WinCE.
[wxWidgets.git] / src / msw / scrolbar.cpp
index c340e946f438ae5634df5bfdec28a9638c82f682..820c1fb0d5f522b7a416cc14aeb90858c544bb3c 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "wx/scrolbar.h"
 #include "wx/msw/private.h"
+#include "wx/settings.h"
 
 #if wxUSE_EXTENDED_RTTI
 WX_DEFINE_FLAGS( wxScrollBarStyle )
@@ -74,7 +75,7 @@ wxBEGIN_PROPERTIES_TABLE(wxScrollBar)
        wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
        wxPROPERTY( ThumbSize , int , SetThumbSize, GetThumbSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
        wxPROPERTY( PageSize , int , SetPageSize, GetPageSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
-    wxPROPERTY_FLAGS( WindowStyle , wxScrollBarStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
+    wxPROPERTY_FLAGS( WindowStyle , wxScrollBarStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
 wxEND_PROPERTIES_TABLE()
 
 wxBEGIN_HANDLERS_TABLE(wxScrollBar)
@@ -375,4 +376,21 @@ void wxScrollBar::Command(wxCommandEvent& event)
     ProcessCommand(event);
 }
 
+wxSize wxScrollBar::DoGetBestSize() const
+{
+    int w = 100;
+    int h = 100;
+
+    if ( IsVertical() )
+    {
+        w = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
+    }
+    else
+    {
+        h = wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y);
+    }
+
+    return wxSize(w, h);
+}
+
 #endif // wxUSE_SCROLLBAR