Soyez le premier à donner votre avis sur cette source.
Vue 14 127 fois - Téléchargée 1 165 fois
//--------------------------------------------------------------------------- // // Name: SatAviPlayerFrm.cpp // Author: Nicolas Robert --> satellitesound@free.fr // Created: 01/08/2005 12:12:35 // //--------------------------------------------------------------------------- #include "SatAviPlayerFrm.h" //---------------------------------------------------------------------------- // SatAviPlayerFrm //---------------------------------------------------------------------------- BEGIN_EVENT_TABLE(SatAviPlayerFrm,wxFrame) EVT_TIMER(ID_TIMER, SatAviPlayerFrm::OnTimer) EVT_CLOSE( SatAviPlayerFrm::SatAviPlayerFrmClose) EVT_MENU(ID_MNU_OUVRIR , SatAviPlayerFrm::MnuouvrirClick) EVT_MENU(ID_MNU_QUITTER , SatAviPlayerFrm::MnuquitterClick) EVT_BUTTON(ID_BUTTON1, SatAviPlayerFrm::Boutton1Click) EVT_BUTTON(ID_BUTTON2, SatAviPlayerFrm::Boutton2Click) EVT_BUTTON(ID_BUTTON3, SatAviPlayerFrm::Boutton3Click) EVT_COMMAND_SCROLL_THUMBTRACK(ID_SLIDER, SatAviPlayerFrm::SliderThumbtrack) EVT_COMMAND_SCROLL(ID_SLIDER, SatAviPlayerFrm::SliderScroll) EVT_COMMAND_SCROLL_THUMBTRACK(ID_SLIDERVOL, SatAviPlayerFrm::SlidervolThumbtrack) EVT_COMMAND_SCROLL(ID_SLIDERVOL, SatAviPlayerFrm::SliderScrollVol) END_EVENT_TABLE() SatAviPlayerFrm::SatAviPlayerFrm( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style ) : wxFrame( parent, id, title, position, size, style), m_timer(this, ID_TIMER) { CreateGUIControls(); m_timer.Start(24); } SatAviPlayerFrm::~SatAviPlayerFrm() {} IMPLEMENT_APP(SatAviPlayerFrmApp) bool SatAviPlayerFrmApp::OnInit() { SatAviPlayerFrm *Frame = new SatAviPlayerFrm(NULL); SetTopWindow(Frame); Frame->Show(TRUE); return TRUE; } int SatAviPlayerFrmApp::OnExit() { return 0; } void SatAviPlayerFrm::CreateGUIControls() { Slider = new wxSlider(this, ID_SLIDER,0,0,10,wxPoint(10,20),wxSize(200,15) , wxSL_HORIZONTAL|wxSL_AUTOTICKS); Slider->SetRange(0,10); Slider->SetValue(0); SliderVol = new wxSlider(this, ID_SLIDERVOL,0,0,10,wxPoint(320,2),wxSize(15,70) , wxSL_VERTICAL|wxSL_AUTOTICKS|wxSL_INVERSE); SliderVol->SetRange(0, 10); SliderVol->SetValue(8); StatusBar = new wxStatusBar(this, ID_STATUSBAR ); StatusBar->SetFieldsCount(1); int StatusBar_Widths[1]; StatusBar_Widths[0] = -1; StatusBar->SetStatusWidths(1,StatusBar_Widths); MenuBar = new wxMenuBar( ); wxMenu *ID_MNU_FICHIER_Mnu_Obj = new wxMenu(0); MenuBar->Append(ID_MNU_FICHIER_Mnu_Obj,_("Fichier")); ID_MNU_FICHIER_Mnu_Obj->Append(ID_MNU_OUVRIR,_("Ouvrir"),_(""), wxITEM_NORMAL); ID_MNU_FICHIER_Mnu_Obj->Append(ID_MNU_QUITTER,_("Quitter"),_(""), wxITEM_NORMAL); this->SetMenuBar(MenuBar); Button1 = new wxButton(this, ID_BUTTON1, _(">"), wxPoint(280,20),wxSize(25,25)); Button2 = new wxButton(this, ID_BUTTON2, _("II"), wxPoint(250,20),wxSize(25,25)); Button3 = new wxButton(this, ID_BUTTON3, _("X"), wxPoint(220,20),wxSize(25,25)); OpenFileDialog = new wxFileDialog(this, "Ouvrir un fichier..." , "" , "" , "", wxOPEN | wxHIDE_READONLY | wxCHANGE_DIR ); wxFileDialog fd(OpenFileDialog); m_mediactrl = new wxMediaCtrl(); m_dialog = new wxDialog(this, -1, "vidéo", wxPoint(0,0), wxSize(-1,-1), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxTHICK_FRAME ,"dialogBox"); m_dialog->SetBackgroundColour(wxColour(0, 0, 0)); m_mediactrl->Create(m_dialog, ID_MEDIA, fd.GetPath(), wxPoint(0, 0), wxSize(1024,768)); m_sizerv = new wxBoxSizer(wxVERTICAL); m_sizerv->Add(m_mediactrl, 1, wxALIGN_CENTER|wxGROW, 0); m_sizerh = new wxBoxSizer(wxHORIZONTAL); m_sizerh->Add(m_sizerv, 1, wxALIGN_CENTER|wxGROW, 0); m_dialog->SetSizer(m_sizerh); m_dialog->SetAutoLayout(true); this->SetStatusBar(StatusBar); this->SetSize(8,8,370,150); this->SetTitle(_("SatAviPlayer")); this->Center(); this->SetIcon(wxNullIcon); this->SetBackgroundColour(wxColour(80, 100, 75)); ////GUI Items Creation End } void SatAviPlayerFrm::SatAviPlayerFrmClose(wxCloseEvent& event) { m_timer.Stop(); m_mediactrl->Destroy(); Destroy(); } /*/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9 juin 2007 à 21:23
30 mai 2007 à 06:09
22 mars 2007 à 21:15
SatAviPlayerFrm.h:51: error: ISO C++ forbids declaration of ?wxMediaCtrl? with no type
SatAviPlayerFrm.h:51: error: expected ?;? before ?*? token
boutons.cpp: In member function ?void SatAviPlayerFrm::Boutton1Click(wxCommandEvent&)?:
boutons.cpp:9: error: ?m_mediactrl? was not declared in this scope
boutons.cpp: In member function ?void SatAviPlayerFrm::Boutton2Click(wxCommandEvent&)?:
boutons.cpp:21: error: ?m_mediactrl? was not declared in this scope
boutons.cpp: In member function ?void SatAviPlayerFrm::Boutton3Click(wxCommandEvent&)?:
boutons.cpp:32: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.h:51: error: ISO C++ forbids declaration of ?wxMediaCtrl? with no type
SatAviPlayerFrm.h:51: error: expected ?;? before ?*? token
SatAviPlayerFrm.cpp: In member function ?void SatAviPlayerFrm::CreateGUIControls()?:
SatAviPlayerFrm.cpp:92: error: ?wxHIDE_READONLY? was not declared in this scope
SatAviPlayerFrm.cpp:95: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.cpp:95: error: expected type-specifier before ?wxMediaCtrl?
SatAviPlayerFrm.cpp:95: error: expected `;' before ?wxMediaCtrl?
SatAviPlayerFrm.cpp: In member function ?void SatAviPlayerFrm::SatAviPlayerFrmClose(wxCloseEvent&)?:
SatAviPlayerFrm.cpp:122: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.cpp: In member function ?void SatAviPlayerFrm::MnuquitterClick(wxCommandEvent&)?:
SatAviPlayerFrm.cpp:133: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.cpp: In member function ?void SatAviPlayerFrm::MnuouvrirClick(wxCommandEvent&)?:
SatAviPlayerFrm.cpp:147: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.cpp:150: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.cpp: In member function ?void SatAviPlayerFrm::resetmedia()?:
SatAviPlayerFrm.cpp:163: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.cpp: In member function ?void SatAviPlayerFrm::OnTimer(wxTimerEvent&)?:
SatAviPlayerFrm.cpp:176: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.cpp: In member function ?void SatAviPlayerFrm::SliderThumbtrack(wxScrollEvent&)?:
SatAviPlayerFrm.cpp:188: error: ?m_mediactrl? was not declared in this scope
SatAviPlayerFrm.cpp: In member function ?void SatAviPlayerFrm::SlidervolThumbtrack(wxScrollEvent&)?:
SatAviPlayerFrm.cpp:202: error: ?m_mediactrl? was not declared in this scope
Euh...
Sa vient de mon linkage? Ou du code?
Je mettrais une note si sa marche!
A+
10 août 2005 à 02:29
8 août 2005 à 21:39
Et puis il ya des catégories sur ce site! Me suis-je trompé???
C'est vrai que c'est super simple mais c'était le but! Enfin, je peux toujours m'amuser a le compliquer et a le rendre obscur, pour le plaisir :-(
Enfin, sache que je ne suis pas d' un tempérament a mal prendre les choses, au contraire c'est bien, o, en apprends bocoup....
Bon allé promis la prochaine source sera compliquée....
tchao
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.