]> git.saurik.com Git - wxWidgets.git/blame - src/msw/aboutdlg.cpp
Don't use DDEExec registry key in wxMSW wxExecute() if it's empty.
[wxWidgets.git] / src / msw / aboutdlg.cpp
CommitLineData
ca7adbf8
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: src/msw/aboutdlg.cpp
3// Purpose: implementation of wxAboutBox() for wxMSW
4// Author: Vadim Zeitlin
5// Created: 2006-10-07
ca7adbf8
VZ
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
a01446c5 28 #include "wx/msgdlg.h"
ca7adbf8
VZ
29#endif //WX_PRECOMP
30
31#include "wx/aboutdlg.h"
32#include "wx/generic/aboutdlgg.h"
33
34// ============================================================================
35// implementation
36// ============================================================================
37
ca7adbf8 38// our public entry point
c173e541 39void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
ca7adbf8
VZ
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
fd3f8f5c 44 if ( info.IsSimple() )
ca7adbf8
VZ
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() )
fd3a0ca9 51 {
9a83f860 52 msg << wxT('\n');
704006b3 53 msg << info.GetLongVersion();
fd3a0ca9
VS
54 }
55
9a83f860 56 msg << wxT("\n\n");
ca7adbf8
VZ
57
58 if ( info.HasCopyright() )
9a83f860 59 msg << info.GetCopyrightToDisplay() << wxT('\n');
ca7adbf8 60
fd3f8f5c
VZ
61 // add everything remaining
62 msg << info.GetDescriptionAndCredits();
ca7adbf8 63
a23a0a45 64 wxMessageBox(msg, wxString::Format(_("About %s"), name), wxOK | wxCENTRE, parent);
ca7adbf8 65 }
fd3f8f5c
VZ
66 else // simple "native" version is not enough
67 {
68 // we need to use the full-blown generic version
c173e541 69 wxGenericAboutBox(info, parent);
fd3f8f5c 70 }
ca7adbf8
VZ
71}
72
73#endif // wxUSE_ABOUTDLG