remove old diff file
authorKevin Rosenberg <kevin@rosenberg.net>
Sat, 1 Aug 2009 19:54:21 +0000 (13:54 -0600)
committerKevin Rosenberg <kevin@rosenberg.net>
Sat, 1 Aug 2009 19:54:21 +0000 (13:54 -0600)
initial-wx2.8-mods.diff [deleted file]

diff --git a/initial-wx2.8-mods.diff b/initial-wx2.8-mods.diff
deleted file mode 100644 (file)
index 584d874..0000000
+++ /dev/null
@@ -1,4294 +0,0 @@
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/libctgraphics/sgp.cpp ctsim-wx2.8/libctgraphics/sgp.cpp
---- ctsim/libctgraphics/sgp.cpp        2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/libctgraphics/sgp.cpp  2008-07-21 10:08:10.840312064 -0600
-@@ -570,9 +570,8 @@
- {
- #if HAVE_WXWINDOWS
-   if (m_driver.isWX()) {
--    wxString sText (szText);
-     wxCoord deviceW, deviceH;
--    m_driver.idWX()->GetTextExtent (sText, &deviceW, &deviceH);
-+    m_driver.idWX()->GetTextExtent (wxConvCurrent->cMB2WC(szText), &deviceW, &deviceH);
-     if (m_dTextAngle == 90 || m_dTextAngle == -90) {
-       wxCoord temp = deviceW;
-       deviceW = deviceH;
-@@ -722,8 +721,7 @@
- #endif
- #if HAVE_WXWINDOWS
-   if (m_driver.isWX()) {
--    wxString str (pszMessage);
--    m_driver.idWX()->DrawRotatedText (str, m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle);
-+    m_driver.idWX()->DrawRotatedText (wxConvCurrent->cMB2WC(pszMessage), m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle);
-   }
- #endif
- }
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/libctsupport/syserror.cpp ctsim-wx2.8/libctsupport/syserror.cpp
---- ctsim/libctsupport/syserror.cpp    2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/libctsupport/syserror.cpp      2008-07-21 10:08:10.852312800 -0600
-@@ -57,15 +57,15 @@
-   if (g_bRunningWXWindows) {
-     if (theApp) {
-       wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
--      wxString msg (strOutput.c_str());
-+      wxString msg (wxConvCurrent->cMB2WX(strOutput.c_str()));
-       if (msg.length() > 0) {
--        msg += "\n";
-+        msg += wxChar('\n');
-         eventLog.SetString( msg );
-         wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event, thread safe
-       }
-     } else {
-       wxMutexGuiEnter();
--      wxLog::OnLog (wxLOG_Message, strOutput.c_str(), time(NULL));
-+      wxLog::OnLog (wxLOG_Message, wxConvCurrent->cMB2WX(strOutput.c_str()), time(NULL));
-       wxMutexGuiLeave();
-     }
-   }
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/backgroundmgr.cpp ctsim-wx2.8/src/backgroundmgr.cpp
---- ctsim/src/backgroundmgr.cpp        2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/backgroundmgr.cpp  2008-07-21 10:08:10.864313536 -0600
-@@ -108,7 +108,7 @@
- BackgroundManager::OnAddTask (wxCommandEvent& event)
- {
-   int iNumUnits = event.GetInt();
--  const char* const pszTaskName = event.GetString().c_str();
-+  const char* const pszTaskName = event.GetString().mb_str(wxConvUTF8);
-   BackgroundSupervisor* pSupervisor = reinterpret_cast<BackgroundSupervisor*>(event.GetClientData());
-   if (pSupervisor == NULL) {
-     sys_error (ERR_SEVERE, "Received NULL supervisor [BackgroundManager::OnAddTask]");
-@@ -139,7 +139,7 @@
-   wxPoint posLabel (m_sizeBorder.x + m_sizeGauge.x, m_sizeBorder.y + iFirstUnusedPos * m_sizeCell.y);
-   wxPoint posButton (m_sizeBorder.x + m_sizeGauge.x + m_sizeLabel.x, m_sizeBorder.y + iFirstUnusedPos * m_sizeCell.y);
-   wxGauge* pGauge = new wxGauge (m_pCanvas, -1, iNumUnits, posGauge, m_sizeGauge);
--  wxStaticText* pLabel = new wxStaticText (m_pCanvas, -1, pszTaskName, posLabel, m_sizeLabel);
-+  wxStaticText* pLabel = new wxStaticText (m_pCanvas, -1, wxConvUTF8.cMB2WX(pszTaskName), posLabel, m_sizeLabel);
-   wxButton* pButton = new wxButton (m_pCanvas, s_iNextButtonID, _T("Cancel"), posButton, m_sizeButton, wxBU_LEFT);
-   BackgroundManagerTask* pTask = new BackgroundManagerTask (pSupervisor, pszTaskName,
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/backgroundsupr.cpp ctsim-wx2.8/src/backgroundsupr.cpp
---- ctsim/src/backgroundsupr.cpp       2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/backgroundsupr.cpp 2008-07-29 20:10:53.735726313 -0600
-@@ -57,7 +57,7 @@
--BackgroundSupervisor::BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, const char* const pszProcessTitle, int iTotalUnits)
-+BackgroundSupervisor::BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, wxChar const* pszProcessTitle, int iTotalUnits)
-     : wxEvtHandler(), m_pMyThread(pMyThread), m_pParentFrame(pParentFrame), m_pDocument(pDocument), m_strProcessTitle(pszProcessTitle),
-     m_iTotalUnits(iTotalUnits), m_iNumThreads(0), m_bDone(false), m_bFail(false), m_bCancelled(false), m_iRunning(0),
-     m_pTimer(NULL), m_bWorkersDeleted(false), m_bBackgroundManagerAdded(false)
-@@ -120,12 +120,12 @@
-     m_vecpThreads[iThread] = createWorker (iThread, iStartUnit, iNumUnits);
-     if (! m_vecpThreads[iThread]) {
-       m_bFail = true;
--      m_strFailMessage = "createWorker returned NULL [BackgroundSupervisor]";
-+      m_strFailMessage = _T("createWorker returned NULL [BackgroundSupervisor]");
-       break;
-     }
-     if (m_vecpThreads[iThread]->Create () != wxTHREAD_NO_ERROR) {
-       m_bFail = true;
--      m_strFailMessage = "Thread creation failed [BackgroundSupervisor]";
-+      m_strFailMessage = _T("Thread creation failed [BackgroundSupervisor]");
-       break;
-     }
-    m_vecpThreads[iThread]->SetPriority (40);
-@@ -136,13 +136,13 @@
-   m_pTimer = new Timer;
--  std::string strLabel (m_strProcessTitle);
--  strLabel += " ";
--  strLabel += m_pParentFrame->GetTitle();
-+  wxString strLabel (m_strProcessTitle);
-+  strLabel += _T(" ");
-+  strLabel += dynamic_cast<wxFrame*>(m_pParentFrame)->GetTitle();
- #ifdef USE_BKGMGR
-   wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_ADD);
--  addTaskEvent.SetString (strLabel.c_str());
-+  addTaskEvent.SetString (strLabel);
-   addTaskEvent.SetInt (m_iTotalUnits);
-   addTaskEvent.SetClientData (this);
-   wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
-@@ -192,7 +192,7 @@
- #ifdef DEBUG
-   if (theApp->getVerboseLogging()) {
-     wxString msg;
--    msg.Printf("Background Supervisor: Thread finished. Remaining threads: %d\n", m_iRunning);
-+    msg.Printf(_T("Background Supervisor: Thread finished. Remaining threads: %d\n"), m_iRunning);
-     wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
-     eventLog.SetString( msg );
-     wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
-@@ -203,11 +203,11 @@
- }
- void
--BackgroundSupervisor::onWorkerFail (int iThread, std::string strFailMessage)
-+BackgroundSupervisor::onWorkerFail (int iThread, const wxString& strFailMessage)
- {
-   m_iRunning--;
-   wxCommandEvent eventLog( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
--  eventLog.SetString( strFailMessage.c_str() );
-+  eventLog.SetString( strFailMessage );
-   wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
-   onCancel();
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/backgroundsupr.h ctsim-wx2.8/src/backgroundsupr.h
---- ctsim/src/backgroundsupr.h 2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/backgroundsupr.h   2008-07-29 20:09:41.539253901 -0600
-@@ -57,13 +57,13 @@
-   SupervisorThread* m_pMyThread;
-   wxWindow* m_pParentFrame;
-   BackgroundProcessingDocument* m_pDocument;
--  const std::string m_strProcessTitle;
-+  const wxString m_strProcessTitle;
-   const unsigned int m_iTotalUnits;
-   int m_iNumThreads;
-   volatile bool m_bDone;
-   volatile bool m_bFail;
--  std::string m_strFailMessage;
-+  wxString m_strFailMessage;
-   volatile bool m_bCancelled;
-   volatile int m_iRunning;
-   volatile unsigned int m_iUnitsDone;
-@@ -88,7 +88,7 @@
-     MSG_WORKER_THREAD_FAIL = 7507,   // sent by workers when they fail
-   };
--  BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, const char* const pszProcessTitle,
-+  BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, wxChar const* pszProcessTitle,
-     int iTotalUnits);
-   BackgroundSupervisor ()
-@@ -105,7 +105,7 @@
-   virtual void onCancel();
--  virtual void onWorkerFail(int iThread, std::string strFailMessage);
-+  virtual void onWorkerFail(int iThread, const wxString& strFailMessage);
-   virtual void onWorkerUnitTick();
-   virtual void onWorkerDone(int iThread);
-@@ -116,7 +116,7 @@
-   bool isDone() const {return m_bDone;}
-   void setDone() { m_bDone = true; }
-   bool fail() const {return m_bFail;}
--  const std::string& getFailMessage() const { return m_strFailMessage; }
-+  const wxString& getFailMessage() const { return m_strFailMessage; }
-   bool cancelled() const {return m_bCancelled;}
-   int getNumWorkers() const { return m_iNumThreads; }
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/ctsim.cpp ctsim-wx2.8/src/ctsim.cpp
---- ctsim/src/ctsim.cpp        2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/ctsim.cpp  2008-07-28 17:18:08.431794408 -0600
-@@ -82,7 +82,8 @@
- IMPLEMENT_APP(CTSimApp)
- CTSimApp::CTSimApp()
--:  m_bAdvancedOptions(false), m_bSetModifyNewDocs(true), m_bVerboseLogging(false), m_bShowStartupTips(true),
-+: m_bAdvancedOptions(false), m_bSetModifyNewDocs(true), 
-+  m_bVerboseLogging(false), m_bShowStartupTips(true),
- m_iCurrentTip(0), m_bUseBackgroundTasks(false),
- m_docManager(NULL), m_pFrame(NULL), m_pConfig(0), m_pLog(0), m_pLogDoc(0)
- {
-@@ -100,6 +101,8 @@
- bool
- CTSimApp::OnInit()
- {
-+  wxApp::OnInit();
-+
- #ifdef HAVE_SETPRIORITY
-   setpriority (PRIO_PROCESS, 0, 15);  // set to low scheduling priority
- #endif
-@@ -113,7 +116,18 @@
- #ifdef __WXMAC__
-     int c = -1;
- #else
--    int c = getopt_long (argc, argv, "", ctsimOptions, NULL);
-+    char** cargv = new char* [argc];
-+    for (int i = 0; i < argc; i++) {
-+      const char* p = wxConvUTF8.cWX2MB(argv[i]);
-+      cargv[i] = new char [strlen(p)+1];
-+      strcpy(cargv[i], p);
-+    }
-+    int c = getopt_long (argc, cargv, "", ctsimOptions, NULL);
-+    for (int i = 0; i < argc; i++) {
-+      delete cargv[i];
-+    }
-+    delete cargv;
-+    
- #endif
-     if (c == -1)
-       break;
-@@ -129,26 +143,28 @@
-       exit(0);
-     case O_HELP:
-     case '?':
--      usage (argv[0]);
-+      usage (wxConvCurrent->cWX2MB(argv[0]));
-       exit (0);
-     case O_PRINT:
-       bPrintFiles = true;
-       break;
-     default:
--      usage (argv[0]);
-+      usage (wxConvCurrent->cWX2MB(argv[0]));
-       exit (1);
-     }
-   }
-   m_docManager = new wxDocManager (wxDEFAULT_DOCMAN_FLAGS, true);
--  m_pDocTemplImage = new wxDocTemplate (m_docManager, "ImageFile", "*.if", "", "if", "ImageFile", "ImageView", CLASSINFO(ImageFileDocument), CLASSINFO(ImageFileView));
--  m_pDocTemplProjection = new wxDocTemplate (m_docManager, "ProjectionFile", "*.pj", "", "pj", "ProjectionFile", "ProjectionView", CLASSINFO(ProjectionFileDocument), CLASSINFO(ProjectionFileView));
--  m_pDocTemplPhantom = new wxDocTemplate (m_docManager, "PhantomFile", "*.phm", "", "phm", "PhantomFile", "PhantomView", CLASSINFO(PhantomFileDocument), CLASSINFO(PhantomFileView));
--  m_pDocTemplPlot = new wxDocTemplate (m_docManager, "PlotFile", "*.plt", "", "plt", "PlotFile", "PlotView", CLASSINFO(PlotFileDocument), CLASSINFO(PlotFileView));
--  m_pDocTemplText = new wxDocTemplate (m_docManager, "TextFile", "*.txt", "", "txt", "TextFile", "TextView", CLASSINFO(TextFileDocument), CLASSINFO(TextFileView), wxTEMPLATE_INVISIBLE);
-+  m_pDocTemplImage = new wxDocTemplate (m_docManager, _T("ImageFile"), _T("*.if"), _T(""), _T("if"), _T("ImageFile"), _T("ImageView"), CLASSINFO(ImageFileDocument), CLASSINFO(ImageFileView));
-+  m_pDocTemplProjection = new wxDocTemplate (m_docManager, _T("ProjectionFile"), _T("*.pj"), _T(""), _T("pj"), _T("ProjectionFile"), _T("ProjectionView"), CLASSINFO(ProjectionFileDocument), CLASSINFO(ProjectionFileView));
-+  m_pDocTemplPhantom = new wxDocTemplate (m_docManager, _T("PhantomFile"), _T("*.phm"), _T(""), _T("phm"), _T("PhantomFile"), _T("PhantomView"), CLASSINFO(PhantomFileDocument), CLASSINFO(PhantomFileView));
-+  m_pDocTemplPlot = new wxDocTemplate (m_docManager, _T("PlotFile"), _T("*.plt"), _T(""), _T("plt"), _T("PlotFile"), _T("PlotView"), CLASSINFO(PlotFileDocument), CLASSINFO(PlotFileView));
-+  m_pDocTemplText = new wxDocTemplate (m_docManager, _T("TextFile"), _T("*.txt"), _T(""), _T("txt"), _T("TextFile"), _T("TextView"), CLASSINFO(TextFileDocument), CLASSINFO(TextFileView), wxTEMPLATE_INVISIBLE);
- #if wxUSE_GLCANVAS
--  m_pDocTemplGraph3d = new wxDocTemplate (m_docManager, "Graph3dFile", "*.g3d", "", "g3d", "Graph3dFile", "Graph3dView", CLASSINFO(Graph3dFileDocument), CLASSINFO(Graph3dFileView), wxTEMPLATE_INVISIBLE);
-+  m_pDocTemplGraph3d = new wxDocTemplate (m_docManager, _T("Graph3dFile"), _T("*.g3d"), _T(""), _T("g3d"),
-+                                          _T("Graph3dFile"), _T("Graph3dView"), CLASSINFO(Graph3dFileDocument), 
-+                                          CLASSINFO(Graph3dFileView), wxTEMPLATE_INVISIBLE);
- #endif
- #if wxUSE_GIF
-@@ -163,7 +179,7 @@
-   int xDisplay, yDisplay;
-   ::wxDisplaySize (&xDisplay, &yDisplay);
--  m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, "CTSim", wxPoint(0, 0),
-+  m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, _T("CTSim"), wxPoint(0, 0),
- #ifdef CTSIM_MDI
-     wxSize(nearest<int>(xDisplay * .75), nearest<int>(yDisplay * .75)),
- #else
-@@ -193,29 +209,29 @@
-     m_pLogDoc->getView()->getFrame()->Show (true);
-   } else
- #else
--    m_pLog = new wxTextCtrl (m_pFrame, -1, "Log Window\n", wxPoint(0, 0), wxSize(0,0), wxTE_MULTILINE | wxTE_READONLY);
-+    m_pLog = new wxTextCtrl (m_pFrame, -1, _T("Log Window\n"), wxPoint(0, 0), wxSize(0,0), wxTE_MULTILINE | wxTE_READONLY);
- #endif
-   wxLog::SetActiveTarget (new wxLogTextCtrl(m_pLog));
-   wxString helpDir;
--  if (! m_pConfig->Read("HelpDir", &helpDir))
-+  if (! m_pConfig->Read(_T("HelpDir"), &helpDir))
-     helpDir = ::wxGetCwd();
- #ifdef CTSIM_WINHELP
--  if (! m_pFrame->getWinHelpController().Initialize(helpDir + "/ctsim"))
--    *m_pLog << "Cannot initialize the Windows Help system" << "\n";
-+  if (! m_pFrame->getWinHelpController().Initialize(helpDir + _T("/ctsim")))
-+    *m_pLog << _T("Cannot initialize the Windows Help system") << _T("\n");
- #else
- #ifdef DATADIR
--  wxString docDir (DATADIR);
-+  wxString docDir (DATADIR, *wxConvCurrent);
- #else
-   wxString docDir (::wxGetCwd());
- #endif
--  wxString docFile = docDir + "ctsim.htb";
-+  wxString docFile = docDir + _T("ctsim.htb");
-   if (! m_pFrame->getHtmlHelpController().AddBook(docFile) &&
--    ! m_pFrame->getHtmlHelpController().AddBook("/usr/share/ctsim/ctsim.htb") &&
--        ! m_pFrame->getHtmlHelpController().AddBook("/tmp/ctsim.htb"))
--        *m_pLog << "Cannot initialize the HTML Help system" << "\n";
-+      ! m_pFrame->getHtmlHelpController().AddBook(_T("/usr/share/ctsim/ctsim.htb")) &&
-+      ! m_pFrame->getHtmlHelpController().AddBook(_T("/tmp/ctsim.htb")))
-+    *m_pLog << _T("Cannot initialize the HTML Help system") << _T("\n");
-   else {
--    if (::wxDirExists ("/tmp"))
-+    if (::wxDirExists (_T("/tmp")))
-       m_pFrame->getHtmlHelpController().SetTempDir(_T("/tmp"));
-     m_pFrame->getHtmlHelpController().UseConfig (m_pConfig);
-   }
-@@ -297,40 +313,40 @@
- CTSimApp::openConfig()
- {
- #ifdef MSVC
--  m_pConfig = new wxConfig("ctsim", "Kevin Rosenberg", "", "", wxCONFIG_USE_LOCAL_FILE);
-+  m_pConfig = new wxConfig(_T("ctsim"), _T("Kevin Rosenberg"), _T(""), _T(""), wxCONFIG_USE_LOCAL_FILE);
- #else
--  m_pConfig = new wxConfig("ctsim", "Kevin Rosenberg", ".ctsim", "", wxCONFIG_USE_LOCAL_FILE);
-+  m_pConfig = new wxConfig(_T("ctsim"), _T("Kevin Rosenberg"), _T(".ctsim"), _T(""), wxCONFIG_USE_LOCAL_FILE);
- #endif
-   wxConfigBase::Set(m_pConfig);
--  m_pConfig->Read ("AdvancedOptions", &m_bAdvancedOptions);
--  m_pConfig->Read ("SetModifyNewDocs", &m_bSetModifyNewDocs);
--  m_pConfig->Read ("VerboseLogging", &m_bVerboseLogging);
--  m_pConfig->Read ("StartupTips", &m_bShowStartupTips);
--  m_pConfig->Read ("CurrentTip", &m_iCurrentTip);
--  m_pConfig->Read ("UseBackgroundTasks", &m_bUseBackgroundTasks);
-+  m_pConfig->Read (_T("AdvancedOptions"), &m_bAdvancedOptions);
-+  m_pConfig->Read (_T("SetModifyNewDocs"), &m_bSetModifyNewDocs);
-+  m_pConfig->Read (_T("VerboseLogging"), &m_bVerboseLogging);
-+  m_pConfig->Read (_T("StartupTips"), &m_bShowStartupTips);
-+  m_pConfig->Read (_T("CurrentTip"), &m_iCurrentTip);
-+  m_pConfig->Read (_T("UseBackgroundTasks"), &m_bUseBackgroundTasks);
- #ifdef HAVE_FFTW
-   wxString strFftwWisdom;
--  m_pConfig->Read ("FftwWisdom", strFftwWisdom);
-+  m_pConfig->Read (_T("FftwWisdom"), strFftwWisdom);
-   if (strFftwWisdom.size() > 0)
--    fftw_import_wisdom_from_string (strFftwWisdom.c_str());
-+    fftw_import_wisdom_from_string (strFftwWisdom.mb_str(wxConvUTF8));
- #endif
- }
- void
- CTSimApp::closeConfig()
- {
--  m_pConfig->Write ("AdvancedOptions", m_bAdvancedOptions);
--  m_pConfig->Write ("SetModifyNewDocs", m_bSetModifyNewDocs);
--  m_pConfig->Write ("VerboseLogging", m_bVerboseLogging);
--  m_pConfig->Write ("StartupTips", m_bShowStartupTips);
--  m_pConfig->Write ("CurrentTip", m_iCurrentTip);
--  m_pConfig->Write ("UseBackgroundTasks", m_bUseBackgroundTasks);
-+  m_pConfig->Write (_T("AdvancedOptions"), m_bAdvancedOptions);
-+  m_pConfig->Write (_T("SetModifyNewDocs"), m_bSetModifyNewDocs);
-+  m_pConfig->Write (_T("VerboseLogging"), m_bVerboseLogging);
-+  m_pConfig->Write (_T("StartupTips"), m_bShowStartupTips);
-+  m_pConfig->Write (_T("CurrentTip"), m_iCurrentTip);
-+  m_pConfig->Write (_T("UseBackgroundTasks"), m_bUseBackgroundTasks);
- #ifdef HAVE_FFTW
-   const char* const pszWisdom = fftw_export_wisdom_to_string();
--  wxString strFftwWisdom (pszWisdom);
-+  wxString strFftwWisdom (pszWisdom, *wxConvCurrent);
-   fftw_free ((void*) pszWisdom);
--  m_pConfig->Write ("FftwWisdom", strFftwWisdom);
-+  m_pConfig->Write (_T("FftwWisdom"), strFftwWisdom);
- #endif
-   delete m_pConfig;
-@@ -342,7 +358,7 @@
- {
-   static int untitledNumber = 1;
--  wxString filename ("Untitled");
-+  wxString filename (_T("Untitled"));
-   filename << untitledNumber++;
-   return (filename);
-@@ -421,7 +437,7 @@
- : wxDocMDIParentFrame(manager, NULL, id, title, pos, size, type, "MainFrame")
- #else
- MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long type)
--: wxDocParentFrame(manager, frame, id, title, pos, size, type, "MainFrame")
-+: wxDocParentFrame(manager, frame, id, title, pos, size, type, _T("MainFrame"))
- #endif
- {
-   m_bShuttingDown = false;
-@@ -429,14 +445,14 @@
-   //// Make a menubar
-   wxMenu *file_menu = new wxMenu;
--  file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
--  file_menu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
--  file_menu->Append(wxID_OPEN, "&Open...\tCtrl-O");
-+  file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
-+  file_menu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
-+  file_menu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
-   file_menu->AppendSeparator();
--  file_menu->Append (MAINMENU_IMPORT, "&Import...\tCtrl-M");
--  file_menu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
--  file_menu->Append(MAINMENU_FILE_EXIT, "E&xit");
-+  file_menu->Append (MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
-+  file_menu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
-+  file_menu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
-   //  history of files visited
-   theApp->getDocManager()->FileHistoryAddFilesToMenu(file_menu);
-@@ -448,21 +464,21 @@
- #endif
-   wxMenu* help_menu = new wxMenu;
--  help_menu->Append (MAINMENU_HELP_CONTENTS, "&Contents\tF1");
--  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
--  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
-+  help_menu->Append (MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
-+  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
-+  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
- #if defined(CTSIM_WINHELP) && (defined(DEBUG) || defined(_DEBUG))
--  help_menu->Append (MAINMENU_HELP_SECONDARY, "&Secondary Help");
-+  help_menu->Append (MAINMENU_HELP_SECONDARY, _T("&Secondary Help"));
- #endif
--  help_menu->Append (MAINMENU_HELP_ABOUT, "&About");
-+  help_menu->Append (MAINMENU_HELP_ABOUT, _T("&About"));
-   wxMenuBar* menu_bar = new wxMenuBar;
--  menu_bar->Append(file_menu, "&File");
-+  menu_bar->Append(file_menu, _T("&File"));
- #ifndef CTSIM_MDI
--  menu_bar->Append(m_pWindowMenu, "&Window");
-+  menu_bar->Append(m_pWindowMenu, _T("&Window"));
- #endif
--  menu_bar->Append(help_menu, "&Help");
-+  menu_bar->Append(help_menu, _T("&Help"));
-   SetMenuBar(menu_bar);
-@@ -470,7 +486,7 @@
- #ifndef CTSIM_MDI
-   int i;
-   for (i = 0; i < MAX_WINDOW_MENUITEMS; i++) {
--    m_apWindowMenuItems[i] = new wxMenuItem (m_pWindowMenu, MAINMENU_WINDOW_BASE+i, wxString("[EMPTY]"));
-+    m_apWindowMenuItems[i] = new wxMenuItem (m_pWindowMenu, MAINMENU_WINDOW_BASE+i, _T("[EMPTY]"));
-     m_pWindowMenu->Append (m_apWindowMenuItems[i]);
-     m_pWindowMenu->Enable (MAINMENU_WINDOW_BASE+i, false);
-   }
-@@ -552,11 +568,11 @@
-   DialogGetPhantom dialogPhantom (this, m_iDefaultPhantomID);
-   int dialogReturn = dialogPhantom.ShowModal();
-   if (dialogReturn == wxID_OK) {
--    wxString selection (dialogPhantom.getPhantom());
-+    wxString selection (dialogPhantom.getPhantom(), *wxConvCurrent);
-     if (theApp->getVerboseLogging())
--      *theApp->getLog() << "Selected phantom " << selection.c_str() << "\n";
--    wxString filename = selection + ".phm";
--    m_iDefaultPhantomID = Phantom::convertNameToPhantomID (selection.c_str());
-+      *theApp->getLog() << _T("Selected phantom ") << selection.c_str() << _T("\n");
-+    wxString filename = selection + _T(".phm");
-+    m_iDefaultPhantomID = Phantom::convertNameToPhantomID (selection.mb_str(wxConvUTF8));
-     theApp->getDocManager()->CreateDocument (filename, wxDOC_SILENT);
-   }
-@@ -568,23 +584,26 @@
-   DialogGetFilterParameters dialogFilter (this, m_iDefaultFilterXSize, m_iDefaultFilterYSize, m_iDefaultFilterID, m_dDefaultFilterParam, m_dDefaultFilterBandwidth, m_iDefaultFilterDomainID, m_dDefaultFilterInputScale, m_dDefaultFilterOutputScale);
-   int dialogReturn = dialogFilter.ShowModal();
-   if (dialogReturn == wxID_OK) {
--    wxString strFilter (dialogFilter.getFilterName());
--    wxString strDomain (dialogFilter.getDomainName());
--    m_iDefaultFilterID = SignalFilter::convertFilterNameToID (strFilter.c_str());
--    m_iDefaultFilterDomainID = SignalFilter::convertDomainNameToID (strDomain.c_str());
-+    wxString strFilter (dialogFilter.getFilterName(), *wxConvCurrent);
-+    wxString strDomain (dialogFilter.getDomainName(), *wxConvCurrent);
-+    m_iDefaultFilterID = SignalFilter::convertFilterNameToID (strFilter.mb_str(wxConvUTF8));
-+    m_iDefaultFilterDomainID = SignalFilter::convertDomainNameToID (strDomain.mb_str(wxConvUTF8));
-     m_iDefaultFilterXSize = dialogFilter.getXSize();
-     m_iDefaultFilterYSize = dialogFilter.getYSize();
-     m_dDefaultFilterBandwidth = dialogFilter.getBandwidth();
-     m_dDefaultFilterParam= dialogFilter.getFilterParam();
-     m_dDefaultFilterInputScale = dialogFilter.getInputScale();
-     m_dDefaultFilterOutputScale = dialogFilter.getOutputScale();
--    std::ostringstream os;
--    os << "Generate Filter=" << strFilter.c_str()
--      << ", size=(" << static_cast<int>(m_iDefaultFilterXSize) << "," << static_cast<int>(m_iDefaultFilterYSize)
--      << "), domain=" << strDomain.c_str() << ", filterParam=" << m_dDefaultFilterParam << ", bandwidth=" << m_dDefaultFilterBandwidth
--      << ", inputScale=" << m_dDefaultFilterInputScale << ", outputScale=" << m_dDefaultFilterOutputScale;
--    *theApp->getLog() << os.str().c_str() << "\n";
--    wxString filename = "untitled.if";
-+    wxString os;
-+    os << _T("Generate Filter=") << strFilter
-+       << _T(", size=(") << static_cast<int>(m_iDefaultFilterXSize) << _T(",")
-+       << static_cast<int>(m_iDefaultFilterYSize)
-+       << _T("), domain=") << strDomain.c_str() << _T(", filterParam=")
-+       << m_dDefaultFilterParam << _T(", bandwidth=") <<
-+      m_dDefaultFilterBandwidth
-+       << _T(", inputScale=") << m_dDefaultFilterInputScale << _T(", outputScale=") << m_dDefaultFilterOutputScale;
-+    *theApp->getLog() << os << _T("\n");
-+    wxString filename = _T("untitled.if");
-     ImageFileDocument* pFilterDoc = theApp->newImageDoc();
-     pFilterDoc->setBadFileOpen();
-     if (! pFilterDoc) {
-@@ -593,8 +612,8 @@
-     }
-     ImageFile& rIF = pFilterDoc->getImageFile();
-     rIF.setArraySize (m_iDefaultFilterXSize, m_iDefaultFilterYSize);
--    rIF.filterResponse (strDomain.c_str(), m_dDefaultFilterBandwidth, strFilter.c_str(), m_dDefaultFilterParam, m_dDefaultFilterInputScale, m_dDefaultFilterOutputScale);
--    rIF.labelAdd (os.str().c_str());
-+    rIF.filterResponse (strDomain.mb_str(wxConvUTF8), m_dDefaultFilterBandwidth, strFilter.mb_str(wxConvUTF8), m_dDefaultFilterParam, m_dDefaultFilterInputScale, m_dDefaultFilterOutputScale);
-+    rIF.labelAdd (os.mb_str(wxConvUTF8));
-     if (theApp->getAskDeleteNewDocs())
-       pFilterDoc->Modify (true);
-     pFilterDoc->UpdateAllViews();
-@@ -693,7 +712,7 @@
- #ifdef CTSIM_WINHELP
-     m_winHelp.DisplayContents ();
- #else
--    m_htmlHelp.Display ("Contents");
-+    m_htmlHelp.Display (_T("Contents"));
- #endif
-     break;
-@@ -724,7 +743,7 @@
-     wxDocument* pDoc = static_cast<wxDocument*>(pNode->GetData());
-     wxString strFilename = pDoc->GetFilename();
-     if (iPos < 10) {
--      strFilename += "\tCtrl-";
-+      strFilename += _T("\tCtrl-");
-       strFilename += static_cast<char>('0' + iPos);
-     }
-     static_cast<wxMenuItemBase*>(m_apWindowMenuItems[iPos])->SetName (strFilename);
-@@ -735,7 +754,7 @@
-   }
-   for (int i = iPos; i < MAX_WINDOW_MENUITEMS; i++) {
-     m_pWindowMenu->Enable (MAINMENU_WINDOW_BASE+i, false);
--    static_cast<wxMenuItemBase*>(m_apWindowMenuItems[i])->SetName (wxString("[EMPTY]"));
-+    static_cast<wxMenuItemBase*>(m_apWindowMenuItems[i])->SetName (_T("[EMPTY]"));
-     m_apWindowMenuData[i] = NULL;
-   }
- #endif
-@@ -830,7 +849,7 @@
-     const wxSize& size = wxDefaultSize,
-     long style = wxSTATIC_BORDER,
-     const wxValidator& validator = wxDefaultValidator,
--    const wxString& name = "BitmapCtrl");
-+                 const wxString& name = _T("BitmapCtrl"));
-   virtual ~BitmapControl();
-@@ -891,14 +910,14 @@
- };
- BitmapDialog::BitmapDialog (wxBitmap* pBitmap, char const* pszTitle)
--: wxDialog(theApp->getMainFrame(), -1, wxString(pszTitle), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE)
-+  : wxDialog(theApp->getMainFrame(), -1, wxString(pszTitle,*wxConvCurrent), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE)
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
-   pTopSizer->Add (new BitmapControl (pBitmap, this), 0, wxALIGN_CENTER | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Ok");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Ok"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
-   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-@@ -916,7 +935,7 @@
- void
- MainFrame::OnPreferences (wxCommandEvent& WXUNUSED(event) )
- {
--  DialogPreferences dlg (this, "CTSim Preferences", theApp->getAdvancedOptions(),
-+  DialogPreferences dlg (this, _T("CTSim Preferences"), theApp->getAdvancedOptions(),
-     theApp->getAskDeleteNewDocs(), theApp->getVerboseLogging(), theApp->getStartupTips(),
-     theApp->getUseBackgroundTasks());
-   if (dlg.ShowModal() == wxID_OK) {
-@@ -935,37 +954,43 @@
-   if (dialogImport.ShowModal() != wxID_OK)
-     return;
--  wxString strFormatName (dialogImport.getFormatName ());
--  m_iDefaultImportFormat = ImageFile::convertImportFormatNameToID (strFormatName.c_str());
-+  wxString strFormatName (dialogImport.getFormatName (), *wxConvCurrent);
-+  m_iDefaultImportFormat = ImageFile::convertImportFormatNameToID (strFormatName.mb_str(wxConvUTF8));
-   wxString strExt;
-   wxString strWildcard;
-   if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PPM) {
--    strExt = ".ppm";
--    strWildcard = "PPM Files (*.ppm)|*.ppm|PGM Files (*.pgm)|*.pgm";
-+    strExt = _T(".ppm");
-+    strWildcard = _T("PPM Files (*.ppm)|*.ppm|PGM Files (*.pgm)|*.pgm");
-   }
- #ifdef HAVE_PNG
-   else if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PNG) {
--    strExt = ".png";
--    strWildcard = "PNG Files (*.png)|*.png";
-+    strExt = _T(".png");
-+    strWildcard = _T("PNG Files (*.png)|*.png");
-   }
- #endif
- #ifdef HAVE_CTN_DICOM
-   else if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_DICOM) {
--    strExt = "*.*";
--    strWildcard = "Dicom Files (*.*)|*.*";
-+    strExt = _T("*.*");
-+    strWildcard = _T("Dicom Files (*.*)|*.*");
-   }
- #endif
-   else {
-     return;
-   }
--  wxString strFilename = wxFileSelector (wxString("Import Filename"), wxString(""),
--    wxString(""), strExt, strWildcard, wxHIDE_READONLY | wxOPEN);
-+#if WXWIN_COMPATIBILITY_2_4
-+  wxString strFilename = wxFileSelector (wxString(wxConvUTF8.cMB2WX("Import Filename")), wxString(wxConvUTF8.cMB2WX("")),
-+                                         wxString(wxConvUTF8.cMB2WX("")), strExt, strWildcard, wxHIDE_READONLY | wxOPEN);
-+#else
-+  wxString strFilename = wxFileSelector (wxString(wxConvUTF8.cMB2WX("Import Filename")), wxString(wxConvUTF8.cMB2WX("")),
-+                                         wxString(wxConvUTF8.cMB2WX("")), strExt, strWildcard, wxOPEN);
-+#endif
-+
-   if (! strFilename.IsEmpty()) {
-     if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PPM || m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PNG) {
-       ImageFile* pIF = new ImageFile;
--      if (pIF->importImage (strFormatName.c_str(), strFilename.c_str())) {
-+      if (pIF->importImage (strFormatName.mb_str(wxConvUTF8), strFilename.mb_str(wxConvUTF8))) {
-         ImageFileDocument* pIFDoc = theApp->newImageDoc();
-         pIFDoc->setImageFile(pIF);
-         pIFDoc->getView()->getFrame()->Show(true);
-@@ -982,9 +1007,9 @@
-     }
- #ifdef HAVE_CTN_DICOM
-     else if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_DICOM) {
--      DicomImporter dicomImport (strFilename.c_str());
-+      DicomImporter dicomImport (strFilename.mb_str(wxConvUTF8));
-       if (dicomImport.fail()) {
--        ::wxMessageBox (dicomImport.failMessage().c_str(), "Import Error");
-+        ::wxMessageBox (wxConvUTF8.cMB2WX(dicomImport.failMessage().c_str()), _T("Import Error"));
-       } else if (dicomImport.testImage()) {
-         ImageFileDocument* pIFDoc = theApp->newImageDoc();
-         ImageFile* pIF = dicomImport.getImageFile();
-@@ -1011,7 +1036,7 @@
-         pProjDoc->getView()->setInitialClientSize();
-         pProjDoc->Activate();
-       } else
--        ::wxMessageBox ("Unrecognized DICOM file contents", "Import Error");
-+        ::wxMessageBox (_T("Unrecognized DICOM file contents"), _T("Import Error"));
-     }
- #endif
-     else
-@@ -1024,38 +1049,38 @@
- MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
- {
-   wxString strOSDesc = ::wxGetOsDescription();
--  *theApp->getLog() << "Operating System: " << strOSDesc;
--  *theApp->getLog() << ", wxWindows: " << wxVERSION_STRING;
--#ifdef __TIMESTAMP__
--  *theApp->getLog() << ", Build Date: " << __TIMESTAMP__;
-+  *theApp->getLog() << _T("Operating System: ") << strOSDesc;
-+  *theApp->getLog() << _T(", wxWindows: ") << wxVERSION_STRING;
-+#ifdef _TIMESTAMP__
-+  *theApp->getLog() << _T(", Build Date: ") << wxConvUTF8.cMB2WX(_TIMESTAMP__);
- #endif
- #if defined(DEBUG)
--  *theApp->getLog() << ", Debug version";
-+  *theApp->getLog() << _T(", Debug version");
- #else
--  *theApp->getLog() << ", Release version";
-+  *theApp->getLog() << _T(", Release version");
- #endif
- #ifdef VERSION
--    *theApp->getLog() << " " <<  VERSION;
-+  *theApp->getLog() << _T(" ") <<  wxConvUTF8.cMB2WX(VERSION);
- #elif defined(CTSIMVERSION)
--    *theApp->getLog() << " " <<  CTSIMVERSION;
-+  *theApp->getLog() << _T(" ") <<  _T(CTSIMVERSION);
- #endif
--  *theApp->getLog() << "\n";
-+    *theApp->getLog() << _T("\n");
-   wxBitmap bmp (splash);
-   if (bmp.Ok()) {
-     BitmapDialog dlg (&bmp, "About CTSim");
-     dlg.ShowModal();
-   } else {
--    wxString msg = "CTSim\nThe Open Source Computed Tomography Simulator\n";
-+    wxString msg = _T("CTSim\nThe Open Source Computed Tomography Simulator\n");
- #ifdef VERSION
--    msg << "Version: " <<  VERSION << "\n\n";
-+    msg << _T("Version: ") <<  wxConvUTF8.cMB2WX(VERSION) << _T("\n\n");
- #elif defined(CTSIMVERSION)
--    msg << "Version: " <<  CTSIMVERSION << "\n\n";
-+    msg << _T("Version: ") <<  wxConvUTF8.cMB2WX(CTSIMVERSION) << _T("\n\n");
- #endif
--    msg += "Author: Kevin Rosenberg <kevin@rosenberg.net>\nUsage: ctsim [files-to-open..] [--help]";
-+    msg += _T("Author: Kevin Rosenberg <kevin@rosenberg.net>\nUsage: ctsim [files-to-open..] [--help]");
--    wxMessageBox(msg, "About CTSim", wxOK | wxICON_INFORMATION, this);
--    *theApp->getLog() << msg << "\n";
-+    wxMessageBox(msg, _T("About CTSim"), wxOK | wxICON_INFORMATION, this);
-+    *theApp->getLog() << msg << wxConvUTF8.cMB2WX("\n");
-   }
- }
-@@ -1065,7 +1090,7 @@
- ProjectionFileDocument*
- CTSimApp::newProjectionDoc()
- {
--  ProjectionFileDocument* newDoc = dynamic_cast<ProjectionFileDocument*>(m_pDocTemplProjection->CreateDocument (""));
-+  ProjectionFileDocument* newDoc = dynamic_cast<ProjectionFileDocument*>(m_pDocTemplProjection->CreateDocument (_T("")));
-   if (newDoc) {
-     newDoc->SetDocumentName (m_pDocTemplProjection->GetDocumentName());
-     newDoc->SetDocumentTemplate (m_pDocTemplProjection);
-@@ -1078,7 +1103,7 @@
- ImageFileDocument*
- CTSimApp::newImageDoc()
- {
--  ImageFileDocument* newDoc = dynamic_cast<ImageFileDocument*>(m_pDocTemplImage->CreateDocument (""));
-+  ImageFileDocument* newDoc = dynamic_cast<ImageFileDocument*>(m_pDocTemplImage->CreateDocument (_T("")));
-   if (newDoc) {
-     newDoc->SetDocumentName (m_pDocTemplImage->GetDocumentName());
-     newDoc->SetDocumentTemplate (m_pDocTemplImage);
-@@ -1091,7 +1116,7 @@
- PlotFileDocument*
- CTSimApp::newPlotDoc()
- {
--  PlotFileDocument* newDoc = dynamic_cast<PlotFileDocument*>(m_pDocTemplPlot->CreateDocument (""));
-+  PlotFileDocument* newDoc = dynamic_cast<PlotFileDocument*>(m_pDocTemplPlot->CreateDocument (_T("")));
-   if (newDoc) {
-     newDoc->SetDocumentName (m_pDocTemplPlot->GetDocumentName());
-     newDoc->SetDocumentTemplate (m_pDocTemplPlot);
-@@ -1106,9 +1131,9 @@
- CTSimApp::newTextDoc()
- {
-   wxString strFilename (getUntitledFilename());
--  strFilename += ".txt";
-+  strFilename += wxString(".txt", *wxConvCurrent);
--  TextFileDocument* newDoc = dynamic_cast<TextFileDocument*>(m_pDocTemplText->CreateDocument (""));
-+  TextFileDocument* newDoc = dynamic_cast<TextFileDocument*>(m_pDocTemplText->CreateDocument (_T("")));
-   if (newDoc) {
-     newDoc->SetDocumentName (m_pDocTemplText->GetDocumentName());
-     newDoc->SetDocumentTemplate (m_pDocTemplText);
-@@ -1122,7 +1147,7 @@
- PhantomFileDocument*
- CTSimApp::newPhantomDoc()
- {
--  PhantomFileDocument* newDoc = dynamic_cast<PhantomFileDocument*>(m_pDocTemplPhantom->CreateDocument (""));
-+  PhantomFileDocument* newDoc = dynamic_cast<PhantomFileDocument*>(m_pDocTemplPhantom->CreateDocument (_T("")));
-   if (newDoc) {
-     newDoc->SetDocumentName (m_pDocTemplPhantom->GetDocumentName());
-     newDoc->SetDocumentTemplate (m_pDocTemplPhantom);
-@@ -1137,7 +1162,7 @@
- Graph3dFileDocument*
- CTSimApp::newGraph3dDoc()
- {
--  Graph3dFileDocument* newDoc = dynamic_cast<Graph3dFileDocument*>(m_pDocTemplGraph3d->CreateDocument (""));
-+  Graph3dFileDocument* newDoc = dynamic_cast<Graph3dFileDocument*>(m_pDocTemplGraph3d->CreateDocument (_T("")));
-   if (newDoc) {
-     newDoc->SetDocumentName (m_pDocTemplGraph3d->GetDocumentName());
-     newDoc->SetDocumentTemplate (m_pDocTemplGraph3d);
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/dialogs.cpp ctsim-wx2.8/src/dialogs.cpp
---- ctsim/src/dialogs.cpp      2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/dialogs.cpp        2008-07-21 10:08:10.892315253 -0600
-@@ -57,12 +57,14 @@
- //    StringValueAndTitleListBox
- ///////////////////////////////////////////////////////////////////////
--StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* const aszTitle[], const char* const aszValue[])
-+StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, 
-+                                                        wxChar const* const* asTitle, 
-+                                                        char const* const* aszValue)
- : wxListBox ()
- {
-   wxString* psTitle = new wxString [nChoices];
-   for (int i = 0; i < nChoices; i++)
--    psTitle[i] = aszTitle[i];
-+    psTitle[i] = asTitle[i];
-   Create (pParent, -1, wxDefaultPosition, wxSize(-1,-1), nChoices, psTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
-@@ -76,12 +78,16 @@
-   return m_ppszValues[GetSelection()];
- }
--StringValueAndTitleRadioBox::StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* const aszTitle[], const char* const aszValue[])
-+StringValueAndTitleRadioBox::StringValueAndTitleRadioBox (wxDialog* pParent, 
-+                                                          wxChar const* strTitle, 
-+                                                          int nChoices, 
-+                                                          char const* const* aszTitle, 
-+                                                          char const* const* aszValue)
- : wxRadioBox ()
- {
-   wxString* psTitle = new wxString [nChoices];
-   for (int i = 0; i < nChoices; i++)
--    psTitle[i] = aszTitle[i];
-+    psTitle[i] = wxConvUTF8.cMB2WX(aszTitle[i]);
-   Create (pParent, -1, strTitle, wxDefaultPosition, wxDefaultSize, nChoices, psTitle, 1, wxRA_SPECIFY_COLS);
-@@ -89,6 +95,8 @@
-   delete [] psTitle;
- };
-+
-+
- const char*
- StringValueAndTitleRadioBox::getSelectionStringValue () const
- {
-@@ -105,7 +113,7 @@
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, "Select Phantom"), 0, wxCENTER | wxALL, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Select Phantom")), 0, wxCENTER | wxALL, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-@@ -116,9 +124,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PHANTOM);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -149,11 +157,11 @@
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, "Select Theta Range"), 0, wxCENTER | wxALL, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Select Theta Range")), 0, wxCENTER | wxALL, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
--  wxString asTitle[] = {"Unconstrained", "Normalized to 2pi", "Fold to pi"};
-+  wxString asTitle[] = {_T("Unconstrained"), _T("Normalized to 2pi"), _T("Fold to pi")};
-   m_pRadioBoxThetaRange = new wxRadioBox (this, -1, _T("Theta Range"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS);
-   if (iDefaultThetaRange == ParallelRaysums::THETA_RANGE_UNCONSTRAINED)
-@@ -168,9 +176,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_THETA_RANGE);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -202,12 +210,13 @@
- //    DialogGetComparisonImage
- ///////////////////////////////////////////////////////////////////////
--DialogGetComparisonImage::DialogGetComparisonImage (wxWindow* pParent, const char* const pszTitle, const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference)
--: wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_rVecIF(rVecIF)
-+DialogGetComparisonImage::DialogGetComparisonImage (wxWindow* pParent, wxChar const* pwszTitle, 
-+                                                    const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference)
-+: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_rVecIF(rVecIF)
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxALL, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxALL, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
-@@ -226,7 +235,7 @@
-   pTopSizer->Add (m_pListBoxImageChoices, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
-   if (bShowMakeDifference) {
--    m_pMakeDifferenceImage = new wxCheckBox (this, -1, "Make Difference Image");
-+    m_pMakeDifferenceImage = new wxCheckBox (this, -1, _T("Make Difference Image"));
-     m_pMakeDifferenceImage->SetValue (FALSE);
-     pTopSizer->Add (m_pMakeDifferenceImage, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
-   } else
-@@ -235,9 +244,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_COMPARISON);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -271,34 +280,35 @@
- // CLASS DiaglogPreferences Implementation
- /////////////////////////////////////////////////////////////////////
--DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTitle,
--                   bool bAdvancedOptions, bool bAskDeleteNewDocs, bool bVerboseLogging, bool bStartupTips, bool bUseBackgroundTasks)
--: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
-+DialogPreferences::DialogPreferences (wxWindow* pParent, wxChar const* pwszTitle,
-+                                      bool bAdvancedOptions, bool bAskDeleteNewDocs, bool bVerboseLogging, bool bStartupTips, 
-+                                      bool bUseBackgroundTasks)
-+: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
--  m_pCBAdvancedOptions = new wxCheckBox (this, -1, "Advanced Options", wxDefaultPosition, wxSize(250, 25), 0);
-+  m_pCBAdvancedOptions = new wxCheckBox (this, -1, _T("Advanced Options"), wxDefaultPosition, wxSize(250, 25), 0);
-   m_pCBAdvancedOptions->SetValue (bAdvancedOptions);
-   pTopSizer->Add (m_pCBAdvancedOptions, 0, wxALIGN_CENTER_VERTICAL);
--  m_pCBAskDeleteNewDocs = new wxCheckBox (this, -1, "Ask \"Save New Documents\" Before Closing", wxDefaultPosition, wxSize(250, 25), 0);
-+  m_pCBAskDeleteNewDocs = new wxCheckBox (this, -1, _T("Ask \"Save New Documents\" Before Closing"), wxDefaultPosition, wxSize(250, 25), 0);
-   m_pCBAskDeleteNewDocs->SetValue (bAskDeleteNewDocs);
-   pTopSizer->Add (m_pCBAskDeleteNewDocs, 0, wxALIGN_CENTER_VERTICAL);
--  m_pCBVerboseLogging = new wxCheckBox (this, -1, "Verbose Logging", wxDefaultPosition, wxSize(250, 25), 0);
-+  m_pCBVerboseLogging = new wxCheckBox (this, -1, _T("Verbose Logging"), wxDefaultPosition, wxSize(250, 25), 0);
-   m_pCBVerboseLogging->SetValue (bVerboseLogging);
-   pTopSizer->Add (m_pCBVerboseLogging, 0, wxALIGN_CENTER_VERTICAL);
--  m_pCBStartupTips = new wxCheckBox (this, -1, "Show Tips at Start", wxDefaultPosition, wxSize(250, 25), 0);
-+  m_pCBStartupTips = new wxCheckBox (this, -1, _T("Show Tips at Start"), wxDefaultPosition, wxSize(250, 25), 0);
-   m_pCBStartupTips->SetValue (bStartupTips);
-   pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL);
- #if HAVE_WXTHREADS && MSVC
--  m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
-+  m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, _T("Put Tasks in Background"), wxDefaultPosition, wxSize(250, 25), 0);
-   m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
-   pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL);
- #endif
-@@ -306,9 +316,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PREFERENCES);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -365,35 +375,35 @@
- // CLASS DiaglogGetMinMax Implementation
- /////////////////////////////////////////////////////////////////////
--DialogGetMinMax::DialogGetMinMax (wxWindow* pParent, const char* const pszTitle, double dDefaultMin, double dDefaultMax)
--: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
-+DialogGetMinMax::DialogGetMinMax (wxWindow* pParent, wxChar const* pwszTitle, double dDefaultMin, double dDefaultMax)
-+: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
--  std::ostringstream os;
--  os << dDefaultMin;
--  m_pTextCtrlMin = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  std::ostringstream osMax;
--  osMax << dDefaultMax;
--  m_pTextCtrlMax = new wxTextCtrl (this, -1, osMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-+  wxString sMin;
-+  sMin << dDefaultMin;
-+  m_pTextCtrlMin = new wxTextCtrl (this, -1, sMin, wxDefaultPosition, wxSize(100, 25), 0);
-+  wxString sMax;
-+  sMax << dDefaultMax;
-+  m_pTextCtrlMax = new wxTextCtrl (this, -1, sMax, wxDefaultPosition, wxSize(100, 25), 0);
-   wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
--  pGridSizer->Add (new wxStaticText (this, -1, "Minimum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Minimum")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlMin, 0, wxALIGN_CENTER_VERTICAL);
--  pGridSizer->Add (new wxStaticText (this, -1, "Maximum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Maximum")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlMax, 0, wxALIGN_CENTER_VERTICAL);
-   pTopSizer->Add (pGridSizer, 1, wxALL, 10);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_MINMAX);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -443,30 +453,30 @@
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, "Auto Scale Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Auto Scale Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
--  wxString asTitle[] = {"Mode", "Median", "Mean"};
-+  wxString asTitle[] = {_T("Mode"), _T("Median"), _T("Mean")};
-   m_pRadioBoxCenter = new wxRadioBox (this, -1, _T("Center"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS);
-   m_pRadioBoxCenter->SetSelection (0);
-   pTopSizer->Add (m_pRadioBoxCenter, 0, wxALL | wxALIGN_CENTER);
-   wxGridSizer *pGridSizer = new wxGridSizer (2);
--  pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osDefaultFactor;
--  osDefaultFactor << dDefaultScaleFactor;
--  m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, osDefaultFactor.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Standard Deviation Factor")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sDefaultFactor;
-+  sDefaultFactor << dDefaultScaleFactor;
-+  m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, sDefaultFactor, wxDefaultPosition, wxSize(100, 25), 0);
-   pGridSizer->Add (m_pTextCtrlStdDevFactor, 0, wxALIGN_CENTER_VERTICAL);
-   pTopSizer->Add (pGridSizer, 1, wxALL, 10);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_AUTOSCALE);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -493,13 +503,13 @@
-   wxString sStddevFactor = m_pTextCtrlStdDevFactor->GetValue();
-   double dValue;
-   if (! sStddevFactor.ToDouble (&dValue)) {
--    *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";
-+    *theApp->getLog() << _T("Error: Non-numeric Standard Deviation Factor of ") << sStddevFactor << _T("\n");
-     return false;
-   }
-   double dHalfWidth = dValue * m_dStdDev / 2;
-   *pMin = dCenter - dHalfWidth;
-   *pMax = dCenter + dHalfWidth;
--  *theApp->getLog() << "Setting minimum to " << *pMin << " and maximum to " << *pMax << "\n";
-+  *theApp->getLog() << _T("Setting minimum to ") << *pMin << _T(" and maximum to ") << *pMax << _T("\n");
-   return true;
- }
-@@ -510,7 +520,7 @@
-   wxString sStddevFactor = m_pTextCtrlStdDevFactor->GetValue();
-   double dValue = 1.;
-   if (! sStddevFactor.ToDouble (&dValue)) {
--    *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";
-+    *theApp->getLog() << _T("Error: Non-numeric Standard Deviation Factor of ") << sStddevFactor << _T("\n");
-   }
-   return dValue;
-@@ -530,30 +540,30 @@
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, "Rasterization Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Rasterization Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
--  std::ostringstream os;
--  os << iDefaultXSize;
--  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sXSize;
-+  sXSize << iDefaultXSize;
-+  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osYSize;
--  osYSize << iDefaultYSize;
--  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sYSize;
-+  sYSize << iDefaultYSize;
-+  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osViewRatio;
--  osViewRatio << dDefaultViewRatio;
--  m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sViewRatio;
-+  sViewRatio << dDefaultViewRatio;
-+  m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, sViewRatio, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("View Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osNSamples;
--  osNSamples << iDefaultNSamples;
--  m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "Samples per Pixel"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sNSamples;
-+  sNSamples << iDefaultNSamples;
-+  m_pTextCtrlNSamples = new wxTextCtrl (this, -1, sNSamples, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Samples per Pixel")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
-   pTopSizer->Add (pGridSizer, 1, wxALL, 10);
-@@ -561,9 +571,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RASTERIZE);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -653,7 +663,7 @@
-   m_iDefaultTrace = iDefaultTrace;
-   m_iDefaultGeometry = iDefaultGeometry;
--  pTopSizer->Add (new wxStaticText (this, -1, "Projection Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Projection Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-@@ -668,58 +678,58 @@
-   pGridSizer->Add (m_pRadioBoxTrace, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
-           wxFlexGridSizer* pText1Sizer = new wxFlexGridSizer(2);
--  std::ostringstream os;
--  os << iDefaultNDet;
--  m_pTextCtrlNDet = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pText1Sizer->Add (new wxStaticText (this, -1, "Detectors"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sNDet;
-+  sNDet << iDefaultNDet;
-+  m_pTextCtrlNDet = new wxTextCtrl (this, -1, sNDet, wxDefaultPosition, wxSize(100, 25), 0);
-+  pText1Sizer->Add (new wxStaticText (this, -1, _T("Detectors")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pText1Sizer->Add (m_pTextCtrlNDet, 0, wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osNView;
--  osNView << iDefaultNView;
--  m_pTextCtrlNView = new wxTextCtrl (this, -1, osNView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pText1Sizer->Add (new wxStaticText (this, -1, "Views"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sNView;
-+  sNView << iDefaultNView;
-+  m_pTextCtrlNView = new wxTextCtrl (this, -1, sNView, wxDefaultPosition, wxSize(100, 25), 0);
-+  pText1Sizer->Add (new wxStaticText (this, -1, _T("Views")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pText1Sizer->Add (m_pTextCtrlNView, 0, wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osNSamples;
--  osNSamples << iDefaultNSamples;
--  m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pText1Sizer->Add (new wxStaticText (this, -1, "Samples per Detector"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sNSamples;
-+  sNSamples << iDefaultNSamples;
-+  m_pTextCtrlNSamples = new wxTextCtrl (this, -1, sNSamples, wxDefaultPosition, wxSize(100, 25), 0);
-+  pText1Sizer->Add (new wxStaticText (this, -1, _T("Samples per Detector")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pText1Sizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (pText1Sizer);
-   wxFlexGridSizer* pText2Sizer = new wxFlexGridSizer(2);
--  std::ostringstream osViewRatio;
--  osViewRatio << dDefaultViewRatio;
--  m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pText2Sizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sViewRatio;
-+  sViewRatio << dDefaultViewRatio;
-+  m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, sViewRatio, wxDefaultPosition, wxSize(100, 25), 0);
-+  pText2Sizer->Add (new wxStaticText (this, -1, _T("View Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pText2Sizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osScanRatio;
--  osScanRatio << dDefaultScanRatio;
--  m_pTextCtrlScanRatio = new wxTextCtrl (this, -1, osScanRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pText2Sizer->Add (new wxStaticText (this, -1, "Scan Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sScanRatio;
-+  sScanRatio << dDefaultScanRatio;
-+  m_pTextCtrlScanRatio = new wxTextCtrl (this, -1, sScanRatio, wxDefaultPosition, wxSize(100, 25), 0);
-+  pText2Sizer->Add (new wxStaticText (this, -1, _T("Scan Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pText2Sizer->Add (m_pTextCtrlScanRatio, 0, wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osFocalLength;
--  osFocalLength << dDefaultFocalLength;
--  m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pText2Sizer->Add (new wxStaticText (this, -1, "Focal Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sFocalLength;
-+  sFocalLength << dDefaultFocalLength;
-+  m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, sFocalLength, wxDefaultPosition, wxSize(100, 25), 0);
-+  pText2Sizer->Add (new wxStaticText (this, -1, _T("Focal Length Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pText2Sizer->Add (m_pTextCtrlFocalLength, 0, wxALIGN_CENTER_VERTICAL);
-   if (theApp->getAdvancedOptions()) {
--    std::ostringstream osCenterDetectorLength;
--    osCenterDetectorLength << dDefaultCenterDetectorLength;
--    m_pTextCtrlCenterDetectorLength = new wxTextCtrl (this, -1, osCenterDetectorLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pText2Sizer->Add (new wxStaticText (this, -1, "Center-Detector Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sCenterDetectorLength;
-+    sCenterDetectorLength << dDefaultCenterDetectorLength;
-+    m_pTextCtrlCenterDetectorLength = new wxTextCtrl (this, -1, sCenterDetectorLength, wxDefaultPosition, wxSize(100, 25), 0);
-+    pText2Sizer->Add (new wxStaticText (this, -1, _T("Center-Detector Length Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pText2Sizer->Add (m_pTextCtrlCenterDetectorLength, 0, wxALIGN_CENTER_VERTICAL);
--    std::ostringstream osRotAngle;
--    osRotAngle << dDefaultRotAngle;
--    m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pText2Sizer->Add (new wxStaticText (this, -1, "Rotation Angle (Fraction of circle)"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sRotAngle;
-+    sRotAngle << dDefaultRotAngle;
-+    m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, sRotAngle, wxDefaultPosition, wxSize(100, 25), 0);
-+    pText2Sizer->Add (new wxStaticText (this, -1, _T("Rotation Angle (Fraction of circle)")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pText2Sizer->Add (m_pTextCtrlRotAngle, 0, wxALIGN_CENTER_VERTICAL);
--    std::ostringstream osOffsetView;
--    osOffsetView << iDefaultOffsetView;
--    m_pTextCtrlOffsetView = new wxTextCtrl (this, -1, osOffsetView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pText2Sizer->Add (new wxStaticText (this, -1, "Gantry offset in units of 'views' "), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sOffsetView;
-+    sOffsetView << iDefaultOffsetView;
-+    m_pTextCtrlOffsetView = new wxTextCtrl (this, -1, sOffsetView, wxDefaultPosition, wxSize(100, 25), 0);
-+    pText2Sizer->Add (new wxStaticText (this, -1, _T("Gantry offset in units of 'views' ")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pText2Sizer->Add (m_pTextCtrlOffsetView, 0, wxALIGN_CENTER_VERTICAL);
-   }
-@@ -730,9 +740,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PROJECTIONS);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -907,7 +917,7 @@
-   m_dDefaultRoiYMin = pDefaultROI->m_dYMin;
-   m_dDefaultRoiYMax = pDefaultROI->m_dYMax;
--  pTopSizer->Add (new wxStaticText (this, -1, "Filtered Backprojection Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Filtered Backprojection Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxFlexGridSizer* pGridSizer = NULL;
-@@ -966,61 +976,61 @@
-   pGridSizer->Add (m_pRadioBoxTrace);
-   wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
--  std::ostringstream os;
--  os << iDefaultXSize;
--  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sXSize;
-+  sXSize << iDefaultXSize;
-+  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  pTextGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osYSize;
--  osYSize << iDefaultYSize;
--  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sYSize;
-+  sYSize << iDefaultYSize;
-+  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  pTextGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osHammingParam;
--  osHammingParam << dDefaultHammingParam;
--  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osHammingParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pTextGridSizer->Add (new wxStaticText (this, -1, "Hamming Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sHammingParam;
-+  sHammingParam << dDefaultHammingParam;
-+  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, sHammingParam, wxDefaultPosition, wxSize(100, 25), 0);
-+  pTextGridSizer->Add (new wxStaticText (this, -1, _T("Hamming Parameter")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pTextGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-   if (theApp->getAdvancedOptions()) {
--    std::ostringstream osZeropad;
--    osZeropad << iDefaultZeropad;
--    m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sZeropad;
-+    sZeropad << iDefaultZeropad;
-+    m_pTextCtrlZeropad = new wxTextCtrl (this, -1, sZeropad, wxDefaultPosition, wxSize(100, 25), 0);
-+    pTextGridSizer->Add (new wxStaticText (this, -1, _T("Zeropad")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-   }
-   pGridSizer->Add (pTextGridSizer);
- #if HAVE_FREQ_PREINTERP
--  std::ostringstream osInterpParam;
--  osInterpParam << iDefaultInterpParam;
--  m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "Interpolation Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sInterpParam;
-+  sInterpParam << iDefaultInterpParam;
-+  m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, sInterpParam, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Interpolation Parameter")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
- #endif
-   if (theApp->getAdvancedOptions()) {
-     wxFlexGridSizer* pROIGridSizer = new wxFlexGridSizer (2);
--    std::ostringstream osRoiXMin;
--    osRoiXMin << m_dDefaultRoiXMin;
--    m_pTextCtrlRoiXMin = new wxTextCtrl (this, -1, osRoiXMin.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pROIGridSizer->Add (new wxStaticText (this, -1, "ROI XMin"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sRoiXMin;
-+    sRoiXMin << m_dDefaultRoiXMin;
-+    m_pTextCtrlRoiXMin = new wxTextCtrl (this, -1, sRoiXMin, wxDefaultPosition, wxSize(100, 25), 0);
-+    pROIGridSizer->Add (new wxStaticText (this, -1, _T("ROI XMin")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pROIGridSizer->Add (m_pTextCtrlRoiXMin, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--    std::ostringstream osRoiXMax;
--    osRoiXMax << m_dDefaultRoiXMax;
--    m_pTextCtrlRoiXMax = new wxTextCtrl (this, -1, osRoiXMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pROIGridSizer->Add (new wxStaticText (this, -1, "ROI XMax"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sRoiXMax;
-+    sRoiXMax << m_dDefaultRoiXMax;
-+    m_pTextCtrlRoiXMax = new wxTextCtrl (this, -1, sRoiXMax, wxDefaultPosition, wxSize(100, 25), 0);
-+    pROIGridSizer->Add (new wxStaticText (this, -1, _T("ROI XMax")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pROIGridSizer->Add (m_pTextCtrlRoiXMax, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--    std::ostringstream osRoiYMin;
--    osRoiYMin << m_dDefaultRoiYMin;
--    m_pTextCtrlRoiYMin = new wxTextCtrl (this, -1, osRoiYMin.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pROIGridSizer->Add (new wxStaticText (this, -1, "ROI YMin"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sRoiYMin;
-+    sRoiYMin << m_dDefaultRoiYMin;
-+    m_pTextCtrlRoiYMin = new wxTextCtrl (this, -1, sRoiYMin, wxDefaultPosition, wxSize(100, 25), 0);
-+    pROIGridSizer->Add (new wxStaticText (this, -1, _T("ROI YMin")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pROIGridSizer->Add (m_pTextCtrlRoiYMin, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--    std::ostringstream osRoiYMax;
--    osRoiYMax << m_dDefaultRoiYMax;
--    m_pTextCtrlRoiYMax = new wxTextCtrl (this, -1, osRoiYMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pROIGridSizer->Add (new wxStaticText (this, -1, "ROI YMax"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sRoiYMax;
-+    sRoiYMax << m_dDefaultRoiYMax;
-+    m_pTextCtrlRoiYMax = new wxTextCtrl (this, -1, sRoiYMax, wxDefaultPosition, wxSize(100, 25), 0);
-+    pROIGridSizer->Add (new wxStaticText (this, -1, _T("ROI YMax")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pROIGridSizer->Add (m_pTextCtrlRoiYMax, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-     pGridSizer->Add (pROIGridSizer);
-@@ -1031,9 +1041,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RECONSTRUCTION);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -1211,7 +1221,7 @@
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, "Filter Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Filter Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
-@@ -1224,40 +1234,40 @@
-   m_pRadioBoxDomain->SetSelection (iDefaultDomainID);
-   pGridSizer->Add (m_pRadioBoxDomain, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
--  std::ostringstream os;
--  os << iDefaultXSize;
--  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sXSize;
-+  sXSize << iDefaultXSize;
-+  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osYSize;
--  osYSize << iDefaultYSize;
--  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sYSize;
-+  sYSize << iDefaultYSize;
-+  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osFilterParam;
--  osFilterParam << dDefaultFilterParam;
--  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "Filter Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sFilterParam;
-+  sFilterParam << dDefaultFilterParam;
-+  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, sFilterParam, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Filter Parameter")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osBandwidth;
--  osBandwidth << dDefaultBandwidth;
--  m_pTextCtrlBandwidth = new wxTextCtrl (this, -1, osBandwidth.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "Bandwidth"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sBandwidth;
-+  sBandwidth << dDefaultBandwidth;
-+  m_pTextCtrlBandwidth = new wxTextCtrl (this, -1, sBandwidth, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Bandwidth")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlBandwidth, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osInputScale;
--  osInputScale << dDefaultInputScale;
--  m_pTextCtrlInputScale = new wxTextCtrl (this, -1, osInputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "Axis (input) Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sInputScale;
-+  sInputScale << dDefaultInputScale;
-+  m_pTextCtrlInputScale = new wxTextCtrl (this, -1, sInputScale, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Axis (input) Scale")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlInputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osOutputScale;
--  osOutputScale << dDefaultOutputScale;
--  m_pTextCtrlOutputScale = new wxTextCtrl (this, -1, osOutputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pGridSizer->Add (new wxStaticText (this, -1, "Filter Output Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sOutputScale;
-+  sOutputScale << dDefaultOutputScale;
-+  m_pTextCtrlOutputScale = new wxTextCtrl (this, -1, sOutputScale, wxDefaultPosition, wxSize(100, 25), 0);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Filter Output Scale")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlOutputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-   pTopSizer->Add (pGridSizer, 1, wxALL, 3);
-@@ -1265,9 +1275,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_FILTER);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -1376,7 +1386,7 @@
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, "Select Export Format"), 0, wxALIGN_CENTER | wxALL, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Select Export Format")), 0, wxALIGN_CENTER | wxALL, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
-@@ -1388,9 +1398,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_EXPORT);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -1421,7 +1431,7 @@
- {
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, "Select Import Format"), 0, wxALIGN_CENTER | wxALL, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, _T("Select Import Format")), 0, wxALIGN_CENTER | wxALL, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
-@@ -1433,9 +1443,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_IMPORT);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-@@ -1460,38 +1470,38 @@
- // CLASS DiaglogGetXYSize Implementation
- /////////////////////////////////////////////////////////////////////
--DialogGetXYSize::DialogGetXYSize (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize, int iDefaultYSize)
--: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
-+DialogGetXYSize::DialogGetXYSize (wxWindow* pParent, wxChar const * pwszTitle, int iDefaultXSize, int iDefaultYSize)
-+: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
- {
-   m_iDefaultXSize = iDefaultXSize;
-   m_iDefaultYSize = iDefaultYSize;
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
--  std::ostringstream os;
--  os << iDefaultXSize;
--  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  std::ostringstream osYSize;
--  osYSize << iDefaultYSize;
--  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-+  wxString sXSize;
-+  sXSize << iDefaultXSize;
-+  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  wxString sYSize;
-+  sYSize << iDefaultYSize;
-+  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
-   wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
--  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
--  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  pGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
-   pTopSizer->Add (pGridSizer, 1, wxALL, 10);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-@@ -1537,9 +1547,9 @@
- // DialogGetConvertPolarParameters
- /////////////////////////////////////////////////////////////////////
--DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle,
-+DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, wxChar const * pwszTitle,
-        int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad, int iHelpID)
--: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
-+: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
- {
-   m_iDefaultXSize = iDefaultXSize;
-   m_iDefaultYSize = iDefaultYSize;
-@@ -1547,7 +1557,7 @@
-   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
--  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-+  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (1);
-@@ -1557,21 +1567,21 @@
-   pGridSizer->Add (m_pRadioBoxInterpolation, 0, wxALL | wxALIGN_CENTER);
-   wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
--  std::ostringstream os;
--  os << iDefaultXSize;
--  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sXSize;
-+  sXSize << iDefaultXSize;
-+  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  pTextGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
--  std::ostringstream osYSize;
--  osYSize << iDefaultYSize;
--  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--  pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+  wxString sYSize;
-+  sYSize << iDefaultYSize;
-+  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
-+  pTextGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-   pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-   if (m_iDefaultZeropad >= 0) {
--    std::ostringstream osZeropad;
--    osZeropad << iDefaultZeropad;
--    m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
--    pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-+    wxString sZeropad;
-+    sZeropad << iDefaultZeropad;
-+    m_pTextCtrlZeropad = new wxTextCtrl (this, -1, sZeropad, wxDefaultPosition, wxSize(100, 25), 0);
-+    pTextGridSizer->Add (new wxStaticText (this, -1, _T("Zeropad")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-     pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-   }
-@@ -1582,9 +1592,9 @@
-   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
--  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, iHelpID);
-   pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/dialogs.h ctsim-wx2.8/src/dialogs.h
---- ctsim/src/dialogs.h        2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/dialogs.h  2008-07-21 10:08:10.892315253 -0600
-@@ -44,7 +44,7 @@
- {
- public:
-   CTSimHelpButton (wxWindow* parent, int id)
--    : wxButton (parent, id, "Help")
-+    : wxButton (parent, id, _T("Help"))
-   {}
- };
-@@ -57,7 +57,12 @@
- class StringValueAndTitleListBox : public wxListBox
- {
-  public:
--  StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* const aszTitle[], const char* const aszValue[]);
-+  StringValueAndTitleListBox (wxDialog* pParent, int nChoices, wxChar const* const* asTitle,
-+                              char const* const aszValue[]);
-+  StringValueAndTitleListBox (wxDialog* pParent, int nChoices, wxChar const* title,
-+                              char const* const* aszTitle, char const* const* aszValue);
-+  StringValueAndTitleListBox (wxDialog* pParent, int nChoices, wxChar const* title,
-+                              wxChar const* const* asTitle, char const* const* aszValue);
-     const char* getSelectionStringValue () const;
-@@ -69,7 +74,7 @@
- class StringValueAndTitleRadioBox : public wxRadioBox
- {
-  public:
--  StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* const aszTitle[], const char* const aszValue[]);
-+  StringValueAndTitleRadioBox (wxDialog* pParent, wxChar const* strTitle, int nChoices, const char* const aszTitle[], const char* const aszValue[]);
-   const char* getSelectionStringValue () const;
-@@ -108,7 +113,7 @@
- class DialogGetComparisonImage : public wxDialog
- {
-  public:
--   DialogGetComparisonImage (wxWindow* pParent, const char* const pszTitle, const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference);
-+   DialogGetComparisonImage (wxWindow* pParent, wxChar const * pwszTitle, const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference);
-     virtual ~DialogGetComparisonImage () {}
-     ImageFileDocument* getImageFileDocument ();
-@@ -125,7 +130,7 @@
- class DialogPreferences : public wxDialog
- {
-  public:
--    DialogPreferences (wxWindow* pParent, const char* const pszTitle, bool bAdvanced, bool bAskNewDocs,
-+  DialogPreferences (wxWindow* pParent, wxChar const* pszTitle, bool bAdvanced, bool bAskNewDocs,
-       bool bVerboseLogging, bool bStartupTips, bool bUseBackgroundTasks);
-     virtual ~DialogPreferences ();
-@@ -148,7 +153,7 @@
- class DialogGetMinMax : public wxDialog
- {
-  public:
--    DialogGetMinMax (wxWindow* pParent, const char* const pszTitle, double dDefaultMin = 0., double dDefaultMax = 0.);
-+    DialogGetMinMax (wxWindow* pParent, wxChar const* pszTitle, double dDefaultMin = 0., double dDefaultMax = 0.);
-     virtual ~DialogGetMinMax ();
-     double getMinimum ();
-@@ -373,7 +378,7 @@
- class DialogGetXYSize : public wxDialog
- {
-  public:
--    DialogGetXYSize (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize = 1, int iDefaultYSize = 1);
-+    DialogGetXYSize (wxWindow* pParent, wxChar const * pwszTitle, int iDefaultXSize = 1, int iDefaultYSize = 1);
-     virtual ~DialogGetXYSize ();
-     unsigned int getXSize ();
-@@ -391,7 +396,7 @@
- class DialogGetConvertPolarParameters : public wxDialog
- {
-  public:
--   DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize = 0,
-+   DialogGetConvertPolarParameters (wxWindow* pParent, wxChar const * pwszTitle, int iDefaultXSize = 0,
-      int iDefaultYSize = 0, int iDefaultInterpolationID = Projections::POLAR_INTERP_BILINEAR,
-      int iDefaultZeropad = 3, int iHelpID = IDH_DLG_POLAR);
-    virtual ~DialogGetConvertPolarParameters ();
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/dlgezplot.cpp ctsim-wx2.8/src/dlgezplot.cpp
---- ctsim/src/dlgezplot.cpp    2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/dlgezplot.cpp      2008-07-21 10:08:10.900315744 -0600
-@@ -104,7 +104,7 @@
- wxEZPlotDialog::wxEZPlotDialog (wxWindow *parent, bool bCancelButton)
--: wxDialog((parent ? parent : theApp->getMainFrame()), -1, wxString("EZPlot"), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL),
-+: wxDialog((parent ? parent : theApp->getMainFrame()), -1, _T("EZPlot"), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL),
-   m_parentTop(0)
- {
-   if (! parent)
-@@ -119,10 +119,10 @@
-   pTopSizer->Add (m_pEZPlotCtrl = new EZPlotControl (this), 0, wxALIGN_CENTER | wxALL, 5);
-   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
--  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Ok");
-+  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Ok"));
-   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
-   if (bCancelButton) {
--    wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
-+    wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
-     pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-   }
-   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/dlgezplot.h ctsim-wx2.8/src/dlgezplot.h
---- ctsim/src/dlgezplot.h      2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/dlgezplot.h        2008-07-21 10:08:10.908316235 -0600
-@@ -57,7 +57,7 @@
-                const wxSize& size = wxDefaultSize,
-                long style = wxSTATIC_BORDER,
-                const wxValidator& validator = wxDefaultValidator,
--               const wxString& name = "EZPlotCtrl");
-+                   const wxString& name = _T("EZPlotCtrl"));
-    virtual ~EZPlotControl();
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/dlgprojections.cpp ctsim-wx2.8/src/dlgprojections.cpp
---- ctsim/src/dlgprojections.cpp       2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/dlgprojections.cpp 2008-07-21 10:08:10.916316725 -0600
-@@ -59,7 +59,7 @@
-   ProjectionsDialog::ProjectionsDialog (Scanner& rScanner, Projections& rProj, const Phantom& rPhantom, const int iTrace, wxWindow *parent)
--    : wxDialog(parent, -1, "Collect Projections", wxDefaultPosition), m_rScanner(rScanner), m_rProjections(rProj), m_rPhantom(rPhantom),
-+: wxDialog(parent, -1, _T("Collect Projections"), wxDefaultPosition), m_rScanner(rScanner), m_rProjections(rProj), m_rPhantom(rPhantom),
-       m_pSGPDriver(NULL), m_pSGP(NULL), m_iTrace(iTrace), m_pDC(NULL), m_btnAbort(0), m_btnPause(0), m_btnStep(0)
- {
-   m_state = Continue;
-@@ -79,7 +79,7 @@
-   m_btnAbort->SetConstraints(c);
--  m_btnPause = new wxButton (this, ID_BTN_PAUSE, wxString("Pause"));
-+  m_btnPause = new wxButton (this, ID_BTN_PAUSE, _T("Pause"));
-   wxLayoutConstraints* cPause = new wxLayoutConstraints;
-   cPause->right.SameAs(this, wxRight, 3*LAYOUT_X_MARGIN + sizeBtn.x);
-   cPause->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
-@@ -87,7 +87,7 @@
-   cPause->height.Absolute(sizeBtn.y);
-   m_btnPause->SetConstraints(cPause);
--  m_btnStep = new wxButton (this, ID_BTN_STEP, wxString("Step"));
-+  m_btnStep = new wxButton (this, ID_BTN_STEP, _T("Step"));
-   wxLayoutConstraints* cStep = new wxLayoutConstraints;
-   cStep->right.SameAs(this, wxRight, 5*LAYOUT_X_MARGIN + sizeBtn.x * 2);
-   cStep->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
-@@ -187,7 +187,7 @@
-     showView (iViewNumber);
-     wxYield();        // update the display
-     if (m_iTrace >= Trace::TRACE_PLOT) {
--      ::wxUsleep(500);
-+      ::wxMilliSleep(500);
-     }
-   } else {
-     m_state = Finished;    // so that we return TRUE below and
-@@ -232,12 +232,12 @@
-     m_pSGP->setDC (&m_memoryDC);
-     showView (m_iLastView);
-     m_state = Paused;
--    m_btnPause->SetLabel (wxString("Resume"));
-+    m_btnPause->SetLabel (_T("Resume"));
-     m_pSGP->setDC (m_pDC);
-     m_memoryDC.SelectObject(wxNullBitmap);
-   } else if (m_state == Paused) {
-     m_state = Continue;
--    m_btnPause->SetLabel (wxString("Pause"));
-+    m_btnPause->SetLabel (_T("Pause"));
-   }
- }
-@@ -252,7 +252,7 @@
-     showView (m_iLastView);
-     // m_rScanner.collectProjections (m_rProjections, m_rPhantom, m_iLastView, 1, true, m_iTrace, m_pSGP);
-     m_state = Paused;
--    m_btnPause->SetLabel (wxString("Resume"));
-+    m_btnPause->SetLabel (_T("Resume"));
-     m_pSGP->setDC (m_pDC);
-     m_memoryDC.SelectObject(wxNullBitmap);
-     Refresh();
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/dlgreconstruct.cpp ctsim-wx2.8/src/dlgreconstruct.cpp
---- ctsim/src/dlgreconstruct.cpp       2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/dlgreconstruct.cpp 2008-07-21 10:08:10.920316971 -0600
-@@ -67,7 +67,7 @@
- ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Projections& rProj,
-                                       ImageFile& rIF, const int iTrace, wxWindow *parent)
--: wxDialog(parent, -1, "Reconstruction", wxDefaultPosition), m_rReconstructor(rReconstruct),
-+: wxDialog(parent, -1, _T("Reconstruction"), wxDefaultPosition), m_rReconstructor(rReconstruct),
-            m_rProjections(rProj), m_rImageFile(rIF), m_pSGPDriver(NULL), m_pSGP(NULL),
-   m_iTrace(iTrace), m_pDC(NULL), m_btnAbort(0), m_btnPause(0), m_btnStep(0)
- {
-@@ -77,7 +77,7 @@
-     while ( m_parentTop && m_parentTop->GetParent() )
-         m_parentTop = m_parentTop->GetParent();
--    m_btnAbort = new wxButton(this, wxID_CANCEL, _("Cancel"));
-+    m_btnAbort = new wxButton(this, wxID_CANCEL, _T("Cancel"));
-     wxLayoutConstraints* c = new wxLayoutConstraints;
-     c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
-     c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
-@@ -88,7 +88,7 @@
-     m_btnAbort->SetConstraints(c);
--    m_btnPause = new wxButton (this, ID_BTN_PAUSE, wxString("Pause"));
-+    m_btnPause = new wxButton (this, ID_BTN_PAUSE, _T("Pause"));
-     wxLayoutConstraints* cPause = new wxLayoutConstraints;
-     cPause->right.SameAs(this, wxRight, 3*LAYOUT_X_MARGIN + sizeBtn.x);
-     cPause->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
-@@ -96,7 +96,7 @@
-     cPause->height.Absolute(sizeBtn.y);
-     m_btnPause->SetConstraints(cPause);
--    m_btnStep = new wxButton (this, ID_BTN_STEP, wxString("Step"));
-+    m_btnStep = new wxButton (this, ID_BTN_STEP, _T("Step"));
-     wxLayoutConstraints* cStep = new wxLayoutConstraints;
-     cStep->right.SameAs(this, wxRight, 5*LAYOUT_X_MARGIN + sizeBtn.x * 2);
-     cStep->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
-@@ -223,7 +223,7 @@
-                 showView (iViewNumber, bBackproject);
-                 ::wxYield();        // update the display
-                 if (m_iTrace >= Trace::TRACE_PLOT) {
--                        ::wxUsleep(250);
-+                        ::wxMilliSleep(250);
-                 }
-         } else {
-                 m_state = Finished;    // so that we return TRUE below and
-@@ -267,12 +267,12 @@
-                 m_memoryDC.SetFont (*wxSWISS_FONT);
-                 showView (m_iLastView, false);
-                 m_state = Paused;
--                m_btnPause->SetLabel (wxString("Resume"));
-+                m_btnPause->SetLabel (_T("Resume"));
-                 m_pSGP->setDC (m_pDC);
-                 m_memoryDC.SelectObject(wxNullBitmap);
-         } else if (m_state == Paused) {
-                 m_state = Continue;
--                m_btnPause->SetLabel (wxString("Pause"));
-+                m_btnPause->SetLabel (_T("Pause"));
-         }
- }
-@@ -288,7 +288,7 @@
-                 m_memoryDC.SetFont (*wxSWISS_FONT);
-                 showView (m_iLastView, false);
-                 m_state = Paused;
--                m_btnPause->SetLabel (wxString("Resume"));
-+                m_btnPause->SetLabel (_T("Resume"));
-                 m_pSGP->setDC (m_pDC);
-                 m_memoryDC.SelectObject(wxNullBitmap);
-                 Refresh();
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/docs.cpp ctsim-wx2.8/src/docs.cpp
---- ctsim/src/docs.cpp 2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/docs.cpp   2008-07-21 10:08:10.924317216 -0600
-@@ -51,12 +51,12 @@
- bool ImageFileDocument::OnSaveDocument(const wxString& filename)
- {
--  if (! m_pImageFile->fileWrite (filename)) {
--    *theApp->getLog() << "Unable to write image file " << filename << "\n";
-+  if (! m_pImageFile->fileWrite (filename.mb_str(wxConvUTF8))) {
-+    *theApp->getLog() << _T("Unable to write image file ") << filename << _T("\n");
-     return false;
-   }
-   if (theApp->getVerboseLogging())
--    *theApp->getLog() << "Wrote image file " << filename << "\n";
-+    *theApp->getLog() << _T("Wrote image file ") << filename << _T("\n");
-   Modify(false);
-   return true;
- }
-@@ -66,14 +66,14 @@
-   if (! OnSaveModified())
-     return false;
--  if (! m_pImageFile->fileRead (filename.c_str())) {
--    *theApp->getLog() << "Unable to read image file " << filename << "\n";
-+  if (! m_pImageFile->fileRead (filename.mb_str(wxConvUTF8))) {
-+    *theApp->getLog() << _T("Unable to read image file ") << filename << _T("\n");
-     m_bBadFileOpen = true;
-     return false;
-   }
--  if (theApp->getVerboseLogging() && filename != "")
--    *theApp->getLog() << "Read image file " << filename << "\n";
-+  if (theApp->getVerboseLogging() && filename != _T(""))
-+    *theApp->getLog() << _T("Read image file ") << filename << _T("\n");
-   SetFilename(filename, true);
-   Modify(false);
-@@ -106,13 +106,13 @@
- ImageFileDocument::Revert ()
- {
-   if (IsModified()) {
--    wxString msg ("Revert to saved ");
-+    wxString msg (_T("Revert to saved "));
-     msg += GetFilename();
--    msg += "?";
--    wxMessageDialog dialog (getView()->getFrame(), msg, "Are you sure?", wxYES_NO | wxNO_DEFAULT);
-+    msg += _T("?");
-+    wxMessageDialog dialog (getView()->getFrame(), msg, _T("Are you sure?"), wxYES_NO | wxNO_DEFAULT);
-     if (dialog.ShowModal() == wxID_YES) {
-       if (theApp->getVerboseLogging())
--        *theApp->getLog() << "Reverting to saved " << GetFilename() << "\n";
-+        *theApp->getLog() << _T("Reverting to saved ") << GetFilename() << _T("\n");
-       Modify (false);
-       OnOpenDocument (GetFilename());
-     }
-@@ -177,7 +177,7 @@
-   while (m_vecpBackgroundSupervisors.size() > 0) {
-      ::wxYield();
--     ::wxUsleep(50);
-+     ::wxMilliSleep(50);
-   }
- #endif
- }
-@@ -190,12 +190,12 @@
- bool
- ProjectionFileDocument::OnSaveDocument(const wxString& filename)
- {
--  if (! m_pProjectionFile->write (filename.c_str())) {
--    *theApp->getLog() << "Unable to write projection file " << filename << "\n";
-+  if (! m_pProjectionFile->write (filename.mb_str(wxConvUTF8))) {
-+    *theApp->getLog() << _T("Unable to write projection file ") << filename << _T("\n");
-     return false;
-   }
-   if (theApp->getVerboseLogging())
--    *theApp->getLog() << "Wrote projection file " << filename << "\n";
-+    *theApp->getLog() << _T("Wrote projection file ") << filename << _T("\n");
-   Modify(false);
-   return true;
- }
-@@ -213,15 +213,15 @@
-   if (! OnSaveModified())
-     return false;
--  if (! m_pProjectionFile->read (filename.c_str())) {
--    *theApp->getLog() << "Unable to read projection file " << filename << "\n";
-+  if (! m_pProjectionFile->read (filename.mb_str(wxConvUTF8))) {
-+    *theApp->getLog() << _T("Unable to read projection file ") << filename << _T("\n");
-     m_bBadFileOpen = true;
-     return false;
-   }
-   m_bBadFileOpen = false;
--  if (theApp->getVerboseLogging() && filename != "")
--    *theApp->getLog() << "Read projection file " << filename << "\n";
-+  if (theApp->getVerboseLogging() && filename != _T(""))
-+    *theApp->getLog() << _T("Read projection file ") << filename << _T("\n");
-   SetFilename(filename, true);
-   Modify(false);
-@@ -276,17 +276,17 @@
-   wxString filename (constFilename);
-   if (wxFile::Exists (filename)) {
--    m_phantom.createFromFile (filename);
-+    m_phantom.createFromFile (filename.mb_str(wxConvUTF8));
-     if (theApp->getVerboseLogging())
--      *theApp->getLog() << "Read phantom file " << filename << "\n";
-+      *theApp->getLog() << _T("Read phantom file ") << filename << _T("\n");
-   } else {
--    filename.Replace (".phm", "");
--    m_phantom.createFromPhantom (filename);
-+    filename.Replace (_T(".phm"), _T(""));
-+    m_phantom.createFromPhantom (filename.mb_str(wxConvUTF8));
-   }
-   m_namePhantom = filename;
-   SetFilename (filename, true);
-   if (m_phantom.fail()) {
--    *theApp->getLog() << "Failure creating phantom " << filename << "\n";
-+    *theApp->getLog() << _T("Failure creating phantom ") << filename << _T("\n");
-     m_bBadFileOpen = true;
-     return false;
-   }
-@@ -301,12 +301,12 @@
- bool
- PhantomFileDocument::OnSaveDocument(const wxString& filename)
- {
--  if (! m_phantom.fileWrite (filename.c_str())) {
--    *theApp->getLog() << "Unable to write phantom file " << filename << "\n";
-+  if (! m_phantom.fileWrite (filename.mb_str(wxConvUTF8))) {
-+    *theApp->getLog() << _T("Unable to write phantom file ") << filename << _T("\n");
-     return false;
-   }
-   if (theApp->getVerboseLogging())
--    *theApp->getLog() << "Wrote phantom file " << filename << "\n";
-+    *theApp->getLog() << _T("Wrote phantom file ") << filename << _T("\n");
-   Modify(false);
-   return true;
- }
-@@ -346,12 +346,12 @@
- PlotFileDocument::OnSaveDocument(const wxString& filename)
- {
-   m_namePlot = filename.c_str();
--  if (! m_plot.fileWrite (filename)) {
--    *theApp->getLog() << "Unable to write plot file " << filename << "\n";
-+  if (! m_plot.fileWrite (filename.mb_str(wxConvUTF8))) {
-+    *theApp->getLog() << _T("Unable to write plot file ") << filename << _T("\n");
-     return false;
-   }
-   if (theApp->getVerboseLogging())
--    *theApp->getLog() << "Wrote plot file " << filename << "\n";
-+    *theApp->getLog() << _T("Wrote plot file ") << filename << _T("\n");
-   Modify(false);
-   return true;
- }
-@@ -362,15 +362,15 @@
-   if (! OnSaveModified())
-     return false;
--  if (! m_plot.fileRead (filename.c_str())) {
--    *theApp->getLog() << "Unable to read plot file " << filename << "\n";
-+  if (! m_plot.fileRead (filename.mb_str(wxConvUTF8))) {
-+    *theApp->getLog() << _T("Unable to read plot file ") << filename << _T("\n");
-     m_bBadFileOpen = true;
-     return false;
-   }
-   m_bBadFileOpen = false;
--  if (theApp->getVerboseLogging() && filename != "")
--    *theApp->getLog() << "Read plot file " << filename << "\n";
-+  if (theApp->getVerboseLogging() && filename != _T(""))
-+    *theApp->getLog() << _T("Read plot file ") << filename << _T("\n");
-   SetFilename (filename, true);
-   m_namePlot = filename.c_str();
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/graph3dview.cpp ctsim-wx2.8/src/graph3dview.cpp
---- ctsim/src/graph3dview.cpp  2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/graph3dview.cpp    2008-07-21 10:08:10.932317707 -0600
-@@ -154,7 +154,7 @@
- Graph3dFileView::~Graph3dFileView()
- {
-   GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
--  GetDocumentManager()->ActivateView(this, false, true);
-+  GetDocumentManager()->ActivateView(this, false);
- }
- bool
-@@ -166,7 +166,7 @@
-   m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
-   m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
--  m_pFrame->SetTitle("Graph3dFileView");
-+  m_pFrame->SetTitle(_T("Graph3dFileView"));
-   m_pCanvas->SetCurrent();
-   InitGL();
-@@ -190,7 +190,7 @@
-   Graph3dFileCanvas* pCanvas = new Graph3dFileCanvas (this, parent, wxPoint(-1,-1), wxSize(-1,-1), 0);
-   pCanvas->SetBackgroundColour(*wxWHITE);
--  pCanvas->Clear();
-+  pCanvas->ClearBackground();
-   return pCanvas;
- }
-@@ -362,10 +362,11 @@
- void
- Graph3dFileView::OnProperties (wxCommandEvent& event)
- {
--  std::ostringstream os;
--  *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
--  wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(),
--                             "Imagefile Properties", wxOK | wxICON_INFORMATION);
-+  wxString os;
-+  *theApp->getLog() << _T(">>>>\n") << os << _T("<<<<\n");
-+  wxMessageDialog dialogMsg (getFrameForChild(), os,
-+                             _T("Imagefile Properties"), 
-+                             wxOK | wxICON_INFORMATION);
-   dialogMsg.ShowModal();
- }
-@@ -409,17 +410,17 @@
-   if (m_pCanvas) {
-     m_pCanvas->SetCurrent();
- #ifdef DEBUG
--        *theApp->getLog() << "Drawing 3d surface\n";
-+    *theApp->getLog() << _T("Drawing 3d surface\n");
- #endif
-     Draw();
-     m_pCanvas->SwapBuffers();
-   }
-   if (m_pStatusBar) {
--    std::ostringstream os;
--    os << "Xangle=" << m_dXRotate << ", Yangle=" << m_dYRotate
--       << ", Zangle=" << m_dZRotate;
--    m_pStatusBar->SetStatusText (os.str().c_str());
-+    wxString os;
-+    os << _T("Xangle=") << m_dXRotate << _T(", Yangle=") << m_dYRotate
-+       << _T(", Zangle=") << m_dZRotate;
-+    m_pStatusBar->SetStatusText (os);
-   }
- }
-@@ -726,7 +727,7 @@
-   if (m_bColorScaleMaxSet)
-     dMax = m_dColorScaleMax;
--  DialogGetMinMax dialogMinMax (getFrameForChild(), "Set Color Scale Minimum & Maximum", dMin, dMax);
-+  DialogGetMinMax dialogMinMax (getFrameForChild(), _T("Set Color Scale Minimum & Maximum"), dMin, dMax);
-   int retVal = dialogMinMax.ShowModal();
-   if (retVal == wxID_OK) {
-     m_bColorScaleMinSet = true;
-@@ -755,9 +756,9 @@
- Graph3dFileView::CreateChildFrame (wxDocument *doc, wxView *view)
- {
- #if CTSIM_MDI
--  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Graph3dFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #else
--  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Graph3dFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #endif
-   theApp->setIconForFrame (subframe);
-@@ -770,45 +771,45 @@
-   m_pFileMenu = new wxMenu;
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
--  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
--  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
-+  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
-+  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, "P&roperties");
-+  m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, _T("P&roperties"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(wxID_PRINT, "&Print...");
--  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
--  m_pFileMenu->Append(wxID_PREVIEW, "Print Preview");
-+  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
-+  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
-+  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Preview"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
--  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
-+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
-+  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
-   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
-   GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
-   m_pViewMenu = new wxMenu;
--  m_pViewMenu->Append(GRAPH3D_VIEW_WIREFRAME, "Wi&reframe\tCtrl-R", "", true);
--  m_pViewMenu->Append(GRAPH3D_VIEW_SMOOTH, "S&mooth\tCtrl-M", "", true);
--  m_pViewMenu->Append(GRAPH3D_VIEW_COLOR, "Co&lor\tCtrl-L", "", true);
--  m_pViewMenu->Append(GRAPH3D_VIEW_LIGHTING, "Li&ghting\tCtrl-G", "", true);
-+  m_pViewMenu->Append(GRAPH3D_VIEW_WIREFRAME, _T("Wi&reframe\tCtrl-R"), _T(""), true);
-+  m_pViewMenu->Append(GRAPH3D_VIEW_SMOOTH, _T("S&mooth\tCtrl-M"), _T(""), true);
-+  m_pViewMenu->Append(GRAPH3D_VIEW_COLOR, _T("Co&lor\tCtrl-L"), _T(""), true);
-+  m_pViewMenu->Append(GRAPH3D_VIEW_LIGHTING, _T("Li&ghting\tCtrl-G"), _T(""), true);
-   m_pViewMenu->AppendSeparator();
--  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_MINMAX, "Color Scale S&et Min/Max...\tCtrl-E");
--  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_AUTO, "Color Scale &Auto...\tCtrl-A");
--  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_FULL, "Color F&ull Scale\tCtrl-U");
-+  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_MINMAX, _T("Color Scale S&et Min/Max...\tCtrl-E"));
-+  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_AUTO, _T("Color Scale &Auto...\tCtrl-A"));
-+  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_FULL, _T("Color F&ull Scale\tCtrl-U"));
-   wxMenu *help_menu = new wxMenu;
--  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
--  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
-+  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
-+  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
-   wxMenuBar *menu_bar = new wxMenuBar;
--  menu_bar->Append(m_pFileMenu, "&File");
--  menu_bar->Append(m_pViewMenu, "&View");
--  menu_bar->Append(help_menu, "&Help");
-+  menu_bar->Append(m_pFileMenu, _T("&File"));
-+  menu_bar->Append(m_pViewMenu, _T("&View"));
-+  menu_bar->Append(help_menu, _T("&Help"));
-   subframe->SetMenuBar(menu_bar);
-@@ -894,7 +895,7 @@
-     return;
-   wxCommandEvent dummyEvent;
--  switch (event.KeyCode()) {
-+  switch (event.GetKeyCode()) {
-   case WXK_LEFT:
-         m_pView->m_dZRotate += 15.0;
-     Refresh (false);
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/threadproj.cpp ctsim-wx2.8/src/threadproj.cpp
---- ctsim/src/threadproj.cpp   2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/threadproj.cpp     2008-07-21 10:08:10.936317952 -0600
-@@ -56,7 +56,7 @@
- ProjectorSupervisorThread::ProjectorSupervisorThread (PhantomFileView* pProjView, int iNDet, int iNView, int iOffsetView,
-    const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dCenterDetectorLength,
--   double dViewRatio, double dScanRatio, const char* const pszLabel)
-+   double dViewRatio, double dScanRatio, wxChar const* pszLabel)
- : SupervisorThread(), m_pPhantomView(pProjView), m_iNDet(iNDet), m_iNView(iNView), m_iOffsetView(iOffsetView), m_strGeometry(pszGeometry),
-   m_iNSample(iNSample), m_dRotation(dRotation), m_dFocalLength(dFocalLength), m_dCenterDetectorLength(dCenterDetectorLength),
-   m_dViewRatio(dViewRatio), m_dScanRatio(dScanRatio), m_strLabel(pszLabel)
-@@ -67,7 +67,7 @@
- ProjectorSupervisorThread::Entry()
- {
-   ProjectorSupervisor projSupervisor (this, m_pPhantomView, m_iNDet, m_iNView, m_iOffsetView,
--   m_strGeometry.c_str(), m_iNSample, m_dRotation, m_dFocalLength, m_dCenterDetectorLength, m_dViewRatio, m_dScanRatio, m_strLabel.c_str());
-+   m_strGeometry.c_str(), m_iNSample, m_dRotation, m_dFocalLength, m_dCenterDetectorLength, m_dViewRatio, m_dScanRatio, m_strLabel);
-   projSupervisor.start();
-   while (! projSupervisor.workersDone() && ! projSupervisor.fail() && ! projSupervisor.cancelled()) {
-@@ -75,9 +75,9 @@
-   }
-   if (projSupervisor.fail())
-   {
--    wxString msg ("Error starting Projector supervisor: ");
--    msg += projSupervisor.getFailMessage().c_str();
--    msg += "\n";
-+    wxString msg (_T("Error starting Projector supervisor: "));
-+    msg += projSupervisor.getFailMessage();
-+    msg += _T("\n");
-     wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
-     eventLog.SetString( msg );
-     wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
-@@ -104,12 +104,12 @@
- ProjectorSupervisor::ProjectorSupervisor (SupervisorThread* pThread, PhantomFileView* pPhantomView, int iNDet, int iNView, int iOffsetView,
-    const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dCenterDetectorLength,
--   double dViewRatio, double dScanRatio, const char* const pszLabel)
--    : BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), "Projecting", iNView),
-+   double dViewRatio, double dScanRatio, wxChar const* pszLabel)
-+  : BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), _T("Projecting"), iNView),
-       m_pPhantomView(pPhantomView), m_pPhantomDoc(pPhantomView->GetDocument()),
-       m_iNDet(iNDet), m_iNView(iNView), m_iOffsetView(iOffsetView), m_pszGeometry(pszGeometry), m_iNSample(iNSample),
-       m_dRotation(dRotation), m_dFocalLength(dFocalLength), m_dCenterDetectorLength(dCenterDetectorLength),
--      m_dViewRatio(dViewRatio), m_dScanRatio(dScanRatio), m_pszLabel(pszLabel)
-+      m_dViewRatio(dViewRatio), m_dScanRatio(dScanRatio), m_strLabel(pszLabel)
- {
-   m_pScanner = new Scanner (m_pPhantomDoc->getPhantom(), m_pszGeometry, m_iNDet,
-                   m_iNView, m_iOffsetView, m_iNSample, m_dRotation, m_dFocalLength, m_dCenterDetectorLength, m_dViewRatio, m_dScanRatio);
-@@ -151,12 +151,12 @@
-   wxCriticalSectionLocker critsect (doneSection);
-   Projections* pProjections = getProjections();
--  pProjections->setRemark (m_pszLabel);
-+  pProjections->setRemark (m_strLabel.mb_str(wxConvUTF8));
-   pProjections->setCalcTime (getTimerEnd());
-   wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
--  wxString msg (m_pszLabel);
--  msg += "\n";
-+  wxString msg (m_strLabel);
-+  msg += _T("\n");
-   eventLog.SetString( msg );
-   wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
-@@ -218,12 +218,12 @@
- {
-   const Phantom& rPhantom = m_pPhantomView->GetDocument()->getPhantom();
-   bool bFail = m_pScanner->fail();
--  std::string failMsg;
-+  wxString failMsg;
-   if (bFail) {
--      failMsg = "Unable to make Projector: ";
--      failMsg += m_pScanner->failMessage().c_str();
-+    failMsg = _T("Unable to make Projector: ");
-+    failMsg += wxConvUTF8.cMB2WX(m_pScanner->failMessage().c_str());
-       wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
--      event.SetString( failMsg.c_str() );
-+    event.SetString( failMsg );
-       wxPostEvent( theApp->getMainFrame(), event );
-   }
-   else
-@@ -234,7 +234,7 @@
- #ifdef DEBUG
-         if (theApp->getVerboseLogging()) {
-           wxString msg;
--          msg.Printf("Worker thread: Received destroy message at work unit #%d\n", iUnit);
-+          msg.Printf(_T("Worker thread: Received destroy message at work unit #%d\n"), iUnit);
-           wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
-           event.SetString( msg );
-           wxPostEvent( theApp->getMainFrame(), event );
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/threadproj.h ctsim-wx2.8/src/threadproj.h
---- ctsim/src/threadproj.h     2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/threadproj.h       2008-07-21 10:08:10.944318442 -0600
-@@ -56,12 +56,12 @@
-   const double m_dCenterDetectorLength;
-   const double m_dViewRatio;
-   const double m_dScanRatio;
--  const std::string m_strLabel;
-+  const wxString m_strLabel;
- public:
-   ProjectorSupervisorThread(PhantomFileView* pProjView, int iNDet, int iNView, int iOffsetView,
-    const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dCenterDetectorLength,
--   double dViewRatio, double dScanRatio, const char* const pszLabel);
-+   double dViewRatio, double dScanRatio, wxChar const* strLabel);
-   virtual wxThread::ExitCode Entry();
-@@ -88,13 +88,13 @@
-   const double m_dCenterDetectorLength;
-   const double m_dViewRatio;
-   const double m_dScanRatio;
--  const char* const m_pszLabel;
-+  const wxString m_strLabel;
- public:
-    ProjectorSupervisor (SupervisorThread* pThread, PhantomFileView* pProjView, int iNDet, int iNView,  int iOffsetView,
-    const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dCenterDetectorLength,
--   double dViewRatio, double dScanRatio, const char* const pszLabel);
-+   double dViewRatio, double dScanRatio, wxChar const* pszLabel);
-    virtual BackgroundWorkerThread* createWorker (int iThread, int iStartUnit, int iNumUnits);
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/threadraster.cpp ctsim-wx2.8/src/threadraster.cpp
---- ctsim/src/threadraster.cpp 2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/threadraster.cpp   2008-07-21 10:08:10.948318688 -0600
-@@ -57,7 +57,7 @@
- /////////////////////////////////////////////////////////////////////
- RasterizerSupervisorThread::RasterizerSupervisorThread (PhantomFileView* pProjView, int iNX, int iNY,
--                                                        int iNSample, double dViewRatio, const char* const pszLabel)
-+                                                        int iNSample, double dViewRatio, wxChar const* pszLabel)
-                                                         :   SupervisorThread(), m_pPhantomView(pProjView), m_iNX(iNX), m_iNY(iNY), m_iNSample(iNSample), m_dViewRatio(dViewRatio), m_strLabel(pszLabel)
- {
- }
-@@ -65,7 +65,7 @@
- wxThread::ExitCode
- RasterizerSupervisorThread::Entry()
- {
--  RasterizerSupervisor rasterSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel.c_str());
-+  RasterizerSupervisor rasterSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel);
-   rasterSupervisor.start();
-@@ -75,9 +75,9 @@
-   if (rasterSupervisor.fail())
-   {
--    wxString msg ("Error starting Rasterizer supervisor: ");
--    msg += rasterSupervisor.getFailMessage().c_str();
--    msg += "\n";
-+    wxString msg (_T("Error starting Rasterizer supervisor: "));
-+    msg += rasterSupervisor.getFailMessage();
-+    msg += _T("\n");
-     wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
-     eventLog.SetString( msg );
-     wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
-@@ -103,10 +103,10 @@
- /////////////////////////////////////////////////////////////////////
- RasterizerSupervisor::RasterizerSupervisor (SupervisorThread* pThread, PhantomFileView* pPhantomView, int iNX, int iNY,
--                                            int iNSample, double dViewRatio, const char* const pszLabel)
--                                            : BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), "Rasterizing", iNX),
-+                                            int iNSample, double dViewRatio, wxChar const* pszLabel)
-+  : BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), _T("Rasterizing"), iNX),
-                                             m_pPhantomView(pPhantomView), m_pPhantomDoc(pPhantomView->GetDocument()),
--                                            m_iNX(iNX), m_iNY(iNY), m_iNSample(iNSample), m_dViewRatio(dViewRatio), m_pszLabel(pszLabel)
-+                                            m_iNX(iNX), m_iNY(iNY), m_iNSample(iNSample), m_dViewRatio(dViewRatio), m_strLabel(pszLabel)
- {
-   m_vecpChildImageFiles.reserve (getNumWorkers());
-   for (int iThread = 0; iThread < getNumWorkers(); iThread++) {
-@@ -137,11 +137,11 @@
-   wxCriticalSectionLocker critsect (doneSection);
-   ImageFile* pImageFile = getImageFile();
--  pImageFile->labelAdd (m_pszLabel, getTimerEnd());
-+  pImageFile->labelAdd (m_strLabel.mb_str(wxConvUTF8), getTimerEnd());
-   wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
--  wxString msg (m_pszLabel);
--  msg += "\n";
-+  wxString msg (m_strLabel);
-+  msg += _T("\n");
-   eventLog.SetString( msg );
-   wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
-@@ -199,7 +199,7 @@
- #ifdef DEBUG
-       if (theApp->getVerboseLogging()) {
-         wxString msg;
--        msg.Printf("Worker thread: Received destroy message at work unit #%d\n", iUnit);
-+        msg.Printf(_T("Worker thread: Received destroy message at work unit #%d\n"), iUnit);
-         wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
-         event.SetString( msg );
-         wxPostEvent( theApp->getMainFrame(), event );
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/threadraster.h ctsim-wx2.8/src/threadraster.h
---- ctsim/src/threadraster.h   2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/threadraster.h     2008-07-21 10:08:10.956319178 -0600
-@@ -50,10 +50,10 @@
-   const int m_iNY;
-   const int m_iNSample;
-   const double m_dViewRatio;
--  const std::string m_strLabel;
-+  const wxString m_strLabel;
- public:
--  RasterizerSupervisorThread(PhantomFileView* pProjView, int iNX, int iNY, int iNSample, double dViewRatio, const char* const pszLabel);
-+  RasterizerSupervisorThread(PhantomFileView* pProjView, int iNX, int iNY, int iNSample, double dViewRatio, wxChar const* strLabel);
-   virtual wxThread::ExitCode Entry();
-   virtual void OnExit();
-@@ -72,12 +72,12 @@
-   const int m_iNY;
-   const int m_iNSample;
-   const double m_dViewRatio;
--  const char* const m_pszLabel;
-+  const wxString m_strLabel;
- public:
-    RasterizerSupervisor (SupervisorThread* pThread, PhantomFileView* pProjView, int iNX, int iNY,
--   int iNSample, double dViewRatio, const char* const pszLabel);
-+   int iNSample, double dViewRatio, wxChar const* pszLabel);
-    virtual BackgroundWorkerThread* createWorker (int iThread, int iStartUnit, int iNumUnits);
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/threadrecon.cpp ctsim-wx2.8/src/threadrecon.cpp
---- ctsim/src/threadrecon.cpp  2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/threadrecon.cpp    2008-07-21 10:08:10.956319178 -0600
-@@ -54,7 +54,7 @@
- ReconstructorSupervisorThread::ReconstructorSupervisorThread (ProjectionFileView* pProjView, int iNX, int iNY,
-    const char* pszFilterName, double dFilterParam, const char* pszFilterMethod, int iZeropad,
-    const char* pszFilterGenerationName, const char* pszInterpName, int iInterpParam,
--   const char* pszBackprojectName, const char* const pszLabel, ReconstructionROI* pROI, bool bRebinToParallel)
-+   const char* pszBackprojectName, wxChar const* pszLabel, ReconstructionROI* pROI, bool bRebinToParallel)
- :   SupervisorThread(), m_pProjView(pProjView), m_iNX(iNX), m_iNY(iNY), m_strFilterName(pszFilterName), m_dFilterParam(dFilterParam),
-   m_strFilterMethod(pszFilterMethod), m_iZeropad(iZeropad), m_strFilterGenerationName(pszFilterGenerationName),
-   m_strInterpName(pszInterpName), m_iInterpParam(iInterpParam), m_strBackprojectName(pszBackprojectName),
-@@ -72,7 +72,7 @@
-   ReconstructorSupervisor reconSupervisor (this, pProj, m_pProjView, m_iNX, m_iNY,
-    m_strFilterName.c_str(), m_dFilterParam, m_strFilterMethod.c_str(), m_iZeropad, m_strFilterGenerationName.c_str(),
--   m_strInterpName.c_str(), m_iInterpParam, m_strBackprojectName.c_str(), m_strLabel.c_str(), &m_reconROI);
-+   m_strInterpName.c_str(), m_iInterpParam, m_strBackprojectName.c_str(), m_strLabel, &m_reconROI);
-   reconSupervisor.start();
-   while (! reconSupervisor.workersDone() && ! reconSupervisor.fail() && ! reconSupervisor.cancelled()) {
-@@ -80,9 +80,9 @@
-   }
-   if (reconSupervisor.fail())
-   {
--    wxString msg ("Error starting reconstructor supervisor: ");
--    msg += reconSupervisor.getFailMessage().c_str();
--    msg += "\n";
-+    wxString msg (_T("Error starting reconstructor supervisor: "));
-+    msg += reconSupervisor.getFailMessage();
-+    msg += _T("\n");
-     wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
-     eventLog.SetString( msg );
-     wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
-@@ -112,14 +112,16 @@
- ReconstructorSupervisor::ReconstructorSupervisor (SupervisorThread* pThread, Projections* pProj,
-   ProjectionFileView* pProjView, int iImageNX, int iImageNY, const char* pszFilterName, double dFilterParam,
-   const char* pszFilterMethod, int iZeropad, const char* pszFilterGenerationName,
--  const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, const char* const pszLabel,
-+  const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, wxChar const* pszLabel,
-   ReconstructionROI* pROI)
--    : BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(), "Reconstructing", pProjView->GetDocument()->getProjections().nView()),
-+    : BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(),
-+                            _T("Reconstructing"), 
-+                            pProjView->GetDocument()->getProjections().nView()),
-       m_pProj(pProj), m_pProjView(pProjView), m_pProjDoc(pProjView->GetDocument()),
-       m_iImageNX(iImageNX), m_iImageNY(iImageNY),
-       m_pszFilterName(pszFilterName), m_dFilterParam(dFilterParam), m_pszFilterMethod(pszFilterMethod),
-       m_iZeropad(iZeropad), m_pszFilterGenerationName(pszFilterGenerationName), m_pszInterpName(pszInterpName),
--      m_iInterpParam(iInterpParam), m_pszBackprojectName(pszBackprojectName), m_pszLabel(pszLabel),
-+      m_iInterpParam(iInterpParam), m_pszBackprojectName(pszBackprojectName), m_strLabel(pszLabel),
-       m_pReconROI(pROI)
- {
-   m_vecpChildImageFile.reserve (getNumWorkers());
-@@ -156,11 +158,11 @@
-   ImageFile* pImageFile = getImageFile();
-   pImageFile->labelAdd (m_pProj->getLabel());
--  pImageFile->labelAdd (m_pszLabel, getTimerEnd());
-+  pImageFile->labelAdd (m_strLabel.mb_str(wxConvUTF8), getTimerEnd());
-   wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
--  wxString msg (m_pszLabel);
--  msg += "\n";
-+  wxString msg (m_strLabel);
-+  msg += _T("\n");
-   eventLog.SetString( msg );
-   wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
-@@ -225,12 +227,12 @@
-     m_iInterpParam, m_pszBackprojectName, Trace::TRACE_NONE, m_pReconROI, false);
-   bool bFail = pReconstructor->fail();
--  std::string failMsg;
-+  wxString failMsg;
-   if (bFail) {
--      failMsg = "Unable to make reconstructor: ";
--      failMsg += pReconstructor->failMessage().c_str();
-+    failMsg = _T("Unable to make reconstructor: ");
-+    failMsg += wxConvUTF8.cMB2WX(pReconstructor->failMessage().c_str());
-       wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
--      event.SetString( failMsg.c_str() );
-+    event.SetString( failMsg );
-       wxPostEvent( theApp->getMainFrame(), event );
-   }
-   else
-@@ -241,7 +243,7 @@
- #ifdef DEBUG
-         if (theApp->getVerboseLogging()) {
-           wxString msg;
--          msg.Printf("Worker thread: Received destroy message at work unit #%d\n", iUnit);
-+          msg.Printf(_T("Worker thread: Received destroy message at work unit #%d\n"), iUnit);
-           wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
-           event.SetString( msg );
-           wxPostEvent( theApp->getMainFrame(), event );
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/threadrecon.h ctsim-wx2.8/src/threadrecon.h
---- ctsim/src/threadrecon.h    2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/threadrecon.h      2008-07-21 10:08:10.956319178 -0600
-@@ -59,14 +59,14 @@
-   const std::string m_strInterpName;
-   const int m_iInterpParam;
-   const std::string m_strBackprojectName;
--  const std::string m_strLabel;
-+  const wxString m_strLabel;
-   ReconstructionROI m_reconROI;
-   const bool m_bRebinToParallel;
- public:
-   ReconstructorSupervisorThread(ProjectionFileView* pProjView, int iNX, int iNY, const char* pszFilterName,
-    double dFilterParam, const char* pszFilterMethod, int iZeropad, const char* pszFilterGenerationName,
--   const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, const char* const pszLabel,
-+   const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, wxChar const* pszLabel,
-    ReconstructionROI* pROI, bool bRebinToParallel);
-   virtual wxThread::ExitCode Entry();
-@@ -95,14 +95,14 @@
-   const char* const m_pszInterpName;
-   const int m_iInterpParam;
-   const char* const m_pszBackprojectName;
--  const char* const m_pszLabel;
-+  const wxString m_strLabel;
-   ReconstructionROI* m_pReconROI;
- public:
-    ReconstructorSupervisor (SupervisorThread* pMyThread, Projections* pProj, ProjectionFileView* pProjView,
-    int iNX, int iNY, const char* pszFilterName, double dFilterParam, const char* pszFilterMethod, int iZeropad,
-    const char* pszFilterGenerationName, const char* pszInterpName, int iInterpParam,
--   const char* pszBackprojectName, const char* const pszLabel, ReconstructionROI* pReconROI);
-+   const char* pszBackprojectName, wxChar const* pszLabel, ReconstructionROI* pReconROI);
-    virtual BackgroundWorkerThread* createWorker (int iThread, int iStartUnit, int iNumUnits);
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/tips.cpp ctsim-wx2.8/src/tips.cpp
---- ctsim/src/tips.cpp 2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/tips.cpp   2008-07-21 10:08:10.964319669 -0600
-@@ -83,7 +83,7 @@
-   size_t iThisTip = m_iCurrentTip;
-   ++m_iCurrentTip;
--  return wxString (s_aszTips[iThisTip]);
-+  return wxString (wxConvUTF8.cMB2WX(s_aszTips[iThisTip]));
- }
- size_t
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/views.cpp ctsim-wx2.8/src/views.cpp
---- ctsim/src/views.cpp        2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/views.cpp  2008-07-29 20:38:45.351315859 -0600
-@@ -133,20 +133,21 @@
-   const int yPt = ny - 1 - pt.y;
-   if (event.RightIsDown()) {
-     if (pt.x >= 0 && pt.x < nx && pt.y >= 0 && pt.y < ny) {
--      std::ostringstream os;
--      os << "Image value (" << pt.x << "," << yPt << ") = " << v[pt.x][yPt];
-+      wxString os;
-+      os << _T("Image value (") << pt.x << _T(",") << yPt << _T(") = ")
-+         << v[pt.x][yPt];
-       if (rIF.isComplex()) {
-         double dImag = rIF.getImaginaryArray()[pt.x][yPt];
-         if (dImag < 0)
--          os << " - " << -dImag;
-+          os << _T(" - ") << -dImag;
-         else
--          os << " + " << dImag;
--        os << "i\n";
-+          os << _T(" + ") << dImag;
-+        os << _T("i\n");
-       } else
--        os << "\n";
--      *theApp->getLog() << os.str().c_str();
-+        os << _T("\n");
-+      *theApp->getLog() << os;
-     } else
--      *theApp->getLog() << "Mouse out of image range (" << pt.x << "," << yPt << ")\n";
-+      *theApp->getLog() << _T("Mouse out of image range (") << pt.x << _T(",") << yPt << _T(")\n");
-   }
-   else if (event.LeftIsDown() || event.LeftUp() || event.RightUp()) {
-     if (pt.x >= 0 && pt.x < nx && pt.y >= 0 && pt.y < ny) {
-@@ -166,12 +167,12 @@
-         pMenu->Enable (IFMENU_PLOT_FFT_COL, true);
-       }
-     } else
--      *theApp->getLog() << "Mouse out of image range (" << pt.x << "," << yPt << ")\n";
-+      *theApp->getLog() << _T("Mouse out of image range (") << pt.x << _T(",") << yPt << _T(")\n");
-   }
-   if (event.LeftUp()) {
--    std::ostringstream os;
--    os << "Selected column " << pt.x << " , row " << yPt << "\n";
--    *theApp->getLog() << os.str().c_str();
-+    wxString os;
-+    os << _T("Selected column ") << pt.x << _T(" , row ") << yPt << _T("\n");
-+    *theApp->getLog() << os;
-   }
- }
-@@ -276,7 +277,7 @@
- ImageFileView::~ImageFileView()
- {
-   GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
--  GetDocumentManager()->ActivateView(this, FALSE, TRUE);
-+  GetDocumentManager()->ActivateView(this, FALSE);
- }
-@@ -285,9 +286,9 @@
- {
-   const ImageFile& rIF = GetDocument()->getImageFile();
-   if (rIF.nx() == 0 || rIF.ny() == 0)
--    *theApp->getLog() << "Properties: empty imagefile\n";
-+    *theApp->getLog() << _T("Properties: empty imagefile\n");
-   else {
--    const std::string rFilename = m_pFrame->GetTitle().c_str();
-+    const std::string rFilename (m_pFrame->GetTitle().mb_str(wxConvUTF8));
-     std::ostringstream os;
-     double min, max, mean, mode, median, stddev;
-     rIF.statistics (rIF.getArray(), min, max, mean, mode, median, stddev);
-@@ -306,8 +307,8 @@
-     if (rIF.nLabels() > 0) {
-       rIF.printLabelsBrief (os);
-     }
--    *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
--    wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), "Imagefile Properties", wxOK | wxICON_INFORMATION);
-+    *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<\n");
-+    wxMessageDialog dialogMsg (getFrameForChild(), wxConvUTF8.cMB2WX(os.str().c_str()), _T("Imagefile Properties"), wxOK | wxICON_INFORMATION);
-     dialogMsg.ShowModal();
-   }
-   GetDocument()->Activate();
-@@ -349,7 +350,7 @@
-   if (m_bMaxSpecified)
-     max = m_dMaxPixel;
--  DialogGetMinMax dialogMinMax (getFrameForChild(), "Set Image Minimum & Maximum", min, max);
-+  DialogGetMinMax dialogMinMax (getFrameForChild(), _T("Set Image Minimum & Maximum"), min, max);
-   int retVal = dialogMinMax.ShowModal();
-   if (retVal == wxID_OK) {
-     m_bMinSpecified = true;
-@@ -381,9 +382,9 @@
-   theApp->getCompatibleImages (GetDocument(), vecIF);
-   if (vecIF.size() == 0) {
--    wxMessageBox("There are no compatible image files open for comparision", "No comparison images");
-+    wxMessageBox(_T("There are no compatible image files open for comparision"), _T("No comparison images"));
-   } else {
--    DialogGetComparisonImage dialogGetCompare(getFrameForChild(), "Get Comparison Image", vecIF, true);
-+    DialogGetComparisonImage dialogGetCompare(getFrameForChild(), _T("Get Comparison Image"), vecIF, true);
-     if (dialogGetCompare.ShowModal() == wxID_OK) {
-       const ImageFile& rIF = GetDocument()->getImageFile();
-@@ -392,19 +393,19 @@
-       std::ostringstream os;
-       double min, max, mean, mode, median, stddev;
-       rIF.statistics (min, max, mean, mode, median, stddev);
--      os << GetFrame()->GetTitle().c_str() << ": minimum=" << min << ", maximum=" << max << ", mean=" << mean << ", mode=" << mode << ", median=" << median << ", stddev=" << stddev << "\n";
-+      os << m_pFrame->GetTitle().mb_str(wxConvUTF8) << ": minimum=" << min << ", maximum=" << max << ", mean=" << mean << ", mode=" << mode << ", median=" << median << ", stddev=" << stddev << "\n";
-       rCompareIF.statistics (min, max, mean, mode, median, stddev);
--      os << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str() << ": minimum=" << min << ", maximum=" << max << ", mean=" << mean << ", mode=" << mode << ", median=" << median << ", stddev=" << stddev << "\n";
-+      os << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << ": minimum=" << min << ", maximum=" << max << ", mean=" << mean << ", mode=" << mode << ", median=" << median << ", stddev=" << stddev << "\n";
-       double d, r, e;
-       rIF.comparativeStatistics (rCompareIF, d, r, e);
-       os << "Comparative Statistics: d=" << d << ", r=" << r << ", e=" << e << "\n";
--      *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
-+      *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<\n");
-       if (dialogGetCompare.getMakeDifferenceImage()) {
-         ImageFile* pDifferenceImage = new ImageFile;
-         pDifferenceImage->setArraySize (rIF.nx(), rIF.ny());
-         if (! rIF.subtractImages (rCompareIF, *pDifferenceImage)) {
--          *theApp->getLog() << "Unable to subtract images\n";
-+          *theApp->getLog() << _T("Unable to subtract images\n");
-           delete pDifferenceImage;
-           return;
-         }
-@@ -415,13 +416,13 @@
-         }
-         pDifferenceDoc->setImageFile (pDifferenceImage);
--        wxString s = GetFrame()->GetTitle() + ": ";
--        pDifferenceImage->labelsCopy (rIF, s.c_str());
--        s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
--        pDifferenceImage->labelsCopy (rCompareIF, s.c_str());
-+        wxString s = m_pFrame->GetTitle() + _T(": ");
-+        pDifferenceImage->labelsCopy (rIF, s.mb_str(wxConvUTF8));
-+        s = dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+        pDifferenceImage->labelsCopy (rCompareIF, s.mb_str(wxConvUTF8));
-         std::ostringstream osLabel;
--        osLabel << "Compare image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str()
--          << " and " << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str() << ": "
-+        osLabel << "Compare image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str()
-+                << " and " << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().c_str() << ": "
-           << os.str().c_str();
-         pDifferenceImage->labelAdd (os.str().c_str());
-         if (theApp->getAskDeleteNewDocs())
-@@ -431,7 +432,7 @@
-         pDifferenceDoc->getView()->setInitialClientSize();
-         pDifferenceDoc->Activate();
-       }
--      wxMessageBox(os.str().c_str(), "Image Comparison");
-+      wxMessageBox(wxConvUTF8.cMB2WX(os.str().c_str()), _T("Image Comparison"));
-     }
-   }
- }
-@@ -508,9 +509,9 @@
-   theApp->getCompatibleImages (GetDocument(), vecIF);
-   if (vecIF.size() == 0) {
--    wxMessageBox ("There are no compatible image files open for comparision", "No comparison images");
-+    wxMessageBox (_T("There are no compatible image files open for comparision"), _T("No comparison images"));
-   } else {
--    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Image to Add", vecIF, false);
-+    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Image to Add"), vecIF, false);
-     if (dialogGetCompare.ShowModal() == wxID_OK) {
-       ImageFile& rIF = GetDocument()->getImageFile();
-@@ -525,14 +526,14 @@
-       newImage.setArraySize (rIF.nx(), rIF.ny());
-       rIF.addImages (rRHSIF, newImage);
-       std::ostringstream os;
--      os << "Add image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
--        << pRHSDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
--      wxString s = GetDocument()->GetFirstView()->GetFrame()->GetTitle() + ": ";
--      newImage.labelsCopy (rIF, s.c_str());
--      s = pRHSDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
--      newImage.labelsCopy (rRHSIF, s.c_str());
-+      os << "Add image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
-+         << dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      wxString s = dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+      newImage.labelsCopy (rIF, s.mb_str(wxConvUTF8));
-+      s = dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+      newImage.labelsCopy (rRHSIF, s.mb_str(wxConvUTF8));
-       newImage.labelAdd (os.str().c_str());
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       if (theApp->getAskDeleteNewDocs())
-         pNewDoc->Modify (true);
-       OnUpdate(this, NULL);
-@@ -550,9 +551,9 @@
-   theApp->getCompatibleImages (GetDocument(), vecIF);
-   if (vecIF.size() == 0) {
--    wxMessageBox ("There are no compatible image files open for comparision", "No comparison images");
-+    wxMessageBox (_T("There are no compatible image files open for comparision"), _T("No comparison images"));
-   } else {
--    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Image to Subtract", vecIF, false);
-+    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Image to Subtract"), vecIF, false);
-     if (dialogGetCompare.ShowModal() == wxID_OK) {
-       ImageFile& rIF = GetDocument()->getImageFile();
-@@ -567,14 +568,14 @@
-       newImage.setArraySize (rIF.nx(), rIF.ny());
-       rIF.subtractImages (rRHSIF, newImage);
-       std::ostringstream os;
--      os << "Subtract image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
--        << pRHSDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
--      wxString s = GetDocument()->GetFirstView()->GetFrame()->GetTitle() + ": ";
--      newImage.labelsCopy (rIF, s.c_str());
--      s = pRHSDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
--      newImage.labelsCopy (rRHSIF, s.c_str());
-+      os << "Subtract image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
-+         << dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      wxString s = dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+      newImage.labelsCopy (rIF, s.mb_str(wxConvUTF8));
-+      s = dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+      newImage.labelsCopy (rRHSIF, s.mb_str(wxConvUTF8));
-       newImage.labelAdd (os.str().c_str());
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       if (theApp->getAskDeleteNewDocs())
-         pNewDoc->Modify (true);
-       OnUpdate(this, NULL);
-@@ -592,9 +593,9 @@
-   theApp->getCompatibleImages (GetDocument(), vecIF);
-   if (vecIF.size() == 0) {
--    wxMessageBox ("There are no compatible image files open for comparision", "No comparison images");
-+    wxMessageBox (_T("There are no compatible image files open for comparision"), _T("No comparison images"));
-   } else {
--    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Image to Multiply", vecIF, false);
-+    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Image to Multiply"), vecIF, false);
-     if (dialogGetCompare.ShowModal() == wxID_OK) {
-       ImageFile& rIF = GetDocument()->getImageFile();
-@@ -609,14 +610,14 @@
-       newImage.setArraySize (rIF.nx(), rIF.ny());
-       rIF.multiplyImages (rRHSIF, newImage);
-       std::ostringstream os;
--      os << "Multiply image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
--        << pRHSDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
--      wxString s = GetDocument()->GetFirstView()->GetFrame()->GetTitle() + ": ";
--      newImage.labelsCopy (rIF, s.c_str());
--      s = pRHSDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
--      newImage.labelsCopy (rRHSIF, s.c_str());
-+      os << "Multiply image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
-+         << dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      wxString s = dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+      newImage.labelsCopy (rIF, s.mb_str(wxConvUTF8));
-+      s = dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+      newImage.labelsCopy (rRHSIF, s.mb_str(wxConvUTF8));
-       newImage.labelAdd (os.str().c_str());
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       if (theApp->getAskDeleteNewDocs())
-         pNewDoc->Modify (true);
-       OnUpdate(this, NULL);
-@@ -634,9 +635,9 @@
-   theApp->getCompatibleImages (GetDocument(), vecIF);
-   if (vecIF.size() == 0) {
--    wxMessageBox ("There are no compatible image files open for comparision", "No comparison images");
-+    wxMessageBox (_T("There are no compatible image files open for comparision"), _T("No comparison images"));
-   } else {
--    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Image to Divide", vecIF, false);
-+    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Image to Divide"), vecIF, false);
-     if (dialogGetCompare.ShowModal() == wxID_OK) {
-       ImageFile& rIF = GetDocument()->getImageFile();
-@@ -651,14 +652,14 @@
-       newImage.setArraySize (rIF.nx(), rIF.ny());
-       rIF.divideImages (rRHSIF, newImage);
-       std::ostringstream os;
--      os << "Divide image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " by "
--        << pRHSDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
--      wxString s = GetDocument()->GetFirstView()->GetFrame()->GetTitle() + ": ";
--      newImage.labelsCopy (rIF, s.c_str());
--      s = pRHSDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
--      newImage.labelsCopy (rRHSIF, s.c_str());
-+      os << "Divide image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " by "
-+         << dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      wxString s = dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+      newImage.labelsCopy (rIF, s.mb_str(wxConvUTF8));
-+      s = dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
-+      newImage.labelsCopy (rRHSIF, s.mb_str(wxConvUTF8));
-       newImage.labelAdd (os.str().c_str());
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       if (theApp->getAskDeleteNewDocs())
-         pNewDoc->Modify (true);
-       OnUpdate(this, NULL);
-@@ -766,7 +767,7 @@
- ImageFileView::OnFourier (wxCommandEvent& event)
- {
-   ImageFile& rIF = GetDocument()->getImageFile();
--  wxProgressDialog dlgProgress (wxString("Fourier"), wxString("Fourier Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-+  wxProgressDialog dlgProgress (_T("Fourier"), _T("Fourier Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-   rIF.fourier (rIF);
-   rIF.labelAdd ("Fourier Image");
-   m_bMinSpecified = false;
-@@ -782,7 +783,7 @@
- ImageFileView::OnInverseFourier (wxCommandEvent& event)
- {
-   ImageFile& rIF = GetDocument()->getImageFile();
--  wxProgressDialog dlgProgress (wxString("Inverse Fourier"), wxString("Inverse Fourier Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-+  wxProgressDialog dlgProgress (_T("Inverse Fourier"), _T("Inverse Fourier Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-   rIF.inverseFourier (rIF);
-   rIF.labelAdd ("Inverse Fourier Image");
-   m_bMinSpecified = false;
-@@ -897,7 +898,7 @@
-   ImageFileCanvas* pCanvas = new ImageFileCanvas (this, parent, wxPoint(-1,-1),
-                                                   wxSize(-1,-1), 0);
-   pCanvas->SetBackgroundColour(*wxWHITE);
--  pCanvas->Clear();
-+  pCanvas->ClearBackground();
-   return pCanvas;
- }
-@@ -910,97 +911,97 @@
- ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
- {
- #if CTSIM_MDI
--  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("ImageFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #else
--  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("ImageFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #endif
-   theApp->setIconForFrame (subframe);
-   m_pFileMenu = new wxMenu;
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
--  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
--  m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
--  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
--  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
--  m_pFileMenu->Append(wxID_REVERT, "Re&vert");
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
-+  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
-+  m_pFileMenu->Append(wxID_SAVE, _T("&Save\tCtrl-S"));
-+  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
-+  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
-+  m_pFileMenu->Append(wxID_REVERT, _T("Re&vert"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, "P&roperties\tCtrl-I");
--  m_pFileMenu->Append(IFMENU_FILE_EXPORT, "Expor&t...");
-+  m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, _T("P&roperties\tCtrl-I"));
-+  m_pFileMenu->Append(IFMENU_FILE_EXPORT, _T("Expor&t..."));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(wxID_PRINT, "&Print...");
--  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
--  m_pFileMenu->Append(wxID_PREVIEW, "Print Preview");
-+  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
-+  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
-+  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Preview"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
-+  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
--  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
-+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
-+  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
-   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
-   GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
-   wxMenu* edit_menu = new wxMenu;
--  edit_menu->Append(IFMENU_EDIT_COPY, "Copy\tCtrl-C");
--  edit_menu->Append(IFMENU_EDIT_CUT, "Cut\tCtrl-X");
--  edit_menu->Append(IFMENU_EDIT_PASTE, "Paste\tCtrl-V");
-+  edit_menu->Append(IFMENU_EDIT_COPY, _T("Copy\tCtrl-C"));
-+  edit_menu->Append(IFMENU_EDIT_CUT, _T("Cut\tCtrl-X"));
-+  edit_menu->Append(IFMENU_EDIT_PASTE, _T("Paste\tCtrl-V"));
-   wxMenu *view_menu = new wxMenu;
--  view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, "Display Scale S&et...\tCtrl-E");
--  view_menu->Append(IFMENU_VIEW_SCALE_AUTO, "Display Scale &Auto...\tCtrl-A");
--  view_menu->Append(IFMENU_VIEW_SCALE_FULL, "Display F&ull Scale\tCtrl-U");
-+  view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, _T("Display Scale S&et...\tCtrl-E"));
-+  view_menu->Append(IFMENU_VIEW_SCALE_AUTO, _T("Display Scale &Auto...\tCtrl-A"));
-+  view_menu->Append(IFMENU_VIEW_SCALE_FULL, _T("Display F&ull Scale\tCtrl-U"));
-   m_pFilterMenu = new wxMenu;
--  m_pFilterMenu->Append (IFMENU_FILTER_INVERTVALUES, "In&vert Values");
--  m_pFilterMenu->Append (IFMENU_FILTER_SQUARE, "&Square");
--  m_pFilterMenu->Append (IFMENU_FILTER_SQRT, "Square &Root");
--  m_pFilterMenu->Append (IFMENU_FILTER_LOG, "&Log");
--  m_pFilterMenu->Append (IFMENU_FILTER_EXP, "E&xp");
-+  m_pFilterMenu->Append (IFMENU_FILTER_INVERTVALUES, _T("In&vert Values"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_SQUARE, _T("&Square"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_SQRT, _T("Square &Root"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_LOG, _T("&Log"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_EXP, _T("E&xp"));
-   m_pFilterMenu->AppendSeparator();
- #ifdef HAVE_FFT
--  m_pFilterMenu->Append (IFMENU_FILTER_FFT, "2-D &FFT\tCtrl-2");
--  m_pFilterMenu->Append (IFMENU_FILTER_IFFT, "2-D &IFFT\tAlt-2");
--  m_pFilterMenu->Append (IFMENU_FILTER_FFT_ROWS, "FFT Rows");
--  m_pFilterMenu->Append (IFMENU_FILTER_IFFT_ROWS, "IFFT Rows");
--  m_pFilterMenu->Append (IFMENU_FILTER_FFT_COLS, "FFT Columns");
--  m_pFilterMenu->Append (IFMENU_FILTER_IFFT_COLS, "IFFT Columns");
--  m_pFilterMenu->Append (IFMENU_FILTER_FOURIER, "2-D F&ourier");
--  m_pFilterMenu->Append (IFMENU_FILTER_INVERSE_FOURIER, "2-D Inverse Fo&urier");
-+  m_pFilterMenu->Append (IFMENU_FILTER_FFT, _T("2-D &FFT\tCtrl-2"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_IFFT, _T("2-D &IFFT\tAlt-2"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_FFT_ROWS, _T("FFT Rows"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_IFFT_ROWS, _T("IFFT Rows"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_FFT_COLS, _T("FFT Columns"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_IFFT_COLS, _T("IFFT Columns"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_FOURIER, _T("2-D F&ourier"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_INVERSE_FOURIER, _T("2-D Inverse Fo&urier"));
- #else
--  m_pFilterMenu->Append (IFMENU_FILTER_FOURIER, "&Fourier");
--  m_pFilterMenu->Append (IFMENU_FILTER_INVERSE_FOURIER, "&Inverse Fourier");
-+  m_pFilterMenu->Append (IFMENU_FILTER_FOURIER, _T("&Fourier"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_INVERSE_FOURIER, _T("&Inverse Fourier"));
- #endif
--  m_pFilterMenu->Append (IFMENU_FILTER_SHUFFLEFOURIERTONATURALORDER, "Shuffl&e Fourier to Natural Order");
--  m_pFilterMenu->Append (IFMENU_FILTER_SHUFFLENATURALTOFOURIERORDER, "Shuffle &Natural to Fourier Order");
-+  m_pFilterMenu->Append (IFMENU_FILTER_SHUFFLEFOURIERTONATURALORDER, _T("Shuffl&e Fourier to Natural Order"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_SHUFFLENATURALTOFOURIERORDER, _T("Shuffle &Natural to Fourier Order"));
-   m_pFilterMenu->AppendSeparator();
--  m_pFilterMenu->Append (IFMENU_FILTER_MAGNITUDE, "&Magnitude");
--  m_pFilterMenu->Append (IFMENU_FILTER_PHASE, "&Phase");
--  m_pFilterMenu->Append (IFMENU_FILTER_REAL, "Re&al");
--  m_pFilterMenu->Append (IFMENU_FILTER_IMAGINARY, "Ima&ginary");
-+  m_pFilterMenu->Append (IFMENU_FILTER_MAGNITUDE, _T("&Magnitude"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_PHASE, _T("&Phase"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_REAL, _T("Re&al"));
-+  m_pFilterMenu->Append (IFMENU_FILTER_IMAGINARY, _T("Ima&ginary"));
-   wxMenu* image_menu = new wxMenu;
--  image_menu->Append (IFMENU_IMAGE_ADD, "&Add...");
--  image_menu->Append (IFMENU_IMAGE_SUBTRACT, "&Subtract...");
--  image_menu->Append (IFMENU_IMAGE_MULTIPLY, "&Multiply...");
--  image_menu->Append (IFMENU_IMAGE_DIVIDE, "&Divide...");
-+  image_menu->Append (IFMENU_IMAGE_ADD, _T("&Add..."));
-+  image_menu->Append (IFMENU_IMAGE_SUBTRACT, _T("&Subtract..."));
-+  image_menu->Append (IFMENU_IMAGE_MULTIPLY, _T("&Multiply..."));
-+  image_menu->Append (IFMENU_IMAGE_DIVIDE, _T("&Divide..."));
-   image_menu->AppendSeparator();
--  image_menu->Append (IFMENU_IMAGE_SCALESIZE, "S&cale Size...");
-+  image_menu->Append (IFMENU_IMAGE_SCALESIZE, _T("S&cale Size..."));
- #if wxUSE_GLCANVAS
--  image_menu->Append (IFMENU_IMAGE_CONVERT3D, "Convert &3-D\tCtrl-3");
-+  image_menu->Append (IFMENU_IMAGE_CONVERT3D, _T("Convert &3-D\tCtrl-3"));
- #endif
-   m_pMenuAnalyze = new wxMenu;
--  m_pMenuAnalyze->Append (IFMENU_PLOT_ROW, "Plot &Row");
--  m_pMenuAnalyze->Append (IFMENU_PLOT_COL, "Plot &Column");
--  m_pMenuAnalyze->Append (IFMENU_PLOT_HISTOGRAM, "Plot &Histogram");
-+  m_pMenuAnalyze->Append (IFMENU_PLOT_ROW, _T("Plot &Row"));
-+  m_pMenuAnalyze->Append (IFMENU_PLOT_COL, _T("Plot &Column"));
-+  m_pMenuAnalyze->Append (IFMENU_PLOT_HISTOGRAM, _T("Plot &Histogram"));
-   m_pMenuAnalyze->AppendSeparator();
--  m_pMenuAnalyze->Append (IFMENU_PLOT_FFT_ROW, "P&lot FFT Row");
--  m_pMenuAnalyze->Append (IFMENU_PLOT_FFT_COL, "Plo&t FFT Column");
-+  m_pMenuAnalyze->Append (IFMENU_PLOT_FFT_ROW, _T("P&lot FFT Row"));
-+  m_pMenuAnalyze->Append (IFMENU_PLOT_FFT_COL, _T("Plo&t FFT Column"));
-   m_pMenuAnalyze->AppendSeparator();
--  m_pMenuAnalyze->Append (IFMENU_COMPARE_IMAGES, "Compare &Images...");
--  m_pMenuAnalyze->Append (IFMENU_COMPARE_ROW, "Compare Ro&w");
--  m_pMenuAnalyze->Append (IFMENU_COMPARE_COL, "Compare Colu&mn");
-+  m_pMenuAnalyze->Append (IFMENU_COMPARE_IMAGES, _T("Compare &Images..."));
-+  m_pMenuAnalyze->Append (IFMENU_COMPARE_ROW, _T("Compare Ro&w"));
-+  m_pMenuAnalyze->Append (IFMENU_COMPARE_COL, _T("Compare Colu&mn"));
-   m_pMenuAnalyze->Enable (IFMENU_PLOT_ROW, false);
-   m_pMenuAnalyze->Enable (IFMENU_PLOT_COL, false);
-   m_pMenuAnalyze->Enable (IFMENU_COMPARE_ROW, false);
-@@ -1009,20 +1010,20 @@
-   m_pMenuAnalyze->Enable (IFMENU_PLOT_FFT_COL, false);
-   wxMenu *help_menu = new wxMenu;
--  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
--  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
--  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
--  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
-+  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
-+  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
-+  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
-+  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
-   wxMenuBar *menu_bar = new wxMenuBar;
--  menu_bar->Append(m_pFileMenu, "&File");
--  menu_bar->Append(edit_menu, "&Edit");
--  menu_bar->Append(view_menu, "&View");
--  menu_bar->Append(image_menu, "&Image");
--  menu_bar->Append(m_pFilterMenu, "Fi&lter");
--  menu_bar->Append(m_pMenuAnalyze, "&Analyze");
--  menu_bar->Append(help_menu, "&Help");
-+  menu_bar->Append(m_pFileMenu, _T("&File"));
-+  menu_bar->Append(edit_menu, _T("&Edit"));
-+  menu_bar->Append(view_menu, _T("&View"));
-+  menu_bar->Append(image_menu, _T("&Image"));
-+  menu_bar->Append(m_pFilterMenu, _T("Fi&lter"));
-+  menu_bar->Append(m_pMenuAnalyze, _T("&Analyze"));
-+  menu_bar->Append(help_menu, _T("&Help"));
-   subframe->SetMenuBar(menu_bar);
-@@ -1064,7 +1065,7 @@
-   m_pCanvas = CreateCanvas (m_pFrame);
-   m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
-   m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
--  m_pFrame->SetTitle("ImageFileView");
-+  m_pFrame->SetTitle(_T("ImageFileView"));
-   m_pFrame->Show(true);
-   Activate(true);
-@@ -1089,7 +1090,7 @@
- {
-   if (m_pBitmap && m_pBitmap->Ok()) {
- #ifdef DEBUG
--    *theApp->getLog() << "Drawing bitmap\n";
-+    *theApp->getLog() << _T("Drawing bitmap\n");
- #endif
-     dc->DrawBitmap(*m_pBitmap, 0, 0, false);
-   }
-@@ -1147,7 +1148,7 @@
-       m_pBitmap = NULL;
-     }
- #ifdef DEBUG
--    *theApp->getLog() << "Making new bitmap\n";
-+    *theApp->getLog() << _T("Making new bitmap\n");
- #endif
-     m_pBitmap = new wxBitmap (image);
-     delete imageData;
-@@ -1281,41 +1282,46 @@
-     DialogExportParameters dialogExport (getFrameForChild(), m_iDefaultExportFormatID);
-     if (dialogExport.ShowModal() == wxID_OK) {
--      wxString strFormatName (dialogExport.getFormatName ());
--      m_iDefaultExportFormatID = ImageFile::convertExportFormatNameToID (strFormatName.c_str());
-+      wxString strFormatName (dialogExport.getFormatName (), wxConvUTF8);
-+      m_iDefaultExportFormatID = ImageFile::convertExportFormatNameToID (strFormatName.mb_str(wxConvUTF8));
-       wxString strExt;
-       wxString strWildcard;
-       if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_PGM || m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_PGMASCII) {
--        strExt = ".pgm";
--        strWildcard = "PGM Files (*.pgm)|*.pgm";
-+        strExt = _T(".pgm");
-+        strWildcard = _T("PGM Files (*.pgm)|*.pgm");
-       }
- #ifdef HAVE_PNG
-       else if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_PNG || m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_PNG16) {
--        strExt = ".png";
--        strWildcard = "PNG Files (*.png)|*.png";
-+        strExt = _T(".png");
-+        strWildcard = _T("PNG Files (*.png)|*.png");
-       }
- #endif
- #ifdef HAVE_CTN_DICOM
-       else if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_DICOM) {
--        strExt = "";
--        strWildcard = "DICOM Files (*.*)|*.*";
-+        strExt = _T("");
-+        strWildcard = _T("DICOM Files (*.*)|*.*");
-       }
- #endif
-       else if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_TEXT) {
--        strExt = ".txt";
--        strWildcard = "Text (*.txt)|*.txt";
-+        strExt = _T(".txt");
-+        strWildcard = _T("Text (*.txt)|*.txt");
-       }
-       else {
--        strExt = "";
--        strWildcard = "Miscellaneous (*.*)|*.*";
-+        strExt = _T("");
-+        strWildcard = _T("Miscellaneous (*.*)|*.*");
-       }
--      const wxString& strFilename = wxFileSelector (wxString("Export Filename"), wxString(""),
--        wxString(""), strExt, strWildcard, wxOVERWRITE_PROMPT | wxHIDE_READONLY | wxSAVE);
-+#if WXWIN_COMPATIBILITY_2_4
-+      const wxString& strFilename = wxFileSelector (_T("Export Filename"), _T(""),
-+        _T(""), strExt, strWildcard, wxOVERWRITE_PROMPT | wxHIDE_READONLY | wxSAVE);
-+#else
-+      const wxString& strFilename = wxFileSelector (_T("Export Filename"), _T(""),
-+        _T(""), strExt, strWildcard, wxOVERWRITE_PROMPT | wxSAVE);
-+#endif
-       if (strFilename) {
--        rIF.exportImage (strFormatName.c_str(), strFilename.c_str(), 1, 1, m_dMinPixel, m_dMaxPixel);
--        *theApp->getLog() << "Exported file " << strFilename << "\n";
-+        rIF.exportImage (strFormatName.mb_str(wxConvUTF8), strFilename.mb_str(wxConvUTF8), 1, 1, m_dMinPixel, m_dMaxPixel);
-+        *theApp->getLog() << _T("Exported file ") << strFilename << _T("\n");
-       }
-     }
-   }
-@@ -1328,7 +1334,7 @@
-   unsigned int iOldNX = rIF.nx();
-   unsigned int iOldNY = rIF.ny();
--  DialogGetXYSize dialogGetXYSize (getFrameForChild(), "Set New X & Y Dimensions", iOldNX, iOldNY);
-+  DialogGetXYSize dialogGetXYSize (getFrameForChild(), _T("Set New X & Y Dimensions"), iOldNX, iOldNY);
-   if (dialogGetXYSize.ShowModal() == wxID_OK) {
-     unsigned int iNewNX = dialogGetXYSize.getXSize();
-     unsigned int iNewNY = dialogGetXYSize.getYSize();
-@@ -1344,7 +1350,7 @@
-     rScaledIF.labelsCopy (rIF);
-     rScaledIF.labelAdd (os.str().c_str());
-     rIF.scaleImage (rScaledIF);
--    *theApp->getLog() << os.str().c_str() << "\n";
-+    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-     if (theApp->getAskDeleteNewDocs())
-       pScaledDoc->Modify (true);
-     OnUpdate(this, NULL);
-@@ -1376,7 +1382,7 @@
- {
-   int xCursor, yCursor;
-   if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
--    wxMessageBox ("No row selected. Please use left mouse button on image to select column","Error");
-+    wxMessageBox (_T("No row selected. Please use left mouse button on image to select column"),_T("Error"));
-     return;
-   }
-@@ -1439,8 +1445,8 @@
-       }
-       for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
-         rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
--      os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      os << " Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       rPlotFile.addDescription (os.str().c_str());
-     }
-     delete pX;
-@@ -1462,7 +1468,7 @@
- {
-   int xCursor, yCursor;
-   if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
--    wxMessageBox ("No column selected. Please use left mouse button on image to select column","Error");
-+    wxMessageBox (_T("No column selected. Please use left mouse button on image to select column"),_T("Error"));
-     return;
-   }
-@@ -1525,8 +1531,8 @@
-       }
-       for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
-         rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
--      os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      os << " Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       rPlotFile.addDescription (os.str().c_str());
-     }
-     delete pX;
-@@ -1549,7 +1555,7 @@
- {
-   int xCursor, yCursor;
-   if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
--    wxMessageBox ("No row selected. Please use left mouse button on image to select column","Error");
-+    wxMessageBox (_T("No row selected. Please use left mouse button on image to select column"),_T("Error"));
-     return;
-   }
-@@ -1620,8 +1626,8 @@
-       rPlotFile.addColumn (3, pYMag);
-       for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
-         rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
--      os << " FFT Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      os << " FFT Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       rPlotFile.addDescription (os.str().c_str());
-     }
-     delete pX;
-@@ -1643,7 +1649,7 @@
- {
-   int xCursor, yCursor;
-   if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
--    wxMessageBox ("No column selected. Please use left mouse button on image to select column","Error");
-+    wxMessageBox (_T("No column selected. Please use left mouse button on image to select column"),_T("Error"));
-     return;
-   }
-@@ -1720,8 +1726,8 @@
-       rPlotFile.addColumn (3, pYMag);
-       for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
-         rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
--      os << " FFT Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      os << " FFT Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       rPlotFile.addDescription (os.str().c_str());
-     }
-     delete pX;
-@@ -1745,17 +1751,17 @@
- {
-   int xCursor, yCursor;
-   if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
--    wxMessageBox ("No column selected. Please use left mouse button on image to select column","Error");
-+    wxMessageBox (_T("No column selected. Please use left mouse button on image to select column"),_T("Error"));
-     return;
-   }
-   std::vector<ImageFileDocument*> vecIFDoc;
-   theApp->getCompatibleImages (GetDocument(), vecIFDoc);
-   if (vecIFDoc.size() == 0) {
--    wxMessageBox ("No compatible images for Column Comparison", "Error");
-+    wxMessageBox (_T("No compatible images for Column Comparison"), _T("Error"));
-     return;
-   }
--  DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Comparison Image", vecIFDoc, false);
-+  DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Comparison Image"), vecIFDoc, false);
-   if (dialogGetCompare.ShowModal() == wxID_OK) {
-     ImageFileDocument* pCompareDoc = dialogGetCompare.getImageFileDocument();
-@@ -1803,20 +1809,21 @@
-         unsigned int iL;
-         for (iL = 0; iL < rIF.nLabels(); iL++) {
--          std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--          s += ": ";
--          s += rIF.labelGet(iL).getLabelString();
--          rPlotFile.addDescription (s.c_str());
-+          std::ostringstream os;
-+          os << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
-+          os << ": " << rIF.labelGet(iL).getLabelString();
-+          rPlotFile.addDescription (os.str().c_str());
-         }
-         for (iL = 0; iL < rCompareIF.nLabels(); iL++) {
--          std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
--          s += ": ";
--          s += rCompareIF.labelGet(iL).getLabelString();
--          rPlotFile.addDescription (s.c_str());
--        }
--        os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
--          << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
--        *theApp->getLog() << os.str().c_str() << "\n";
-+          std::ostringstream os;
-+          os << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
-+          os << ": ";
-+          os << rCompareIF.labelGet(iL).getLabelString();
-+          rPlotFile.addDescription (os.str().c_str());
-+        }
-+        os << " Between " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
-+           << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
-+        *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-         rPlotFile.addDescription (os.str().c_str());
-       }
-       delete pX;
-@@ -1836,7 +1843,7 @@
- {
-   int xCursor, yCursor;
-   if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
--    wxMessageBox ("No column selected. Please use left mouse button on image to select column","Error");
-+    wxMessageBox (_T("No column selected. Please use left mouse button on image to select column"),_T("Error"));
-     return;
-   }
-@@ -1844,11 +1851,11 @@
-   theApp->getCompatibleImages (GetDocument(), vecIFDoc);
-   if (vecIFDoc.size() == 0) {
--    wxMessageBox ("No compatible images for Row Comparison", "Error");
-+    wxMessageBox (_T("No compatible images for Row Comparison"), _T("Error"));
-     return;
-   }
--  DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Comparison Image", vecIFDoc, false);
-+  DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Comparison Image"), vecIFDoc, false);
-   if (dialogGetCompare.ShowModal() == wxID_OK) {
-     ImageFileDocument* pCompareDoc = dialogGetCompare.getImageFileDocument();
-@@ -1895,20 +1902,21 @@
-         rPlotFile.addColumn (2, pY2);
-         unsigned int iL;
-         for (iL = 0; iL < rIF.nLabels(); iL++) {
--          std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--          s += ": ";
--          s += rIF.labelGet(iL).getLabelString();
--          rPlotFile.addDescription (s.c_str());
-+          std::ostringstream os;
-+          os << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
-+          os << ": ";
-+          os << rIF.labelGet(iL).getLabelString();
-+          rPlotFile.addDescription (os.str().c_str());
-         }
-         for (iL = 0; iL < rCompareIF.nLabels(); iL++) {
--          std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
--          s += ": ";
--          s += rCompareIF.labelGet(iL).getLabelString();
--          rPlotFile.addDescription (s.c_str());
--        }
--        os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
--          << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
--        *theApp->getLog() << os.str().c_str() << "\n";
-+          std::ostringstream os;
-+          os << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << ": "
-+             << rCompareIF.labelGet(iL).getLabelString();
-+          rPlotFile.addDescription (os.str().c_str());
-+        }
-+        os << " Between " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << " and "
-+           << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
-+        *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-         rPlotFile.addDescription (os.str().c_str());
-       }
-       delete pX;
-@@ -1971,13 +1979,13 @@
-       rPlotFile.addColumn (0, pX);
-       rPlotFile.addColumn (1, pY);
-       for (unsigned int iL = 0; iL < rIF.nLabels(); iL++) {
--        std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--        s += ": ";
--        s += rIF.labelGet(iL).getLabelString();
--        rPlotFile.addDescription (s.c_str());
-+        std::ostringstream os;
-+        os << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
-+        os << ": " << rIF.labelGet(iL).getLabelString();
-+        rPlotFile.addDescription (os.str().c_str());
-       }
--      os << "  plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--      *theApp->getLog() << os.str().c_str() << "\n";
-+      os << "  plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
-+      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-       rPlotFile.addDescription (os.str().c_str());
-       delete pX;
-       delete pY;
-@@ -2075,7 +2083,7 @@
- PhantomFileView::~PhantomFileView()
- {
-   GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
--  GetDocumentManager()->ActivateView(this, FALSE, TRUE);
-+  GetDocumentManager()->ActivateView(this, FALSE);
- }
- void
-@@ -2090,8 +2098,8 @@
- #if DEBUG
-   rPhantom.print (os);
- #endif
--  *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
--  wxMessageBox (os.str().c_str(), "Phantom Properties");
-+  *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<\n");
-+  wxMessageBox (wxConvUTF8.cMB2WX(os.str().c_str()), _T("Phantom Properties"));
-   GetDocument()->Activate();
- }
-@@ -2117,22 +2125,22 @@
-   m_dDefaultCenterDetectorLength = dialogProjection.getCenterDetectorLengthRatio();
-   m_dDefaultViewRatio = dialogProjection.getViewRatio();
-   m_dDefaultScanRatio = dialogProjection.getScanRatio();
--  wxString sGeometry = dialogProjection.getGeometry();
--  m_iDefaultGeometry = Scanner::convertGeometryNameToID (sGeometry.c_str());
-+  wxString sGeometry (dialogProjection.getGeometry(), wxConvUTF8);
-+  m_iDefaultGeometry = Scanner::convertGeometryNameToID (sGeometry.mb_str(wxConvUTF8));
-   double dRotationRadians = m_dDefaultRotation;
-   m_dDefaultRotation /= TWOPI;  // convert back to fraction of a circle
--  if (m_iDefaultNDet <= 0 || m_iDefaultNView <= 0 || sGeometry == "")
-+  if (m_iDefaultNDet <= 0 || m_iDefaultNView <= 0 || sGeometry == _T(""))
-     return;
-   const Phantom& rPhantom = GetDocument()->getPhantom();
--  Scanner theScanner (rPhantom, sGeometry.c_str(), m_iDefaultNDet, m_iDefaultNView, m_iDefaultOffsetView, m_iDefaultNSample,
-+  Scanner theScanner (rPhantom, sGeometry.mb_str(wxConvUTF8), m_iDefaultNDet, m_iDefaultNView, m_iDefaultOffsetView, m_iDefaultNSample,
-     dRotationRadians, m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, m_dDefaultScanRatio);
-   if (theScanner.fail()) {
--    wxString msg = "Failed making scanner\n";
--    msg += theScanner.failMessage().c_str();
--    *theApp->getLog() << msg << "\n";
--    wxMessageBox (msg, "Error");
-+    wxString msg = _T("Failed making scanner\n");
-+    msg += wxConvUTF8.cMB2WX(theScanner.failMessage().c_str());
-+    *theApp->getLog() << msg << _T("\n");
-+    wxMessageBox (msg, _T("Error"));
-     return;
-   }
-@@ -2166,15 +2174,17 @@
-       ::wxYield();
-       while (dialogProjections.isPaused()) {
-         ::wxYield();
--        ::wxUsleep(50);
-+        ::wxMilliSleep(50);
-       }
-     }
-   } else {
- #if HAVE_WXTHREADS
-     if (theApp->getUseBackgroundTasks()) {
--      ProjectorSupervisorThread* pProjector = new ProjectorSupervisorThread (this, m_iDefaultNDet,
--        m_iDefaultNView, m_iDefaultOffsetView, sGeometry.c_str(), m_iDefaultNSample, dRotationRadians,
--        m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, m_dDefaultScanRatio, os.str().c_str());
-+      ProjectorSupervisorThread* pProjector = new ProjectorSupervisorThread
-+        (this, m_iDefaultNDet, m_iDefaultNView, m_iDefaultOffsetView, 
-+         sGeometry.mb_str(wxConvUTF8), m_iDefaultNSample, dRotationRadians,
-+         m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, 
-+         m_dDefaultScanRatio, wxConvUTF8.cMB2WX(os.str().c_str()));
-       if (pProjector->Create() != wxTHREAD_NO_ERROR) {
-         sys_error (ERR_SEVERE, "Error creating projector thread");
-         delete pProjector;
-@@ -2188,7 +2198,7 @@
-     {
-       pProj = new Projections;
-       pProj->initFromScanner (theScanner);
--      wxProgressDialog dlgProgress (wxString("Projection"), wxString("Projection Progress"), pProj->nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
-+      wxProgressDialog dlgProgress (_T("Projection"), _T("Projection Progress"), pProj->nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
-       for (int i = 0; i < pProj->nView(); i++) {
-         //theScanner.collectProjections (*pProj, rPhantom, i, 1, true, m_iDefaultTrace);
-         theScanner.collectProjections (*pProj, rPhantom, i, 1, theScanner.offsetView(), true, m_iDefaultTrace);
-@@ -2201,7 +2211,7 @@
-     }
-   }
--  *theApp->getLog() << os.str().c_str() << "\n";
-+  *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-   pProj->setRemark (os.str());
-   pProj->setCalcTime (timer.timerEnd());
-@@ -2218,8 +2228,6 @@
-   pProjectionDoc->getView()->setInitialClientSize();
-   pProjectionDoc->Activate();
- }
--
--
- void
- PhantomFileView::OnRasterize (wxCommandEvent& event)
- {
-@@ -2248,10 +2256,12 @@
- #if HAVE_WXTHREADS
-   if (theApp->getUseBackgroundTasks()) {
--    RasterizerSupervisorThread* pThread = new RasterizerSupervisorThread (this, m_iDefaultRasterNX, m_iDefaultRasterNY,
--      m_iDefaultRasterNSamples, m_dDefaultRasterViewRatio, os.str().c_str());
-+    RasterizerSupervisorThread* pThread = new RasterizerSupervisorThread
-+      (this, m_iDefaultRasterNX, m_iDefaultRasterNY,
-+       m_iDefaultRasterNSamples, m_dDefaultRasterViewRatio, 
-+       wxConvUTF8.cMB2WX(os.str().c_str()));
-     if (pThread->Create() != wxTHREAD_NO_ERROR) {
--      *theApp->getLog() << "Error creating rasterizer thread\n";
-+      *theApp->getLog() << _T("Error creating rasterizer thread\n");
-       return;
-     }
-     pThread->SetPriority (60);
-@@ -2261,8 +2271,8 @@
-   {
-     ImageFile* pImageFile = new ImageFile (m_iDefaultRasterNX, m_iDefaultRasterNY);
--    wxProgressDialog dlgProgress (wxString("Rasterize"),
--                                  wxString("Rasterization Progress"),
-+    wxProgressDialog dlgProgress (_T("Rasterize"),
-+                                  _T("Rasterization Progress"),
-                                   pImageFile->nx() + 1,
-                                   getFrameForChild(),
-                                   wxPD_CAN_ABORT );
-@@ -2286,7 +2296,7 @@
-     pRasterDoc->setImageFile (pImageFile);
-     if (theApp->getAskDeleteNewDocs())
-       pRasterDoc->Modify (true);
--    *theApp->getLog() << os.str().c_str() << "\n";
-+    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-     pImageFile->labelAdd (os.str().c_str(), timer.timerEnd());
-     pRasterDoc->UpdateAllViews(this);
-@@ -2302,7 +2312,7 @@
-   PhantomCanvas* pCanvas = new PhantomCanvas (this, parent, wxPoint(-1,-1),
-                                               wxSize(-1,-1), 0);
-   pCanvas->SetBackgroundColour(*wxWHITE);
--  pCanvas->Clear();
-+  pCanvas->ClearBackground();
-   return pCanvas;
- }
-@@ -2315,50 +2325,50 @@
- PhantomFileView::CreateChildFrame(wxDocument *doc, wxView *view)
- {
- #if CTSIM_MDI
--  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Phantom Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #else
--  wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Phantom Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #endif
-   theApp->setIconForFrame (subframe);
-   m_pFileMenu = new wxMenu;
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
--  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
--  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
--  m_pFileMenu->Append(wxID_CLOSE, "&Close");
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
-+  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
-+  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
-+  m_pFileMenu->Append(wxID_CLOSE, _T("&Close"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(PHMMENU_FILE_PROPERTIES, "P&roperties\tCtrl-I");
-+  m_pFileMenu->Append(PHMMENU_FILE_PROPERTIES, _T("P&roperties\tCtrl-I"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(wxID_PRINT, "&Print...");
--  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
--  m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
-+  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
-+  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
-+  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Pre&view"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
-+  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
--  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
-+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
-+  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
-   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
-   GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
-   wxMenu *process_menu = new wxMenu;
--  process_menu->Append(PHMMENU_PROCESS_RASTERIZE, "&Rasterize...\tCtrl-R");
--  process_menu->Append(PHMMENU_PROCESS_PROJECTIONS, "&Projections...\tCtrl-J");
-+  process_menu->Append(PHMMENU_PROCESS_RASTERIZE, _T("&Rasterize...\tCtrl-R"));
-+  process_menu->Append(PHMMENU_PROCESS_PROJECTIONS, _T("&Projections...\tCtrl-J"));
-   wxMenu *help_menu = new wxMenu;
--  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
--  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
--  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
--  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
-+  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
-+  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
-+  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
-+  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
-   wxMenuBar *menu_bar = new wxMenuBar;
--  menu_bar->Append(m_pFileMenu, "&File");
--  menu_bar->Append(process_menu, "&Process");
--  menu_bar->Append(help_menu, "&Help");
-+  menu_bar->Append(m_pFileMenu, _T("&File"));
-+  menu_bar->Append(process_menu, _T("&Process"));
-+  menu_bar->Append(help_menu, _T("&Help"));
-   subframe->SetMenuBar(menu_bar);
-   subframe->Centre(wxBOTH);
-@@ -2382,7 +2392,7 @@
-   m_pCanvas = CreateCanvas (m_pFrame);
-   m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
-   m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
--  m_pFrame->SetTitle ("PhantomFileView");
-+  m_pFrame->SetTitle (_T("PhantomFileView"));
-   m_pFrame->Show(true);
-   Activate(true);
-@@ -2536,7 +2546,7 @@
- ProjectionFileView::~ProjectionFileView()
- {
-   GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
--  GetDocumentManager()->ActivateView(this, FALSE, TRUE);;
-+  GetDocumentManager()->ActivateView(this, FALSE);;
- }
- void
-@@ -2545,8 +2555,8 @@
-   const Projections& rProj = GetDocument()->getProjections();
-   std::ostringstream os;
-   rProj.printScanInfo(os);
--  *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
--  wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), "Projection File Properties", wxOK | wxICON_INFORMATION);
-+  *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<\n");
-+  wxMessageDialog dialogMsg (getFrameForChild(), wxConvUTF8.cMB2WX(os.str().c_str()), _T("Projection File Properties"), wxOK | wxICON_INFORMATION);
-   dialogMsg.ShowModal();
-   GetDocument()->Activate();
- }
-@@ -2576,8 +2586,8 @@
-   pRectDoc->setImageFile (pIF);
-   pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime());
-   std::ostringstream os;
--  os << "Convert projection file " << GetFrame()->GetTitle().c_str() << " to rectangular image";
--  *theApp->getLog() << os.str().c_str() << "\n";
-+  os << "Convert projection file " << getFrame()->GetTitle().c_str() << " to rectangular image";
-+  *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-   pIF->labelAdd (os.str().c_str());
-   if (theApp->getAskDeleteNewDocs())
-     pRectDoc->Modify (true);
-@@ -2590,19 +2600,19 @@
- ProjectionFileView::OnConvertPolar (wxCommandEvent& event)
- {
-   Projections& rProj = GetDocument()->getProjections();
--  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Convert Polar", m_iDefaultPolarNX, m_iDefaultPolarNY,
-+  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), _T("Convert Polar"), m_iDefaultPolarNX, m_iDefaultPolarNY,
-     m_iDefaultPolarInterpolation, -1, IDH_DLG_POLAR);
-   if (dialogPolar.ShowModal() == wxID_OK) {
--    wxProgressDialog dlgProgress (wxString("Convert Polar"), wxString("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
--    wxString strInterpolation (dialogPolar.getInterpolationName());
-+    wxProgressDialog dlgProgress (_T("Convert Polar"), _T("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-+    wxString strInterpolation (dialogPolar.getInterpolationName(), wxConvUTF8);
-     m_iDefaultPolarNX = dialogPolar.getXSize();
-     m_iDefaultPolarNY = dialogPolar.getYSize();
-     ImageFile* pIF = new ImageFile (m_iDefaultPolarNX, m_iDefaultPolarNY);
--    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str());
-+    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.mb_str(wxConvUTF8));
-     if (! rProj.convertPolar (*pIF, m_iDefaultPolarInterpolation)) {
-       delete pIF;
--      *theApp->getLog() << "Error converting to Polar\n";
-+      *theApp->getLog() << _T("Error converting to Polar\n");
-       return;
-     }
-@@ -2614,10 +2624,10 @@
-     pPolarDoc->setImageFile (pIF);
-     pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime());
-     std::ostringstream os;
--    os << "Convert projection file " << GetFrame()->GetTitle().c_str() << " to polar image: xSize="
-+    os << "Convert projection file " << getFrame()->GetTitle().c_str() << " to polar image: xSize="
-       << m_iDefaultPolarNX << ", ySize=" << m_iDefaultPolarNY << ", interpolation="
-       << strInterpolation.c_str();
--    *theApp->getLog() << os.str().c_str() << "\n";
-+    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-     pIF->labelAdd (os.str().c_str());
-     if (theApp->getAskDeleteNewDocs())
-       pPolarDoc->Modify (true);
-@@ -2631,20 +2641,20 @@
- ProjectionFileView::OnConvertFFTPolar (wxCommandEvent& event)
- {
-   Projections& rProj = GetDocument()->getProjections();
--  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Convert to FFT Polar", m_iDefaultPolarNX, m_iDefaultPolarNY,
-+  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), _T("Convert to FFT Polar"), m_iDefaultPolarNX, m_iDefaultPolarNY,
-     m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad, IDH_DLG_FFT_POLAR);
-   if (dialogPolar.ShowModal() == wxID_OK) {
--    wxProgressDialog dlgProgress (wxString("Convert FFT Polar"), wxString("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
--    wxString strInterpolation (dialogPolar.getInterpolationName());
-+    wxProgressDialog dlgProgress (_T("Convert FFT Polar"), _T("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-+    wxString strInterpolation (dialogPolar.getInterpolationName(), wxConvUTF8);
-     m_iDefaultPolarNX = dialogPolar.getXSize();
-     m_iDefaultPolarNY = dialogPolar.getYSize();
-     m_iDefaultPolarZeropad = dialogPolar.getZeropad();
-     ImageFile* pIF = new ImageFile (m_iDefaultPolarNX, m_iDefaultPolarNY);
--    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str());
-+    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.mb_str(wxConvUTF8));
-     if (! rProj.convertFFTPolar (*pIF, m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad)) {
-       delete pIF;
--      *theApp->getLog() << "Error converting to polar\n";
-+      *theApp->getLog() << _T("Error converting to polar\n");
-       return;
-     }
-     ImageFileDocument* pPolarDoc = theApp->newImageDoc();
-@@ -2655,10 +2665,10 @@
-     pPolarDoc->setImageFile (pIF);
-     pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime());
-     std::ostringstream os;
--    os << "Convert projection file " << GetFrame()->GetTitle().c_str() << " to FFT polar image: xSize="
-+    os << "Convert projection file " << getFrame()->GetTitle().c_str() << " to FFT polar image: xSize="
-       << m_iDefaultPolarNX << ", ySize=" << m_iDefaultPolarNY << ", interpolation="
-       << strInterpolation.c_str() << ", zeropad=" << m_iDefaultPolarZeropad;
--    *theApp->getLog() << os.str().c_str() << "\n";
-+    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-     pIF->labelAdd (os.str().c_str());
-     if (theApp->getAskDeleteNewDocs())
-       pPolarDoc->Modify (true);
-@@ -2771,8 +2781,8 @@
-   rPlotFile.addColumn (0, pX);
-   rPlotFile.addColumn (1, pY);
-   rPlotFile.addDescription (rProj.remark());
--  os << " plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
--  *theApp->getLog() << os.str().c_str() << "\n";
-+  os << " plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
-+  *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-   rPlotFile.addDescription (os.str().c_str());
-   delete pX;
-   delete pY;
-@@ -2789,10 +2799,10 @@
- {
-   Projections& rProj = GetDocument()->getProjections();
-   if (rProj.geometry() == Scanner::GEOMETRY_PARALLEL) {
--    wxMessageBox ("Projections are already parallel", "Error");
-+    wxMessageBox (_T("Projections are already parallel"), _T("Error"));
-     return;
-   }
--  wxProgressDialog dlgProgress (wxString("Convert to Parallel"), wxString("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-+  wxProgressDialog dlgProgress (_T("Convert to Parallel"), _T("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-   Projections* pProjNew = rProj.interpolateToParallel();
-   ProjectionFileDocument* pProjDocNew = theApp->newProjectionDoc();
-   pProjDocNew->setProjections (pProjNew);
-@@ -2806,7 +2816,7 @@
-       pFrame->SetFocus();
-       pFrame->Raise();
-     }
--    GetDocumentManager()->ActivateView (projView, true, false);
-+    GetDocumentManager()->ActivateView (projView, true);
-   }
-   if (theApp->getAskDeleteNewDocs())
-     pProjDocNew-> Modify(true);
-@@ -2819,20 +2829,20 @@
- ProjectionFileView::OnReconstructFourier (wxCommandEvent& event)
- {
-   Projections& rProj = GetDocument()->getProjections();
--  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Fourier Reconstruction", m_iDefaultPolarNX, m_iDefaultPolarNY,
-+  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), _T("Fourier Reconstruction"), m_iDefaultPolarNX, m_iDefaultPolarNY,
-     m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad, IDH_DLG_RECON_FOURIER);
-   if (dialogPolar.ShowModal() == wxID_OK) {
--    wxProgressDialog dlgProgress (wxString("Reconstruction Fourier"), wxString("Reconstruction Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
--    wxString strInterpolation (dialogPolar.getInterpolationName());
-+    wxProgressDialog dlgProgress (_T("Reconstruction Fourier"), _T("Reconstruction Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
-+    wxString strInterpolation (dialogPolar.getInterpolationName(), wxConvUTF8);
-     m_iDefaultPolarNX = dialogPolar.getXSize();
-     m_iDefaultPolarNY = dialogPolar.getYSize();
-     m_iDefaultPolarZeropad = dialogPolar.getZeropad();
-     ImageFile* pIF = new ImageFile (m_iDefaultPolarNX, m_iDefaultPolarNY);
--    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str());
-+    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.mb_str(wxConvUTF8));
-     if (! rProj.convertFFTPolar (*pIF, m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad)) {
-       delete pIF;
--      *theApp->getLog() << "Error converting to polar\n";
-+      *theApp->getLog() << _T("Error converting to polar\n");
-       return;
-     }
- #ifdef HAVE_FFT
-@@ -2849,10 +2859,10 @@
-     pPolarDoc->setImageFile (pIF);
-     pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime());
-     std::ostringstream os;
--    os << "Reconstruct Fourier " << GetFrame()->GetTitle().c_str() << ": xSize="
-+    os << "Reconstruct Fourier " << getFrame()->GetTitle().mb_str(wxConvUTF8) << ": xSize="
-       << m_iDefaultPolarNX << ", ySize=" << m_iDefaultPolarNY << ", interpolation="
--      << strInterpolation.c_str() << ", zeropad=" << m_iDefaultPolarZeropad;
--    *theApp->getLog() << os.str().c_str() << "\n";
-+      << strInterpolation.mb_str(wxConvUTF8) << ", zeropad=" << m_iDefaultPolarZeropad;
-+    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-     pIF->labelAdd (os.str().c_str());
-     if (theApp->getAskDeleteNewDocs())
-       pPolarDoc->Modify (true);
-@@ -2896,19 +2906,19 @@
-   m_iDefaultNX = dialogReconstruction.getXSize();
-   m_iDefaultNY = dialogReconstruction.getYSize();
--  wxString optFilterName = dialogReconstruction.getFilterName();
--  m_iDefaultFilter = SignalFilter::convertFilterNameToID (optFilterName.c_str());
-+  wxString optFilterName (dialogReconstruction.getFilterName(), wxConvUTF8);
-+  m_iDefaultFilter = SignalFilter::convertFilterNameToID (optFilterName.mb_str(wxConvUTF8));
-   m_dDefaultFilterParam = dialogReconstruction.getFilterParam();
--  wxString optFilterMethodName = dialogReconstruction.getFilterMethodName();
--  m_iDefaultFilterMethod = ProcessSignal::convertFilterMethodNameToID(optFilterMethodName.c_str());
-+  wxString optFilterMethodName (dialogReconstruction.getFilterMethodName(), wxConvUTF8);
-+  m_iDefaultFilterMethod = ProcessSignal::convertFilterMethodNameToID(optFilterMethodName.mb_str(wxConvUTF8));
-   m_iDefaultZeropad = dialogReconstruction.getZeropad();
--  wxString optFilterGenerationName = dialogReconstruction.getFilterGenerationName();
--  m_iDefaultFilterGeneration = ProcessSignal::convertFilterGenerationNameToID (optFilterGenerationName.c_str());
--  wxString optInterpName = dialogReconstruction.getInterpName();
--  m_iDefaultInterpolation = Backprojector::convertInterpNameToID (optInterpName.c_str());
-+  wxString optFilterGenerationName (dialogReconstruction.getFilterGenerationName(), wxConvUTF8);
-+  m_iDefaultFilterGeneration = ProcessSignal::convertFilterGenerationNameToID (optFilterGenerationName.mb_str(wxConvUTF8));
-+  wxString optInterpName (dialogReconstruction.getInterpName(), wxConvUTF8);
-+  m_iDefaultInterpolation = Backprojector::convertInterpNameToID (optInterpName.mb_str(wxConvUTF8));
-   m_iDefaultInterpParam = dialogReconstruction.getInterpParam();
--  wxString optBackprojectName = dialogReconstruction.getBackprojectName();
--  m_iDefaultBackprojector = Backprojector::convertBackprojectNameToID (optBackprojectName.c_str());
-+  wxString optBackprojectName (dialogReconstruction.getBackprojectName(), wxConvUTF8);
-+  m_iDefaultBackprojector = Backprojector::convertBackprojectNameToID (optBackprojectName.mb_str(wxConvUTF8));
-   m_iDefaultTrace = dialogReconstruction.getTrace();
-   dialogReconstruction.getROI (&defaultROI);
-@@ -2916,7 +2926,7 @@
-     return;
-   std::ostringstream os;
--  os << "Reconstruct " << rProj.getFilename() << ": xSize=" << m_iDefaultNX << ", ySize=" << m_iDefaultNY << ", Filter=" << optFilterName.c_str() << ", FilterParam=" << m_dDefaultFilterParam << ", FilterMethod=" << optFilterMethodName.c_str() << ", FilterGeneration=" << optFilterGenerationName.c_str() << ", Zeropad=" << m_iDefaultZeropad << ", Interpolation=" << optInterpName.c_str() << ", InterpolationParam=" << m_iDefaultInterpParam << ", Backprojection=" << optBackprojectName.c_str();
-+  os << "Reconstruct " << rProj.getFilename() << ": xSize=" << m_iDefaultNX << ", ySize=" << m_iDefaultNY << ", Filter=" << optFilterName.mb_str(wxConvUTF8) << ", FilterParam=" << m_dDefaultFilterParam << ", FilterMethod=" << optFilterMethodName.mb_str(wxConvUTF8) << ", FilterGeneration=" << optFilterGenerationName.mb_str(wxConvUTF8) << ", Zeropad=" << m_iDefaultZeropad << ", Interpolation=" << optInterpName.mb_str(wxConvUTF8) << ", InterpolationParam=" << m_iDefaultInterpParam << ", Backprojection=" << optBackprojectName.mb_str(wxConvUTF8);
-   if (bRebinToParallel)
-     os << "; Interpolate to Parallel";
-@@ -2924,9 +2934,9 @@
-   ImageFile* pImageFile = NULL;
-   if (m_iDefaultTrace > Trace::TRACE_CONSOLE) {
-     pImageFile = new ImageFile (m_iDefaultNX, m_iDefaultNY);
--    Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(),
--      m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),
--      optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace,
-+    Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.mb_str(wxConvUTF8),
-+      m_dDefaultFilterParam, optFilterMethodName.mb_str(wxConvUTF8), m_iDefaultZeropad, optFilterGenerationName.mb_str(wxConvUTF8),
-+      optInterpName.mb_str(wxConvUTF8), m_iDefaultInterpParam, optBackprojectName.mb_str(wxConvUTF8), m_iDefaultTrace,
-       &defaultROI, bRebinToParallel);
-     ReconstructDialog* pDlgReconstruct = new ReconstructDialog (*pReconstructor, rProj, *pImageFile, m_iDefaultTrace, getFrameForChild());
-@@ -2941,7 +2951,7 @@
-       ::wxYield();
-       while (pDlgReconstruct->isPaused()) {
-         ::wxYield();
--        ::wxUsleep(50);
-+        ::wxMilliSleep(50);
-       }
-     }
-     pReconstructor->postProcessing();
-@@ -2950,10 +2960,13 @@
-   } else {
- #if HAVE_WXTHREADS
-     if (theApp->getUseBackgroundTasks()) {
--      ReconstructorSupervisorThread* pReconstructor = new ReconstructorSupervisorThread (this, m_iDefaultNX,
--        m_iDefaultNY, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(),
--        m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam,
--        optBackprojectName.c_str(), os.str().c_str(), &defaultROI, bRebinToParallel);
-+      ReconstructorSupervisorThread* pReconstructor = new ReconstructorSupervisorThread
-+        (this, m_iDefaultNX, m_iDefaultNY, optFilterName.mb_str(wxConvUTF8), 
-+         m_dDefaultFilterParam, optFilterMethodName.mb_str(wxConvUTF8),
-+         m_iDefaultZeropad, optFilterGenerationName.mb_str(wxConvUTF8), 
-+         optInterpName.mb_str(wxConvUTF8), m_iDefaultInterpParam,
-+         optBackprojectName.mb_str(wxConvUTF8), 
-+         wxConvUTF8.cMB2WX(os.str().c_str()), &defaultROI, bRebinToParallel);
-       if (pReconstructor->Create() != wxTHREAD_NO_ERROR) {
-         sys_error (ERR_SEVERE, "Error creating reconstructor thread");
-         delete pReconstructor;
-@@ -2966,10 +2979,10 @@
- #endif
-     {
-       pImageFile = new ImageFile (m_iDefaultNX, m_iDefaultNY);
--      wxProgressDialog dlgProgress (wxString("Reconstruction"), wxString("Reconstruction Progress"), rProj.nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
--      Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(),
--        m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),
--        optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace,
-+      wxProgressDialog dlgProgress (_T("Reconstruction"), _T("Reconstruction Progress"), rProj.nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
-+      Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.mb_str(wxConvUTF8),
-+        m_dDefaultFilterParam, optFilterMethodName.mb_str(wxConvUTF8), m_iDefaultZeropad, optFilterGenerationName.mb_str(wxConvUTF8),
-+        optInterpName.mb_str(wxConvUTF8), m_iDefaultInterpParam, optBackprojectName.mb_str(wxConvUTF8), m_iDefaultTrace,
-         &defaultROI, bRebinToParallel);
-       for (int iView = 0; iView < rProj.nView(); iView++) {
-@@ -2989,7 +3002,7 @@
-     sys_error (ERR_SEVERE, "Unable to create image file");
-     return;
-   }
--  *theApp->getLog() << os.str().c_str() << "\n";
-+  *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
-   pImageFile->labelAdd (rProj.getLabel());
-   pImageFile->labelAdd (os.str().c_str(), timerRecon.timerEnd());
-@@ -3019,7 +3032,7 @@
-   pCanvas->SetScrollbars(20, 20, 50, 50);
-   pCanvas->SetBackgroundColour(*wxWHITE);
--  pCanvas->Clear();
-+  pCanvas->ClearBackground();
-   return pCanvas;
- }
-@@ -3032,69 +3045,69 @@
- ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view)
- {
- #ifdef CTSIM_MDI
--  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Projection Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #else
--  wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Projection Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #endif
-   theApp->setIconForFrame (subframe);
-   m_pFileMenu = new wxMenu;
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
--  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
--  m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
--  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
--  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
-+  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
-+  m_pFileMenu->Append(wxID_SAVE, _T("&Save\tCtrl-S"));
-+  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
-+  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(PJMENU_FILE_PROPERTIES, "P&roperties\tCtrl-I");
-+  m_pFileMenu->Append(PJMENU_FILE_PROPERTIES, _T("P&roperties\tCtrl-I"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(wxID_PRINT, "&Print...");
--  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
--  m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
-+  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
-+  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
-+  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Pre&view"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
-+  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
--  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
-+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
-+  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
-   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
-   GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
-   m_pConvertMenu = new wxMenu;
--  m_pConvertMenu->Append (PJMENU_CONVERT_RECTANGULAR, "&Rectangular Image");
--  m_pConvertMenu->Append (PJMENU_CONVERT_POLAR, "&Polar Image...\tCtrl-L");
--  m_pConvertMenu->Append (PJMENU_CONVERT_FFT_POLAR, "FF&T->Polar Image...\tCtrl-T");
-+  m_pConvertMenu->Append (PJMENU_CONVERT_RECTANGULAR, _T("&Rectangular Image"));
-+  m_pConvertMenu->Append (PJMENU_CONVERT_POLAR, _T("&Polar Image...\tCtrl-L"));
-+  m_pConvertMenu->Append (PJMENU_CONVERT_FFT_POLAR, _T("FF&T->Polar Image...\tCtrl-T"));
-   m_pConvertMenu->AppendSeparator();
--  m_pConvertMenu->Append (PJMENU_CONVERT_PARALLEL, "&Interpolate to Parallel");
-+  m_pConvertMenu->Append (PJMENU_CONVERT_PARALLEL, _T("&Interpolate to Parallel"));
-   //  wxMenu* filter_menu = new wxMenu;
--  //  filter_menu->Append (PJMENU_ARTIFACT_REDUCTION, "&Artifact Reduction");
-+  //  filter_menu->Append (PJMENU_ARTIFACT_REDUCTION, _T("&Artifact Reduction"));
-   wxMenu* analyze_menu = new wxMenu;
--  analyze_menu->Append (PJMENU_PLOT_HISTOGRAM, "&Plot Histogram");
--  analyze_menu->Append (PJMENU_PLOT_TTHETA_SAMPLING, "Plot T-T&heta Sampling...\tCtrl-H");
-+  analyze_menu->Append (PJMENU_PLOT_HISTOGRAM, _T("&Plot Histogram"));
-+  analyze_menu->Append (PJMENU_PLOT_TTHETA_SAMPLING, _T("Plot T-T&heta Sampling...\tCtrl-H"));
-   m_pReconstructMenu = new wxMenu;
--  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FBP, "&Filtered Backprojection...\tCtrl-R", "Reconstruct image using filtered backprojection");
--  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FBP_REBIN, "Filtered &Backprojection (Rebin to Parallel)...\tCtrl-B", "Reconstruct image using filtered backprojection");
--  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FOURIER, "&Inverse Fourier...\tCtrl-E", "Direct inverse Fourier");
-+  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FBP, _T("&Filtered Backprojection...\tCtrl-R"), _T("Reconstruct image using filtered backprojection"));
-+  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FBP_REBIN, _T("Filtered &Backprojection (Rebin to Parallel)...\tCtrl-B"), _T("Reconstruct image using filtered backprojection"));
-+  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FOURIER, _T("&Inverse Fourier...\tCtrl-E"), _T("Direct inverse Fourier"));
-   wxMenu *help_menu = new wxMenu;
--  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
--  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
--  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
--  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
-+  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
-+  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
-+  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
-+  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
-   wxMenuBar *menu_bar = new wxMenuBar;
--  menu_bar->Append (m_pFileMenu, "&File");
--  menu_bar->Append (m_pConvertMenu, "&Convert");
--  //  menu_bar->Append (filter_menu, "Fi&lter");
--  menu_bar->Append (analyze_menu, "&Analyze");
--  menu_bar->Append (m_pReconstructMenu, "&Reconstruct");
--  menu_bar->Append (help_menu, "&Help");
-+  menu_bar->Append (m_pFileMenu, _T("&File"));
-+  menu_bar->Append (m_pConvertMenu, _T("&Convert"));
-+  //  menu_bar->Append (filter_menu, _T("Fi&lter"));
-+  menu_bar->Append (analyze_menu, _T("&Analyze"));
-+  menu_bar->Append (m_pReconstructMenu, _T("&Reconstruct"));
-+  menu_bar->Append (help_menu, _T("&Help"));
-   subframe->SetMenuBar(menu_bar);
-   subframe->Centre(wxBOTH);
-@@ -3122,7 +3135,7 @@
-   m_pCanvas = CreateCanvas (m_pFrame);
-   m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
-   m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
--  m_pFrame->SetTitle ("ProjectionFileView");
-+  m_pFrame->SetTitle (_T("ProjectionFileView"));
-   m_pFrame->Show(true);
-   Activate(true);
-@@ -3215,7 +3228,7 @@
- bool
- ProjectionFileView::OnClose (bool deleteWindow)
- {
--  //GetDocumentManager()->ActivateView (this, false, true);
-+  //GetDocumentManager()->ActivateView (this, false);
-   if (! GetDocument() || ! GetDocument()->Close())
-     return false;
-@@ -3290,7 +3303,7 @@
-     delete m_pEZPlot;
-   GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
--  GetDocumentManager()->ActivateView(this, FALSE, TRUE);
-+  GetDocumentManager()->ActivateView(this, FALSE);
- }
- void
-@@ -3300,8 +3313,9 @@
-   std::ostringstream os;
-   os << "Columns: " << rPlot.getNumColumns() << ", Records: " << rPlot.getNumRecords() << "\n";
-   rPlot.printHeadersBrief (os);
--  *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<<\n";
--  wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), "Plot File Properties", wxOK | wxICON_INFORMATION);
-+  *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<<\n");
-+  wxMessageDialog dialogMsg (getFrameForChild(), wxConvUTF8.cMB2WX(os.str().c_str()), _T("Plot File Properties"), 
-+                             wxOK | wxICON_INFORMATION);
-   dialogMsg.ShowModal();
-   GetDocument()->Activate();
- }
-@@ -3338,7 +3352,7 @@
-   if (! m_bMinSpecified || ! m_bMaxSpecified) {
-     if (! rPlotFile.getMinMax (1, min, max)) {
--      *theApp->getLog() << "Error: unable to find Min/Max\n";
-+      *theApp->getLog() << _T("Error: unable to find Min/Max\n");
-       return;
-     }
-   }
-@@ -3348,7 +3362,7 @@
-   if (m_bMaxSpecified)
-     max = m_dMaxPixel;
--  DialogGetMinMax dialogMinMax (getFrameForChild(), "Set Y-axis Minimum & Maximum", min, max);
-+  DialogGetMinMax dialogMinMax (getFrameForChild(), _T("Set Y-axis Minimum & Maximum"), min, max);
-   int retVal = dialogMinMax.ShowModal();
-   if (retVal == wxID_OK) {
-     m_bMinSpecified = true;
-@@ -3379,7 +3393,7 @@
-   pCanvas = new PlotFileCanvas (this, parent, wxPoint(-1,-1), wxSize(-1,-1), 0);
-   pCanvas->SetBackgroundColour(*wxWHITE);
--  pCanvas->Clear();
-+  pCanvas->ClearBackground();
-   return pCanvas;
- }
-@@ -3392,52 +3406,52 @@
- PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view)
- {
- #ifdef CTSIM_MDI
--  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Plot Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #else
--  wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
-+  wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, _T("Plot Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
- #endif
-   theApp->setIconForFrame (subframe);
-   m_pFileMenu = new wxMenu;
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
--  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
--  m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
--  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
--  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
-+  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
-+  m_pFileMenu->Append(wxID_SAVE, _T("&Save\tCtrl-S"));
-+  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
-+  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(PLOTMENU_FILE_PROPERTIES, "P&roperties\tCtrl-I");
-+  m_pFileMenu->Append(PLOTMENU_FILE_PROPERTIES, _T("P&roperties\tCtrl-I"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(wxID_PRINT, "&Print...");
--  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
--  m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
-+  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
-+  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
-+  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Pre&view"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
-+  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
--  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
-+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
-+  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
-   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
-   GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
-   wxMenu *view_menu = new wxMenu;
--  view_menu->Append(PLOTMENU_VIEW_SCALE_MINMAX, "Display Scale &Set...\tCtrl-E");
--  view_menu->Append(PLOTMENU_VIEW_SCALE_AUTO, "Display Scale &Auto...\tCtrl-A");
--  view_menu->Append(PLOTMENU_VIEW_SCALE_FULL, "Display &Full Scale\tCtrl-U");
-+  view_menu->Append(PLOTMENU_VIEW_SCALE_MINMAX, _T("Display Scale &Set...\tCtrl-E"));
-+  view_menu->Append(PLOTMENU_VIEW_SCALE_AUTO, _T("Display Scale &Auto...\tCtrl-A"));
-+  view_menu->Append(PLOTMENU_VIEW_SCALE_FULL, _T("Display &Full Scale\tCtrl-U"));
-   wxMenu *help_menu = new wxMenu;
--  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
--  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
--  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
--  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
-+  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
-+  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
-+  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
-+  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
-   wxMenuBar *menu_bar = new wxMenuBar;
--  menu_bar->Append(m_pFileMenu, "&File");
--  menu_bar->Append(view_menu, "&View");
--  menu_bar->Append(help_menu, "&Help");
-+  menu_bar->Append(m_pFileMenu, _T("&File"));
-+  menu_bar->Append(view_menu, _T("&View"));
-+  menu_bar->Append(help_menu, _T("&Help"));
-   subframe->SetMenuBar(menu_bar);
-   subframe->Centre(wxBOTH);
-@@ -3466,7 +3480,7 @@
-   m_pCanvas = CreateCanvas (m_pFrame);
-   m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
-   m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
--  m_pFrame->SetTitle ("Plot File");
-+  m_pFrame->SetTitle (_T("Plot File"));
-   m_pFrame->Show(true);
-   Activate(true);
-@@ -3593,7 +3607,7 @@
- TextFileView::~TextFileView()
- {
-   GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
--  GetDocumentManager()->ActivateView(this, FALSE, TRUE);;
-+  GetDocumentManager()->ActivateView(this, FALSE);;
- }
- bool TextFileView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
-@@ -3603,9 +3617,9 @@
-   int width, height;
-   m_pFrame->GetClientSize(&width, &height);
--  m_pFrame->SetTitle("TextFile");
-+  m_pFrame->SetTitle(_T("TextFile"));
-   m_pCanvas = new TextFileCanvas (this, m_pFrame, wxPoint(-1,-1), wxSize(width, height), wxTE_MULTILINE | wxTE_READONLY);
--  m_pFrame->SetTitle("Log");
-+  m_pFrame->SetTitle(_T("Log"));
-   m_pFrame->Show (true);
-   Activate (true);
-@@ -3629,7 +3643,7 @@
-     return false;
-   Activate(false);
--  //GetDocumentManager()->ActivateView (this, false, true);
-+  //GetDocumentManager()->ActivateView (this, false);
-   if (! GetDocument() || ! GetDocument()->Close())
-     return false;
-@@ -3652,43 +3666,43 @@
- TextFileView::CreateChildFrame (wxDocument *doc, wxView *view)
- {
- #if CTSIM_MDI
--  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "TextFile Frame", wxPoint(-1, -1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE, "Log");
-+  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("TextFile Frame"), wxPoint(-1, -1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE, _T("Log"));
- #else
--  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "TextFile Frame", wxPoint(-1, -1), wxSize(300, 150), wxDEFAULT_FRAME_STYLE, "Log");
-+  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("TextFile Frame"), wxPoint(-1, -1), wxSize(300, 150), wxDEFAULT_FRAME_STYLE, _T("Log"));
- #endif
-   theApp->setIconForFrame (subframe);
-   m_pFileMenu = new wxMenu;
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
--  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
--  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
--  m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
--  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
--  //  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
-+  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
-+  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
-+  m_pFileMenu->Append(wxID_SAVE, _T("&Save\tCtrl-S"));
-+  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
-+  //  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(wxID_PRINT, "&Print...");
--  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
--  m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
-+  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
-+  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
-+  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Pre&view"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
-+  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
-   m_pFileMenu->AppendSeparator();
--  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
--  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
-+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
-+  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
-   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
-   GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
-   wxMenu *help_menu = new wxMenu;
--  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
--  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
--  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
--  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
-+  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
-+  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
-+  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
-+  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
-   wxMenuBar *menu_bar = new wxMenuBar;
--  menu_bar->Append(m_pFileMenu, "&File");
--  menu_bar->Append(help_menu, "&Help");
-+  menu_bar->Append(m_pFileMenu, _T("&File"));
-+  menu_bar->Append(help_menu, _T("&Help"));
-   subframe->SetMenuBar(menu_bar);
-   subframe->Centre(wxBOTH);
-@@ -3699,7 +3713,7 @@
- // Define a constructor for my text subwindow
- TextFileCanvas::TextFileCanvas (TextFileView* v, wxFrame* frame, const wxPoint& pos, const wxSize& size, long style)
--: wxTextCtrl (frame, -1, "", pos, size, style), m_pView(v)
-+  : wxTextCtrl (frame, -1, _T(""), pos, size, style), m_pView(v)
- {
- }
-diff -wur --exclude=debian --exclude='configure*' --exclude=aclocal.m4 --exclude='config.*' --exclude=.git --exclude='Makefile*' ctsim/src/views.h ctsim-wx2.8/src/views.h
---- ctsim/src/views.h  2007-09-04 00:40:08.000000000 -0600
-+++ ctsim-wx2.8/src/views.h    2008-07-29 20:22:04.805299915 -0600
-@@ -67,7 +67,7 @@
-   int m_iDefaultExportFormatID;
--  wxWindow* getFrameForChild()
-+  wxFrame* getFrameForChild()
- #if CTSIM_MDI
-   { return theApp->getMainFrame(); }
- #else