forked from oreillymedia/Learning-OpenCV-3_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_09-08.cpp
30 lines (30 loc) · 831 Bytes
/
example_09-08.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//Example 9-8. An example program which takes a single argument
//indicating a video file; that video file will be replayed inside of a wxWidgets object that
//we will define, called WxMoviePlayer
//
#include "wx/wx.h"
#include "WxMoviePlayer.hpp"
// Application class, the top level object in wxWidgets
//
class MyApp : public wxApp {
public:
virtual bool OnInit();
};
// Behind the scenes stuff to create a main() function and attach MyApp
//
DECLARE_APP( MyApp );
IMPLEMENT_APP( MyApp );
// When MyApp is initialized, do these things.
//
bool MyApp::OnInit() {
wxFrame* frame = new wxFrame( NULL, wxID_ANY, wxT("ch4_wx") );
frame->Show( true );
WxMoviePlayer* mp = new WxMoviePlayer(
frame,
wxPoint( -1, -1 ),
wxSize( 640, 480 )
);
mp->open( wxString(argv[1]) );
mp->Show( true );
return true;
}