Simple Media Player in C++
* C++ Tutorial Demo with Source Code :
I will show that how to read Media File using wxDev C++ IDE
How to load media file :-
(Screen Shot)
You need two button , one OpenFileDialog, One MessageDialog, WxMediaCtrl
Open Button Code Here:-------
wxString path;
if (WxOpenFileDialog1->ShowModal()==wxID_OK){
path = WxOpenFileDialog1->GetPath();
WxMediaCtrl1->Load(path);
if (not WxMediaCtrl1->Load(path)){
int msg = wxMessageBox("Please select media file", "Error", wxOK, WxMessageDialog1);
if (msg = wxOK){
Close();
}
}
else{
WxMediaCtrl1->Play();
}
}
Play Button Code Here:------
WxMediaCtrl1->Play();
I will show that how to read Media File using wxDev C++ IDE
How to load media file :-
(Screen Shot)
You need two button , one OpenFileDialog, One MessageDialog, WxMediaCtrl
Open Button Code Here:-------
wxString path;
if (WxOpenFileDialog1->ShowModal()==wxID_OK){
path = WxOpenFileDialog1->GetPath();
WxMediaCtrl1->Load(path);
if (not WxMediaCtrl1->Load(path)){
int msg = wxMessageBox("Please select media file", "Error", wxOK, WxMessageDialog1);
if (msg = wxOK){
Close();
}
}
else{
WxMediaCtrl1->Play();
}
}
Play Button Code Here:------
WxMediaCtrl1->Play();
Comments
Post a Comment