Search found 71 matches

by marcusbarnet
Mon Oct 07, 2019 5:04 pm
Forum: C++ Development
Topic: Why thread doesn't close in WxWidgets
Replies: 5
Views: 324

Re: Why thread doesn't close in WxWidgets

Yes, I'm sure, but for the moment, I solved by using a fork().

It seems to work!
by marcusbarnet
Mon Oct 07, 2019 4:19 pm
Forum: C++ Development
Topic: Why thread doesn't close in WxWidgets
Replies: 5
Views: 324

Re: Why thread doesn't close in WxWidgets

If I use vlc library directly without thread or fork() the program blocks until the file is not fully played.
by marcusbarnet
Mon Oct 07, 2019 4:10 pm
Forum: C++ Development
Topic: Why thread doesn't close in WxWidgets
Replies: 5
Views: 324

Re: Why thread doesn't close in WxWidgets

so how can I stop the mp3 before going to the next frame?

Shouldn't I use the thread solution?
I do not want to block the program execution while the mp3 is playing.
by marcusbarnet
Mon Oct 07, 2019 2:08 pm
Forum: C++ Development
Topic: Why thread doesn't close in WxWidgets
Replies: 5
Views: 324

Why thread doesn't close in WxWidgets

I'm on Ubuntu and I'm using WxWidgets with C/C++. I need to reproduce some mp3 files without blocking the application flow and so I tried to use threads. I create a new thread to reproduce music with vlc libraries and I want to kill it when the user press a button to load a new frame. Unfortunately,...
by marcusbarnet
Mon Oct 07, 2019 7:44 am
Forum: C++ Development
Topic: Clear a WxTextCtrl after few seconds
Replies: 7
Views: 441

Re: Clear a WxTextCtrl after few seconds

I can't understand why the first frame keeps reloading if the timer is set only in the second frame.
by marcusbarnet
Sat Oct 05, 2019 6:12 pm
Forum: C++ Development
Topic: Clear a WxTextCtrl after few seconds
Replies: 7
Views: 441

Re: Clear a WxTextCtrl after few seconds

Thank you a lot for you tip. I was able to successfully use the wxTimerEvent. I just have a problem because I tried to set a timeout on my second frame in order to reloads the first frame when there is no user action for more than 5 minutes. It seems to work, but when it returns to the first frame, ...
by marcusbarnet
Wed Oct 02, 2019 7:16 pm
Forum: C++ Development
Topic: Clear a WxTextCtrl after few seconds
Replies: 7
Views: 441

Re: Clear a WxTextCtrl after few seconds

Can you please show me a simple example on how to use it?

I'm not an expert so I'm not figuring out how to use it.

Thank you
by marcusbarnet
Wed Oct 02, 2019 5:54 pm
Forum: C++ Development
Topic: Clear a WxTextCtrl after few seconds
Replies: 7
Views: 441

Re: Clear a WxTextCtrl after few seconds

I can't click a button in order to make the timer starts.

The timer should starts automatically when the first character is typed in the text control.

I do not know how to do that.
by marcusbarnet
Wed Oct 02, 2019 5:03 pm
Forum: C++ Development
Topic: Clear a WxTextCtrl after few seconds
Replies: 7
Views: 441

Clear a WxTextCtrl after few seconds

I have an application that reads data from a magnetic card reader. It starts with a WxTextCtrl with focus ON so the cursor is already in position and when the user swipes the card, all the characters are automatically typed in the text control. The problem is that sometimes the swiping is not correc...
by marcusbarnet
Tue Oct 01, 2019 9:47 pm
Forum: C++ Development
Topic: Reload WxWidgets session
Replies: 15
Views: 660

Re: Reload WxWidgets session

I solved the problem with the window size by setting it after loading the new frame.
by marcusbarnet
Tue Oct 01, 2019 9:52 am
Forum: C++ Development
Topic: Reload WxWidgets session
Replies: 15
Views: 660

Re: Reload WxWidgets session

Thank you a lot for your help and support! I did in this way: void ThirdPage::Onbutton_homeClick(wxCommandEvent& event) { firstpage = new ProjectFrame(NULL, -1, ); //here we create 1 page firstpage->Show(true); //show it this->Destroy(); //and destroy page3 //then you do not need to modify destructo...
by marcusbarnet
Mon Sep 30, 2019 10:41 pm
Forum: C++ Development
Topic: Reload WxWidgets session
Replies: 15
Views: 660

Re: Reload WxWidgets session

Can you provide me an example for the first page, please?

I'm not able to understand how to create Frame2 when I destroy frame1.

Code: Select all

ProjectFrame::~ProjectFrame()
{
    //(*Destroy(ProjectFrame)
    //*)
   
    }
by marcusbarnet
Mon Sep 30, 2019 10:14 pm
Forum: C++ Development
Topic: Reload WxWidgets session
Replies: 15
Views: 660

Re: Reload WxWidgets session

I can't change everything at this point. I just would like to find a solution without changing a lot my current application. On frame3, I did this: void ThirdPage::Onbutton_homeClick(wxCommandEvent& event) { firstpage->Show(true); // firstpage->tessera->Clear() this->Hide(); firstpage->Destroy(); .....
by marcusbarnet
Mon Sep 30, 2019 9:52 pm
Forum: C++ Development
Topic: Reload WxWidgets session
Replies: 15
Views: 660

Re: Reload WxWidgets session

No, the user navigate through the frames by filling some forms and other operations. The application works on a Kiosk, so he user does the login, insert some data and then when he finishes he can click on a "DONE" button to come back to Frame1 and allow other users to make the same procedure. At the...
by marcusbarnet
Mon Sep 30, 2019 8:46 pm
Forum: C++ Development
Topic: Reload WxWidgets session
Replies: 15
Views: 660

Re: Reload WxWidgets session

When the user comes back to frame1, all the text controls are already filled with old data and all the variables are set to old values.

How can I destroy the frames and rebuild them again?