]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/datepick.cpp
more wxFD_XXX renamings (patch 1488371)
[wxWidgets.git] / samples / widgets / datepick.cpp
index b9aab44eebaf67953b144f93b5a8fc94fd5b3e79..65c5f84b8732b8689ec52743b02741e7873c0e0a 100644 (file)
@@ -119,17 +119,20 @@ END_EVENT_TABLE()
 // implementation
 // ============================================================================
 
 // implementation
 // ============================================================================
 
+#if defined(__WXMSW__)
+    #define FAMILY_CTRLS NATIVE_CTRLS
+#else
+    #define FAMILY_CTRLS GENERIC_CTRLS
+#endif
+
 IMPLEMENT_WIDGETS_PAGE(DatePickerWidgetsPage, wxT("DatePicker"),
 IMPLEMENT_WIDGETS_PAGE(DatePickerWidgetsPage, wxT("DatePicker"),
-                       (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
-                       | PICKER_CTRLS
+                       FAMILY_CTRLS | PICKER_CTRLS
                        );
 
 DatePickerWidgetsPage::DatePickerWidgetsPage(WidgetsBookCtrl *book,
                                          wxImageList *imaglist)
                        );
 
 DatePickerWidgetsPage::DatePickerWidgetsPage(WidgetsBookCtrl *book,
                                          wxImageList *imaglist)
-                      :WidgetsPage(book)
+                      :WidgetsPage(book, imaglist, datepick_xpm)
 {
 {
-    imaglist->Add(wxBitmap(datepick_xpm));
-
     wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
 
     // left pane
     wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
 
     // left pane