Author Topic: [wxSmith] Multiple Dialogs  (Read 2222 times)

Offline Dr.Optix

  • Multiple posting newcomer
  • *
  • Posts: 30
  • I'm studying OS Developing.
    • DrOptix Blog
[wxSmith] Multiple Dialogs
« on: June 26, 2009, 10:37:57 am »
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: DrOptix.WordPress.Com

Offline Dr.Optix

  • Multiple posting newcomer
  • *
  • Posts: 30
  • I'm studying OS Developing.
    • DrOptix Blog
Re: [wxSmith] Multiple Dialogs
« Reply #1 on: June 26, 2009, 12:21:30 pm »
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
Code: [Select]
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 :-
« Last Edit: June 26, 2009, 12:38:40 pm by Dr.Optix »
Occupation: Hobby Programmer
IDE: Code::Blocks Nightly / CodeLite Latest Stable
Compiler: TDM's GCC/mingw32
Blog: DrOptix.WordPress.Com