Search found 25 matches

by xargon
Thu Jan 14, 2016 6:57 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 1247

Re: wxApp and the initial window show

Ok, It does not happen on the sample but it also does not happen for me if the constructor for the media control does not load a file. If I load the file in a separate method, it still happens but not everytime :( I will investigate this more tomorrow and update the thread. Thank you for all your he...
by xargon
Thu Jan 14, 2016 6:46 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 1247

Re: wxApp and the initial window show

So, I did that as well and it still happens. So the AppWindow constructor looks like: AppWindow::AppWindow(const wxString &title) :wxFrame(NULL, wxID_ANY, title, wxDefaultPosition) { SplashVideo video(wxT("/home/xargon/widescreen.avi"), NULL, wxID_ANY); video.Create(); video.ShowModal(); }
by xargon
Thu Jan 14, 2016 6:30 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 1247

Re: wxApp and the initial window show

I did the event handling thing as well and it still happens. I also tried removing the extra style thing and also happens...I will look into the sample now.
by xargon
Thu Jan 14, 2016 6:25 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 1247

Re: wxApp and the initial window show

DenDev wrote:Remove this and try again:

Code: Select all

if (!wxApp::OnInit())
            return false;
This I tried already and it does not help :(
by xargon
Thu Jan 14, 2016 6:18 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 1247

Re: wxApp and the initial window show

Ok, when I remove the SplashVideo dialog it does not happen. Then I show the dialog and without the wxMediaCtrl and it does not happen either. So, it seems perhaps the media control is created with some size and then positioned to where the dialog is! I tried now calling the CenterOnScreen() first b...
by xargon
Thu Jan 14, 2016 6:01 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 1247

Re: wxApp and the initial window show

I tried that as well and it still shows this initial window (which has the name of the compiled executable as the window title for some reason). I did: virtual bool OnInit() { if (!wxApp::OnInit()) return false; SplashVideo video(wxT("/home/xargon/widescreen.avi"), NULL, wxID_ANY); video.ShowModal()...
by xargon
Thu Jan 14, 2016 4:37 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 1247

wxApp and the initial window show

My wxApp application implementation looks as follows: // The main application class. class TestApp : public wxApp { public: virtual bool OnInit() { if (!wxApp::OnInit()) return false; AppWindow * app_win = new AppWindow(wxT("App")); // This derives from wxFrame new SplashVideo(wxT("/home/xargon/wide...
by xargon
Thu Jan 14, 2016 4:27 pm
Forum: C++ Development
Topic: Splash screen with video
Replies: 6
Views: 986

Re: Splash screen with video

Our posts just crossed :-)
by xargon
Thu Jan 14, 2016 4:10 pm
Forum: C++ Development
Topic: Splash screen with video
Replies: 6
Views: 986

Re: Splash screen with video

Another option could be to implement the splash screen as a modal dialog. Then the main frame would only get created after the dialog is closed. Is it possible to have the wxDialog inherited class with no taskbar as I have with my wxFrame derived SplashVideo class? [EDIT]: Never mind as I could jus...
by xargon
Thu Jan 14, 2016 4:01 pm
Forum: C++ Development
Topic: Splash screen with video
Replies: 6
Views: 986

Re: Splash screen with video

Thanks for the comments guys. Yes, could be that some of the code is not optimal. Just starting with wxWidgets.

Regarding the parent for the Splash screen, this is because it was like this in the sample, so I am assuming it is not a problem to do so.
by xargon
Thu Jan 14, 2016 2:48 pm
Forum: C++ Development
Topic: Splash screen with video
Replies: 6
Views: 986

Splash screen with video

I created a small class using wxMediaCtrl that will play a video as a splash screen. The code for the class is as follows: HEADER: #include <wx/wx.h> #include <wx/mediactrl.h> #include "macros.h" class SplashVideo: public wxFrame { public: SplashVideo(const wxString & video_path, wxWindow * parent, ...
by xargon
Thu Jan 14, 2016 2:30 pm
Forum: C++ Development
Topic: Generating IDs in wxWidgets
Replies: 2
Views: 727

Re: Generating IDs in wxWidgets

That's great advise! Thanks.
by xargon
Thu Jan 14, 2016 12:50 pm
Forum: C++ Development
Topic: Generating IDs in wxWidgets
Replies: 2
Views: 727

Generating IDs in wxWidgets

I just started using wxWidgets and looking at some examples when we want to give some identifiers which we can use in event connectors, I see the following usage: class MyClass { .... private: enum {MY_CTRL_ID=wxID_HIGHEST + 1}; } And then I can use this in a Connect() call for example, which works ...
by xargon
Wed Jan 13, 2016 5:17 pm
Forum: C++ Development
Topic: wxMediaCtrl: Usage questions
Replies: 1
Views: 244

wxMediaCtrl: Usage questions

I am using wxMediaCtrl to play some video files and I tried to put it all together from some very simple code samples on the web as follows: class PlayerApp : public wxApp { public: bool OnInit() { wxFrame *main = new wxFrame(NULL, wxID_ANY, wxT("App")); wxMediaCtrl *media = new wxMediaCtrl(main, wx...
by xargon
Wed Jan 13, 2016 4:20 pm
Forum: C++ Development
Topic: managing graphic and media resources
Replies: 2
Views: 416

Re: managing graphic and media resources

Thanks so much. Yes, I realized after reading a bit on wxMediaCtrl that this is not possible but I can make do with having a file being distributed with the app as well.