]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/mediaplayer/mediaplayer.cpp
Resolve ambiguity between GetClientXXX() methods in wxOSX wxComboBox.
[wxWidgets.git] / samples / mediaplayer / mediaplayer.cpp
index ceaf85d9c3c937430def51f35a3e29f677e7c7a8..1ca1da55f633e42ce629afd10f3dfdd72e5a99d7 100644 (file)
 #include "wx/filename.h"    // For wxFileName::GetName()
 #include "wx/config.h"      // for native wxConfig
 
 #include "wx/filename.h"    // For wxFileName::GetName()
 #include "wx/config.h"      // for native wxConfig
 
+// Under MSW we have several different backends but when linking statically
+// they may be discarded by the linker (this definitely happens with MSVC) so
+// force linking them. You don't have to do this in your code if you don't plan
+// to use them, of course.
+#if defined(__WXMSW__) && !defined(WXUSINGDLL)
+    #include "wx/link.h"
+    wxFORCE_LINK_MODULE(wxmediabackend_am)
+    wxFORCE_LINK_MODULE(wxmediabackend_qt)
+    wxFORCE_LINK_MODULE(wxmediabackend_wmp10)
+#endif // static wxMSW build
+
 #ifndef __WXMSW__
     #include "../sample.xpm"
 #endif
 #ifndef __WXMSW__
     #include "../sample.xpm"
 #endif
@@ -393,7 +404,7 @@ const wxChar* wxGetMediaStateText(int nState)
 //
 // IMPLEMENT_APP does this, and also implements the platform-specific entry
 // routine, such as main or WinMain().  Use IMPLEMENT_APP_NO_MAIN if you do
 //
 // IMPLEMENT_APP does this, and also implements the platform-specific entry
 // routine, such as main or WinMain().  Use IMPLEMENT_APP_NO_MAIN if you do
-// not desire this behavior.
+// not desire this behaviour.
 // ----------------------------------------------------------------------------
 IMPLEMENT_APP(wxMediaPlayerApp)
 
 // ----------------------------------------------------------------------------
 IMPLEMENT_APP(wxMediaPlayerApp)
 
@@ -1634,7 +1645,7 @@ wxMediaPlayerNotebookPage::wxMediaPlayerNotebookPage(wxMediaPlayerFrame* parentF
     //
     m_slider = new wxSlider(this, wxID_SLIDER, 0, // init
                             0, // start
     //
     m_slider = new wxSlider(this, wxID_SLIDER, 0, // init
                             0, // start
-                            0, // end
+                            1, // end, dummy but must be greater than start
                             wxDefaultPosition, wxDefaultSize,
                             wxSL_HORIZONTAL );
     sizer->Add(m_slider, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND , 5);
                             wxDefaultPosition, wxDefaultSize,
                             wxSL_HORIZONTAL );
     sizer->Add(m_slider, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND , 5);