]>
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
7 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // for compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.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
)
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() )
51 msg
<< _(" Version ") << info
.GetVersion();
54 if ( info
.HasCopyright() )
55 msg
<< info
.GetCopyright() << _T('\n');
57 // add everything remaining
58 msg
<< info
.GetDescriptionAndCredits();
60 wxMessageBox(msg
, _T("About ") + name
);
62 else // simple "native" version is not enough
64 // we need to use the full-blown generic version
65 wxGenericAboutBox(info
);
69 #endif // wxUSE_ABOUTDLG