]>
git.saurik.com Git - wxWidgets.git/blob - src/msw/aboutdlg.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/aboutdlg.cpp
3 // Purpose: implementation of wxAboutBox() for wxMSW
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 // ============================================================================
12 // ============================================================================
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
18 // for compilers that support precompilation, includes "wx.h".
19 #include "wx/wxprec.h"
28 #include "wx/msgdlg.h"
31 #include "wx/aboutdlg.h"
32 #include "wx/generic/aboutdlgg.h"
34 // ============================================================================
36 // ============================================================================
38 // our public entry point
39 void wxAboutBox(const wxAboutDialogInfo
& info
, wxWindow
* parent
)
41 // we prefer to show a simple message box if we don't have any fields which
42 // can't be shown in it because as much as there is a standard about box
43 // under MSW at all, this is it
44 if ( info
.IsSimple() )
46 // build the text to show in the box
47 const wxString name
= info
.GetName();
50 if ( info
.HasVersion() )
53 msg
<< info
.GetLongVersion();
58 if ( info
.HasCopyright() )
59 msg
<< info
.GetCopyrightToDisplay() << wxT('\n');
61 // add everything remaining
62 msg
<< info
.GetDescriptionAndCredits();
64 wxMessageBox(msg
, wxString::Format(_("About %s"), name
), wxOK
| wxCENTRE
, parent
);
66 else // simple "native" version is not enough
68 // we need to use the full-blown generic version
69 wxGenericAboutBox(info
, parent
);
73 #endif // wxUSE_ABOUTDLG