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();


Comments

Popular posts from this blog

Complete Python Database Project with sqlite3

Complete StopWatch in Java with source code

System sound recorder using NAudio dll with complete code