News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

[wxSmith] Multiple Dialogs

Started by Dr.Optix, June 26, 2009, 10:37:57 AM

Previous topic - Next topic

Dr.Optix

Hello currently I'm working for a music player and I need to have multiple dialogs like (DlgMain, DlgSelectOutputDeviceDeckA,DlgSelectOutputDeviceDeckB etc).

My question is how I can do something like this using wxSmith:

One dialog have an button on it ("About"), when I click "About" I want a dialog to show up with information about my player. Also I want to note that I'm a beginner with wxWidgets and wxSmith, until now all I did were one dialog apps and the the about section was a simple MessageBox, but now I can't use this approch because my dialog needs to contain a photo with the team who was working on the

~Dr.Optix
Occupation: Hobby Programmer
IDE: Code::Blocks Nightly / CodeLite Latest Stable
Compiler: TDM's GCC/mingw32
Blog: [url="//droptix.wordpress.com"]DrOptix.WordPress.Com[/url]

Dr.Optix

#1
Well I solved this issue by looking at Code::Blocks source

Here is the code that is executed when clicking on Help->About, let's asume this code is in MainFrame.cpp
void MainFrame::OnHelpAbout(wxCommandEvent& WXUNUSED(event))
{
   dlgAbout dlg(this);
   PlaceWindow(&dlg, pdlHead);
   dlg.ShowModal();
}


Also the header where dlgAbout is declared have to be manually included the header where it is declared.

Hope this helps in case others face the same problem

~Dr.Optix

PS: i'm not so good at giving explanations :)

EDIT:
so maybe WE can add some option to wxSmith something like child dialogs for a dialog and then based on that list the main dialog include the needed headers. Maybe this is already implemented but i didn't seen it :-
Occupation: Hobby Programmer
IDE: Code::Blocks Nightly / CodeLite Latest Stable
Compiler: TDM's GCC/mingw32
Blog: [url="//droptix.wordpress.com"]DrOptix.WordPress.Com[/url]