Search found 71 matches

by marcusbarnet
Sun Jan 26, 2020 6:12 pm
Forum: Compiler / Linking / IDE Related
Topic: fatal error: wx/setup.h: No such file or directory
Replies: 5
Views: 482

fatal error: wx/setup.h: No such file or directory

I'm trying to setup the environment to use WxWidgets on Windows by using Codeblocks. (I can successfully use WxWidgets in Ubuntu, but I do not use Microsoft Windows very often so I'm having hard time to correctly setup everything). I followed this guide: https://wiki.wxwidgets.org/CodeBlocks_Setup_G...
by marcusbarnet
Sun Nov 03, 2019 9:45 pm
Forum: C++ Development
Topic: Refresh panels in wxnotebook
Replies: 8
Views: 790

Re: Refresh panels in wxnotebook

Your suggestion solved the problem, thank you!

Is that a problem which can occurs only with some compilers/systems or it is a common problem when you cross the headers?
by marcusbarnet
Sun Nov 03, 2019 7:26 pm
Forum: C++ Development
Topic: Refresh panels in wxnotebook
Replies: 8
Views: 790

Re: Refresh panels in wxnotebook

I'm having a problem and I can't understand why! I was changing my code to fit your suggestions, I tried to compile it and I get this error: In file included from /home/isola/Documents/Isola02/Isola02Main.h:15:0, from /home/isola/Documents/Isola02/Isola02Main.cpp:10: /home/isola/Documents/Isola02/fi...
by marcusbarnet
Sun Oct 27, 2019 8:07 pm
Forum: C++ Development
Topic: Refresh panels in wxnotebook
Replies: 8
Views: 790

Re: Refresh panels in wxnotebook

I declared: firstpanel *first; secondpanel *second; as global in Isola02Main.cpp and then I specified a function in Isola02Frame.cpp: void Isola02Frame::panel_refresh(){ first->errore->Hide(); first->tessera->Clear(); } //secondpanel.cpp void secondpanel::OnBitmapButton1Click(wxCommandEvent& event) ...
by marcusbarnet
Sun Oct 27, 2019 7:59 pm
Forum: C++ Development
Topic: Refresh panels in wxnotebook
Replies: 8
Views: 790

Re: Refresh panels in wxnotebook

what is the best solution to reset every single controls and every single variable? All the panels are created in: //isola02Main.cpp Isola02Frame::Isola02Frame(const wxString& title) : wxFrame(NULL, wxID_ANY, title) { wxInitAllImageHandlers(); // Create a top-level panel to hold all the contents of ...
by marcusbarnet
Sun Oct 27, 2019 5:59 pm
Forum: C++ Development
Topic: Refresh panels in wxnotebook
Replies: 8
Views: 790

Refresh panels in wxnotebook

What is the best method to refresh panels in wxnotebook? My application flow let the user navigate from panel 1 to panel 3, at the end of the procedure, the user can load a new operation starting from panel 1. I would like to reload the first panel by clearing all the forms and all the values previo...
by marcusbarnet
Sat Oct 26, 2019 7:27 pm
Forum: C++ Development
Topic: How to play and stop mp3 asynchronously
Replies: 14
Views: 1256

Re: How to play and stop mp3 asynchronously

doublemax, thank you a lot! I follwed you suggestion and now it works. I used the same pointer you told me to add during the creation of the panels last Sunday and I moved the functions to the main frame. // main class class Isola02Frame : public wxFrame { public: Isola02Frame(const wxString& title)...
by marcusbarnet
Sat Oct 26, 2019 4:10 pm
Forum: C++ Development
Topic: How to play and stop mp3 asynchronously
Replies: 14
Views: 1256

Re: How to play and stop mp3 asynchronously

I tried to compile it, but I receive lots of errors: g++ doc_libvlc_wx_player.cpp `wx-config --libs` `wx-config --cxxflags` `pkg-config --cflags gtk+-2.0 libvlc` `pkg-config --libs gtk+-2.0 libvlc` -o wx_player doc_libvlc_wx_player.cpp:14:14: fatal error: gtk/win_gtk.h: No such file or directory Fr...
by marcusbarnet
Sat Oct 26, 2019 11:58 am
Forum: C++ Development
Topic: How to play and stop mp3 asynchronously
Replies: 14
Views: 1256

Re: How to play and stop mp3 asynchronously

Like i already explained a few times, it's bad to call a method from one panel from another panel. You'll always run into these kind of problem. Now panel2 needs to know that panel1 exists and it needs a pointer to it. These kind of dependencies should ring an alarm bell in your head. Use their par...
by marcusbarnet
Sat Oct 26, 2019 11:49 am
Forum: C++ Development
Topic: How to play and stop mp3 asynchronously
Replies: 14
Views: 1256

Re: How to play and stop mp3 asynchronously

Here's sample code for a minimal media player using libvlc with wxWidgets: https://git.videolan.org/?p=vlc.git;a=blob;f=doc/libvlc/wx_player.cpp No threads are needed. I tried to compile it, but I receive lots of errors: g++ doc_libvlc_wx_player.cpp `wx-config --libs` `wx-config --cxxflags` `pkg-co...
by marcusbarnet
Sat Oct 26, 2019 7:25 am
Forum: C++ Development
Topic: How to play and stop mp3 asynchronously
Replies: 14
Views: 1256

Re: How to play and stop mp3 asynchronously

I usually use this procedure to declare variables and I get only a warning since they works fine at runtime so I wasnt thinking that the problem could be that.

How can I correctly initialize the ptr?
Can you give me an example please?
by marcusbarnet
Sat Oct 26, 2019 6:44 am
Forum: C++ Development
Topic: How to play and stop mp3 asynchronously
Replies: 14
Views: 1256

Re: How to play and stop mp3 asynchronously

Thank you for your support! This is the output: [New Thread 0x7fffafd23700 (LWP 9736)] hey Thread 1 "Isola02" received signal SIGSEGV, Segmentation fault. 0x0000555555689484 in secondpanel::OnBitmapButton2Click (this=0x555555f32840, event=...) at /home/isola/Documents/Isola02/secondpanel.cpp:96 96 p...
by marcusbarnet
Fri Oct 25, 2019 9:28 pm
Forum: C++ Development
Topic: How to play and stop mp3 asynchronously
Replies: 14
Views: 1256

Re: How to play and stop mp3 asynchronously

I can't access my laptop right now, but it should be the last version since I installed the library few weeks ago by using apt-get. I didn't launch the mediaplayer example because when I saw it I realized that it comes with a gui to control the music file. I just need to run the mp3 in background (i...
by marcusbarnet
Fri Oct 25, 2019 6:51 pm
Forum: C++ Development
Topic: How to play and stop mp3 asynchronously
Replies: 14
Views: 1256

How to play and stop mp3 asynchronously

I'm struggling with no success to find a way to play mp3 files asynchronously and to stop them depending on user's actions. I do not want to stop the program's flow since the mp3 are like a voice over to support the user during the use of the application. I'm using C++ and Ubuntu 18.04 and WxWidgets...
by marcusbarnet
Sun Oct 20, 2019 7:52 pm
Forum: C++ Development
Topic: Static Text strings in wxwidgets
Replies: 7
Views: 788

Re: Static Text strings in wxwidgets

Yes I think it can help a little bit the visualization, thank you!