+#if wxUSE_ABOUTDLG
+
+static void InitAboutInfoMinimal(wxAboutDialogInfo& info)
+{
+ info.SetName(_T("Dialogs Sample"));
+ info.SetVersion(wxVERSION_NUM_DOT_STRING_T);
+ info.SetDescription(_T("This sample shows different wxWidgets dialogs"));
+ info.SetCopyright(_T("(C) 1998-2006 wxWidgets dev team"));
+ info.AddDeveloper(_T("Vadim Zeitlin"));
+}
+
+static void InitAboutInfoWebsite(wxAboutDialogInfo& info)
+{
+ InitAboutInfoMinimal(info);
+
+ info.SetWebSite(_T("http://www.wxwidgets.org/"), _T("wxWidgets web site"));
+}
+
+static void InitAboutInfoAll(wxAboutDialogInfo& info)
+{
+ InitAboutInfoMinimal(info);
+
+ // we can add a second developer
+ info.AddDeveloper(_T("A.N. Other"));
+
+ // or we can add several persons at once like this
+ static const wxChar *docwriters[] =
+ {
+ _T("First D. Writer"),
+ _T("Second One"),
+ };
+
+ info.SetDocWriters(wxArrayString(WXSIZEOF(docwriters), docwriters));
+ info.SetLicence(wxString::FromAscii(
+" wxWindows Library Licence, Version 3.1\n"
+" ======================================\n"
+"\n"
+" Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al\n"
+"\n"
+" Everyone is permitted to copy and distribute verbatim copies\n"
+" of this licence document, but changing it is not allowed.\n"
+"\n"
+" WXWINDOWS LIBRARY LICENCE\n"
+" TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n"
+"\n"
+" ...and so on and so forth...\n"
+ ));
+
+ info.AddTranslator(_T("Wun Ngo Wen (Martian)"));
+}
+
+void MyFrame::ShowSimpleAboutDialog(wxCommandEvent& WXUNUSED(event))
+{
+ wxAboutDialogInfo info;
+ InitAboutInfoMinimal(info);
+
+ wxAboutBox(info);
+}
+
+void MyFrame::ShowFancyAboutDialog(wxCommandEvent& WXUNUSED(event))
+{
+ wxAboutDialogInfo info;
+ InitAboutInfoWebsite(info);
+
+ wxAboutBox(info);
+}
+
+void MyFrame::ShowFullAboutDialog(wxCommandEvent& WXUNUSED(event))
+{
+ wxAboutDialogInfo info;
+ InitAboutInfoAll(info);
+
+ wxAboutBox(info);
+}
+
+void MyFrame::ShowCustomAboutDialog(wxCommandEvent& WXUNUSED(event))
+{
+ class MyAboutDialog : public wxGenericAboutDialog
+ {
+ public:
+ MyAboutDialog(const wxAboutDialogInfo& info)
+ {
+ Create(info);
+ }
+
+ // add some custom controls
+ virtual void DoAddCustomControls()
+ {
+ AddControl(new wxStaticLine(this), wxSizerFlags().Expand());
+ AddText(_T("Some custom text"));
+ AddControl(new wxStaticLine(this), wxSizerFlags().Expand());
+ }
+ };
+
+ wxAboutDialogInfo info;
+ InitAboutInfoAll(info);
+
+ MyAboutDialog dlg(info);
+ dlg.ShowModal();
+}
+
+#endif // wxUSE_ABOUTDLG
+