// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all 'standard' wxWidgets headers)
#ifndef WX_PRECOMP
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all 'standard' wxWidgets headers)
#ifndef WX_PRECOMP
-#include <wx/config.h> // configuration support
-#include <wx/filedlg.h> // file dialog support
-#include <wx/filename.h> // filename support
-#include <wx/notebook.h> // notebook support
-#include <wx/settings.h> // system settings
-#include <wx/string.h> // strings support
-#include <wx/image.h> // images support
+#include "wx/config.h" // configuration support
+#include "wx/filedlg.h" // file dialog support
+#include "wx/filename.h" // filename support
+#include "wx/notebook.h" // notebook support
+#include "wx/settings.h" // system settings
+#include "wx/string.h" // strings support
+#include "wx/image.h" // images support
//! global print data, to remember settings during the session
wxPrintData *g_printData = (wxPrintData*) NULL;
wxPageSetupData *g_pageSetupData = (wxPageSetupData*) NULL;
//! global print data, to remember settings during the session
wxPrintData *g_printData = (wxPrintData*) NULL;
wxPageSetupData *g_pageSetupData = (wxPageSetupData*) NULL;
//----------------------------------------------------------------------------
//! application APP_VENDOR-APP_NAME.
//----------------------------------------------------------------------------
//! application APP_VENDOR-APP_NAME.
// initialize print data and setup
g_printData = new wxPrintData;
g_pageSetupData = new wxPageSetupDialogData;
// initialize print data and setup
g_printData = new wxPrintData;
g_pageSetupData = new wxPageSetupDialogData;
// delete global print data and setup
if (g_printData) delete g_printData;
if (g_pageSetupData) delete g_pageSetupData;
// delete global print data and setup
if (g_printData) delete g_printData;
if (g_pageSetupData) delete g_pageSetupData;
- wxFileDialog dlg (this, _T("Open file"), _T(""), _T(""), _T("Any file (*)|*"),
+ wxFileDialog dlg (this, _T("Open file"), wxEmptyString, wxEmptyString, _T("Any file (*)|*"),
- wxFileDialog dlg (this, _T("Save file"), _T(""), _T(""), _T("Any file (*)|*"), wxSAVE|wxOVERWRITE_PROMPT);
+ wxFileDialog dlg (this, _T("Save file"), wxEmptyString, wxEmptyString, _T("Any file (*)|*"), wxSAVE|wxOVERWRITE_PROMPT);
if (dlg.ShowModal() != wxID_OK) return;
filename = dlg.GetPath();
m_edit->SaveFile (filename);
if (dlg.ShowModal() != wxID_OK) return;
filename = dlg.GetPath();
m_edit->SaveFile (filename);
(*g_pageSetupData) = * g_printData;
wxPageSetupDialog pageSetupDialog(this, g_pageSetupData);
pageSetupDialog.ShowModal();
(*g_printData) = pageSetupDialog.GetPageSetupData().GetPrintData();
(*g_pageSetupData) = pageSetupDialog.GetPageSetupData();
(*g_pageSetupData) = * g_printData;
wxPageSetupDialog pageSetupDialog(this, g_pageSetupData);
pageSetupDialog.ShowModal();
(*g_printData) = pageSetupDialog.GetPageSetupData().GetPrintData();
(*g_pageSetupData) = pageSetupDialog.GetPageSetupData();
wxPrintDialogData printDialogData( *g_printData);
wxPrintPreview *preview =
new wxPrintPreview (new EditPrint (m_edit),
wxPrintDialogData printDialogData( *g_printData);
wxPrintPreview *preview =
new wxPrintPreview (new EditPrint (m_edit),
wxPrintDialogData printDialogData( *g_printData);
wxPrinter printer (&printDialogData);
EditPrint printout (m_edit);
wxPrintDialogData printDialogData( *g_printData);
wxPrinter printer (&printDialogData);
EditPrint printout (m_edit);
// File menu
wxMenu *menuFile = new wxMenu;
menuFile->Append (wxID_OPEN, _("&Open ..\tCtrl+O"));
// File menu
wxMenu *menuFile = new wxMenu;
menuFile->Append (wxID_OPEN, _("&Open ..\tCtrl+O"));
m_menuBar->Append (menuWindow, _("&Window"));
m_menuBar->Append (menuHelp, _("&Help"));
SetMenuBar (m_menuBar);
m_menuBar->Append (menuWindow, _("&Window"));
m_menuBar->Append (menuHelp, _("&Help"));
SetMenuBar (m_menuBar);