// ressources
// ----------------------------------------------------------------------------
// the application icon
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
+#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
#include "mondrian.xpm"
#endif
bool MMBoardApp::OnInit()
{
// create the main application window
- MMBoardFrame *frame = new MMBoardFrame("Multimedia Board",
+ MMBoardFrame *frame = new MMBoardFrame(_T("Multimedia Board"),
wxPoint(50, 50), wxSize(450, 340));
// and show it (the frames, unlike simple controls, are not shown when
m_caps = TestMultimediaCaps();
if (!m_caps) {
- wxMessageBox("Your system has no multimedia capabilities. We are exiting now.", "Major error !", wxOK | wxICON_ERROR, NULL);
+ wxMessageBox(_T("Your system has no multimedia capabilities. We are exiting now."), _T("Major error !"), wxOK | wxICON_ERROR, NULL);
return FALSE;
}
wxString msg;
- msg.Printf("Detected : %s%s%s", (m_caps & MM_SOUND_OSS) ? "OSS " : "",
- (m_caps & MM_SOUND_ESD) ? "ESD " : "",
- (m_caps & MM_SOUND_WIN) ? "WIN" : "");
+ msg.Printf(_T("Detected : %s%s%s"), (m_caps & MM_SOUND_OSS) ? _T("OSS ") : _T(""),
+ (m_caps & MM_SOUND_ESD) ? _T("ESD ") : _T(""),
+ (m_caps & MM_SOUND_WIN) ? _T("WIN") : _T(""));
- wxMessageBox(msg, "Good !", wxOK | wxICON_INFORMATION, NULL);
+ wxMessageBox(msg, _T("Good !"), wxOK | wxICON_INFORMATION, NULL);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
m_fileType = new wxStaticText(infoPanel, -1, wxT(""));
wxStaticLine *line = new wxStaticLine(infoPanel, -1);
- m_infoText = new wxStaticText(infoPanel, -1, "");
+ m_infoText = new wxStaticText(infoPanel, -1, _T(""));
UpdateInfoText();
// Bitmap button panel
wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL);
- wxBitmap *play_bmp = new wxBitmap(play_back_xpm);
- wxBitmap *stop_bmp = new wxBitmap(stop_back_xpm);
- wxBitmap *eject_bmp = new wxBitmap(eject_xpm);
- wxBitmap *pause_bmp = new wxBitmap(pause_xpm);
+ wxBitmap play_bmp(play_back_xpm);
+ wxBitmap stop_bmp(stop_back_xpm);
+ wxBitmap eject_bmp(eject_xpm);
+ wxBitmap pause_bmp(pause_xpm);
- m_playButton = new wxBitmapButton(m_panel, MMBoard_PlayButton, *play_bmp);
+ m_playButton = new wxBitmapButton(m_panel, MMBoard_PlayButton, play_bmp);
m_playButton->Enable(FALSE);
- m_pauseButton = new wxBitmapButton(m_panel, MMBoard_PauseButton, *pause_bmp);
+ m_pauseButton = new wxBitmapButton(m_panel, MMBoard_PauseButton, pause_bmp);
m_pauseButton->Enable(FALSE);
- m_stopButton = new wxBitmapButton(m_panel, MMBoard_StopButton, *stop_bmp);
+ m_stopButton = new wxBitmapButton(m_panel, MMBoard_StopButton, stop_bmp);
m_stopButton->Enable(FALSE);
- m_ejectButton = new wxBitmapButton(m_panel, MMBoard_EjectButton, *eject_bmp);
+ m_ejectButton = new wxBitmapButton(m_panel, MMBoard_EjectButton, eject_bmp);
m_ejectButton->Enable(FALSE);
buttonSizer->Add(m_playButton, 0, wxALL, 2);
{
if (!m_video_window)
return;
-
- m_sizer->Remove(m_video_window);
+
+ m_sizer->Detach( m_video_window );
delete m_video_window;
m_video_window = NULL;
-
+
m_sizer->Fit(this);
}
wxT("an example of the capabilities of the wxWindows multimedia classes.\n")
wxT("Copyright 1999, 2000, Guilhem Lavaux.\n"));
- wxMessageBox(msg, "About MMBoard", wxOK | wxICON_INFORMATION, this);
+ wxMessageBox(msg, _T("About MMBoard"), wxOK | wxICON_INFORMATION, this);
}
void MMBoardFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
}
// select a file to be opened
- selected_file = wxLoadFileSelector("multimedia", "*", NULL, this);
+ selected_file = wxLoadFileSelector(_T("multimedia"), _T("*"), NULL, this);
if (selected_file.IsNull())
return;