]>
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" 
  29     #include "wx/msgdlg.h" 
  32 #include "wx/aboutdlg.h" 
  33 #include "wx/generic/aboutdlgg.h" 
  35 // ============================================================================ 
  37 // ============================================================================ 
  39 // our public entry point 
  40 void wxAboutBox(const wxAboutDialogInfo
& info
) 
  42     // we prefer to show a simple message box if we don't have any fields which 
  43     // can't be shown in it because as much as there is a standard about box 
  44     // under MSW at all, this is it 
  45     if ( info
.IsSimple() ) 
  47         // build the text to show in the box 
  48         const wxString name 
= info
.GetName(); 
  51         if ( info
.HasVersion() ) 
  52             msg 
<< _(" Version ") << info
.GetVersion(); 
  55         if ( info
.HasCopyright() ) 
  56             msg 
<< info
.GetCopyright() << _T('\n'); 
  58         // add everything remaining 
  59         msg 
<< info
.GetDescriptionAndCredits(); 
  61         wxMessageBox(msg
, _T("About ") + name
); 
  63     else // simple "native" version is not enough 
  65         // we need to use the full-blown generic version 
  66         wxGenericAboutBox(info
); 
  70 #endif // wxUSE_ABOUTDLG