]> git.saurik.com Git - wxWidgets.git/blob - src/msw/aboutdlg.cpp
Correct erasing of background behind controls in a toolbar in wxMSW.
[wxWidgets.git] / src / msw / aboutdlg.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/aboutdlg.cpp
3 // Purpose: implementation of wxAboutBox() for wxMSW
4 // Author: Vadim Zeitlin
5 // Created: 2006-10-07
6 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 // ============================================================================
11 // declarations
12 // ============================================================================
13
14 // ----------------------------------------------------------------------------
15 // headers
16 // ----------------------------------------------------------------------------
17
18 // for compilers that support precompilation, includes "wx.h".
19 #include "wx/wxprec.h"
20
21 #ifdef __BORLANDC__
22 #pragma hdrstop
23 #endif
24
25 #if wxUSE_ABOUTDLG
26
27 #ifndef WX_PRECOMP
28 #include "wx/msgdlg.h"
29 #endif //WX_PRECOMP
30
31 #include "wx/aboutdlg.h"
32 #include "wx/generic/aboutdlgg.h"
33
34 // ============================================================================
35 // implementation
36 // ============================================================================
37
38 // our public entry point
39 void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
40 {
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() )
45 {
46 // build the text to show in the box
47 const wxString name = info.GetName();
48 wxString msg;
49 msg << name;
50 if ( info.HasVersion() )
51 {
52 msg << wxT('\n');
53 msg << info.GetLongVersion();
54 }
55
56 msg << wxT("\n\n");
57
58 if ( info.HasCopyright() )
59 msg << info.GetCopyrightToDisplay() << wxT('\n');
60
61 // add everything remaining
62 msg << info.GetDescriptionAndCredits();
63
64 wxMessageBox(msg, wxString::Format(_("About %s"), name), wxOK | wxCENTRE, parent);
65 }
66 else // simple "native" version is not enough
67 {
68 // we need to use the full-blown generic version
69 wxGenericAboutBox(info, parent);
70 }
71 }
72
73 #endif // wxUSE_ABOUTDLG