Applied initial patches for wx2.8 compatibility
[ctsim.git] / initial-wx2.8-mods.diff
1 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
2 --- ctsim/libctgraphics/sgp.cpp 2007-09-04 00:40:08.000000000 -0600
3 +++ ctsim-wx2.8/libctgraphics/sgp.cpp   2008-07-21 10:08:10.840312064 -0600
4 @@ -570,9 +570,8 @@
5  {
6  #if HAVE_WXWINDOWS
7    if (m_driver.isWX()) {
8 -    wxString sText (szText);
9      wxCoord deviceW, deviceH;
10 -    m_driver.idWX()->GetTextExtent (sText, &deviceW, &deviceH);
11 +    m_driver.idWX()->GetTextExtent (wxConvCurrent->cMB2WC(szText), &deviceW, &deviceH);
12      if (m_dTextAngle == 90 || m_dTextAngle == -90) {
13        wxCoord temp = deviceW;
14        deviceW = deviceH;
15 @@ -722,8 +721,7 @@
16  #endif
17  #if HAVE_WXWINDOWS
18    if (m_driver.isWX()) {
19 -    wxString str (pszMessage);
20 -    m_driver.idWX()->DrawRotatedText (str, m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle);
21 +    m_driver.idWX()->DrawRotatedText (wxConvCurrent->cMB2WC(pszMessage), m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle);
22    }
23  #endif
24  }
25 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
26 --- ctsim/libctsupport/syserror.cpp     2007-09-04 00:40:08.000000000 -0600
27 +++ ctsim-wx2.8/libctsupport/syserror.cpp       2008-07-21 10:08:10.852312800 -0600
28 @@ -57,15 +57,15 @@
29    if (g_bRunningWXWindows) {
30      if (theApp) {
31        wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
32 -      wxString msg (strOutput.c_str());
33 +      wxString msg (wxConvCurrent->cMB2WX(strOutput.c_str()));
34        if (msg.length() > 0) {
35 -        msg += "\n";
36 +        msg += wxChar('\n');
37          eventLog.SetString( msg );
38          wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event, thread safe
39        }
40      } else {
41        wxMutexGuiEnter();
42 -      wxLog::OnLog (wxLOG_Message, strOutput.c_str(), time(NULL));
43 +      wxLog::OnLog (wxLOG_Message, wxConvCurrent->cMB2WX(strOutput.c_str()), time(NULL));
44        wxMutexGuiLeave();
45      }
46    }
47 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
48 --- ctsim/src/backgroundmgr.cpp 2007-09-04 00:40:08.000000000 -0600
49 +++ ctsim-wx2.8/src/backgroundmgr.cpp   2008-07-21 10:08:10.864313536 -0600
50 @@ -108,7 +108,7 @@
51  BackgroundManager::OnAddTask (wxCommandEvent& event)
52  {
53    int iNumUnits = event.GetInt();
54 -  const char* const pszTaskName = event.GetString().c_str();
55 +  const char* const pszTaskName = event.GetString().mb_str(wxConvUTF8);
56    BackgroundSupervisor* pSupervisor = reinterpret_cast<BackgroundSupervisor*>(event.GetClientData());
57    if (pSupervisor == NULL) {
58      sys_error (ERR_SEVERE, "Received NULL supervisor [BackgroundManager::OnAddTask]");
59 @@ -139,7 +139,7 @@
60    wxPoint posLabel (m_sizeBorder.x + m_sizeGauge.x, m_sizeBorder.y + iFirstUnusedPos * m_sizeCell.y);
61    wxPoint posButton (m_sizeBorder.x + m_sizeGauge.x + m_sizeLabel.x, m_sizeBorder.y + iFirstUnusedPos * m_sizeCell.y);
62    wxGauge* pGauge = new wxGauge (m_pCanvas, -1, iNumUnits, posGauge, m_sizeGauge);
63 -  wxStaticText* pLabel = new wxStaticText (m_pCanvas, -1, pszTaskName, posLabel, m_sizeLabel);
64 +  wxStaticText* pLabel = new wxStaticText (m_pCanvas, -1, wxConvUTF8.cMB2WX(pszTaskName), posLabel, m_sizeLabel);
65    wxButton* pButton = new wxButton (m_pCanvas, s_iNextButtonID, _T("Cancel"), posButton, m_sizeButton, wxBU_LEFT);
66  
67    BackgroundManagerTask* pTask = new BackgroundManagerTask (pSupervisor, pszTaskName,
68 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
69 --- ctsim/src/backgroundsupr.cpp        2007-09-04 00:40:08.000000000 -0600
70 +++ ctsim-wx2.8/src/backgroundsupr.cpp  2008-07-29 20:10:53.735726313 -0600
71 @@ -57,7 +57,7 @@
72  
73  
74  
75 -BackgroundSupervisor::BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, const char* const pszProcessTitle, int iTotalUnits)
76 +BackgroundSupervisor::BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, wxChar const* pszProcessTitle, int iTotalUnits)
77      : wxEvtHandler(), m_pMyThread(pMyThread), m_pParentFrame(pParentFrame), m_pDocument(pDocument), m_strProcessTitle(pszProcessTitle),
78      m_iTotalUnits(iTotalUnits), m_iNumThreads(0), m_bDone(false), m_bFail(false), m_bCancelled(false), m_iRunning(0),
79      m_pTimer(NULL), m_bWorkersDeleted(false), m_bBackgroundManagerAdded(false)
80 @@ -120,12 +120,12 @@
81      m_vecpThreads[iThread] = createWorker (iThread, iStartUnit, iNumUnits);
82      if (! m_vecpThreads[iThread]) {
83        m_bFail = true;
84 -      m_strFailMessage = "createWorker returned NULL [BackgroundSupervisor]";
85 +      m_strFailMessage = _T("createWorker returned NULL [BackgroundSupervisor]");
86        break;
87      }
88      if (m_vecpThreads[iThread]->Create () != wxTHREAD_NO_ERROR) {
89        m_bFail = true;
90 -      m_strFailMessage = "Thread creation failed [BackgroundSupervisor]";
91 +      m_strFailMessage = _T("Thread creation failed [BackgroundSupervisor]");
92        break;
93      }
94     m_vecpThreads[iThread]->SetPriority (40);
95 @@ -136,13 +136,13 @@
96  
97    m_pTimer = new Timer;
98  
99 -  std::string strLabel (m_strProcessTitle);
100 -  strLabel += " ";
101 -  strLabel += m_pParentFrame->GetTitle();
102 +  wxString strLabel (m_strProcessTitle);
103 +  strLabel += _T(" ");
104 +  strLabel += dynamic_cast<wxFrame*>(m_pParentFrame)->GetTitle();
105  
106  #ifdef USE_BKGMGR
107    wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_ADD);
108 -  addTaskEvent.SetString (strLabel.c_str());
109 +  addTaskEvent.SetString (strLabel);
110    addTaskEvent.SetInt (m_iTotalUnits);
111    addTaskEvent.SetClientData (this);
112    wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
113 @@ -192,7 +192,7 @@
114  #ifdef DEBUG
115    if (theApp->getVerboseLogging()) {
116      wxString msg;
117 -    msg.Printf("Background Supervisor: Thread finished. Remaining threads: %d\n", m_iRunning);
118 +    msg.Printf(_T("Background Supervisor: Thread finished. Remaining threads: %d\n"), m_iRunning);
119      wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
120      eventLog.SetString( msg );
121      wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
122 @@ -203,11 +203,11 @@
123  }
124  
125  void
126 -BackgroundSupervisor::onWorkerFail (int iThread, std::string strFailMessage)
127 +BackgroundSupervisor::onWorkerFail (int iThread, const wxString& strFailMessage)
128  {
129    m_iRunning--;
130    wxCommandEvent eventLog( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
131 -  eventLog.SetString( strFailMessage.c_str() );
132 +  eventLog.SetString( strFailMessage );
133    wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
134  
135    onCancel();
136 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
137 --- ctsim/src/backgroundsupr.h  2007-09-04 00:40:08.000000000 -0600
138 +++ ctsim-wx2.8/src/backgroundsupr.h    2008-07-29 20:09:41.539253901 -0600
139 @@ -57,13 +57,13 @@
140    SupervisorThread* m_pMyThread;
141    wxWindow* m_pParentFrame;
142    BackgroundProcessingDocument* m_pDocument;
143 -  const std::string m_strProcessTitle;
144 +  const wxString m_strProcessTitle;
145  
146    const unsigned int m_iTotalUnits;
147    int m_iNumThreads;
148    volatile bool m_bDone;
149    volatile bool m_bFail;
150 -  std::string m_strFailMessage;
151 +  wxString m_strFailMessage;
152    volatile bool m_bCancelled;
153    volatile int m_iRunning;
154    volatile unsigned int m_iUnitsDone;
155 @@ -88,7 +88,7 @@
156      MSG_WORKER_THREAD_FAIL = 7507,   // sent by workers when they fail
157    };
158  
159 -  BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, const char* const pszProcessTitle,
160 +  BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, wxChar const* pszProcessTitle,
161      int iTotalUnits);
162  
163    BackgroundSupervisor ()
164 @@ -105,7 +105,7 @@
165  
166    virtual void onCancel();
167  
168 -  virtual void onWorkerFail(int iThread, std::string strFailMessage);
169 +  virtual void onWorkerFail(int iThread, const wxString& strFailMessage);
170    virtual void onWorkerUnitTick();
171    virtual void onWorkerDone(int iThread);
172  
173 @@ -116,7 +116,7 @@
174    bool isDone() const {return m_bDone;}
175    void setDone() { m_bDone = true; }
176    bool fail() const {return m_bFail;}
177 -  const std::string& getFailMessage() const { return m_strFailMessage; }
178 +  const wxString& getFailMessage() const { return m_strFailMessage; }
179    bool cancelled() const {return m_bCancelled;}
180  
181    int getNumWorkers() const { return m_iNumThreads; }
182 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
183 --- ctsim/src/ctsim.cpp 2007-09-04 00:40:08.000000000 -0600
184 +++ ctsim-wx2.8/src/ctsim.cpp   2008-07-28 17:18:08.431794408 -0600
185 @@ -82,7 +82,8 @@
186  IMPLEMENT_APP(CTSimApp)
187  
188  CTSimApp::CTSimApp()
189 -:  m_bAdvancedOptions(false), m_bSetModifyNewDocs(true), m_bVerboseLogging(false), m_bShowStartupTips(true),
190 +: m_bAdvancedOptions(false), m_bSetModifyNewDocs(true), 
191 +  m_bVerboseLogging(false), m_bShowStartupTips(true),
192  m_iCurrentTip(0), m_bUseBackgroundTasks(false),
193  m_docManager(NULL), m_pFrame(NULL), m_pConfig(0), m_pLog(0), m_pLogDoc(0)
194  {
195 @@ -100,6 +101,8 @@
196  bool
197  CTSimApp::OnInit()
198  {
199 +  wxApp::OnInit();
200 +
201  #ifdef HAVE_SETPRIORITY
202    setpriority (PRIO_PROCESS, 0, 15);  // set to low scheduling priority
203  #endif
204 @@ -113,7 +116,18 @@
205  #ifdef __WXMAC__
206      int c = -1;
207  #else
208 -    int c = getopt_long (argc, argv, "", ctsimOptions, NULL);
209 +    char** cargv = new char* [argc];
210 +    for (int i = 0; i < argc; i++) {
211 +      const char* p = wxConvUTF8.cWX2MB(argv[i]);
212 +      cargv[i] = new char [strlen(p)+1];
213 +      strcpy(cargv[i], p);
214 +    }
215 +    int c = getopt_long (argc, cargv, "", ctsimOptions, NULL);
216 +    for (int i = 0; i < argc; i++) {
217 +      delete cargv[i];
218 +    }
219 +    delete cargv;
220 +    
221  #endif
222      if (c == -1)
223        break;
224 @@ -129,26 +143,28 @@
225        exit(0);
226      case O_HELP:
227      case '?':
228 -      usage (argv[0]);
229 +      usage (wxConvCurrent->cWX2MB(argv[0]));
230        exit (0);
231      case O_PRINT:
232        bPrintFiles = true;
233        break;
234      default:
235 -      usage (argv[0]);
236 +      usage (wxConvCurrent->cWX2MB(argv[0]));
237        exit (1);
238      }
239    }
240  
241    m_docManager = new wxDocManager (wxDEFAULT_DOCMAN_FLAGS, true);
242  
243 -  m_pDocTemplImage = new wxDocTemplate (m_docManager, "ImageFile", "*.if", "", "if", "ImageFile", "ImageView", CLASSINFO(ImageFileDocument), CLASSINFO(ImageFileView));
244 -  m_pDocTemplProjection = new wxDocTemplate (m_docManager, "ProjectionFile", "*.pj", "", "pj", "ProjectionFile", "ProjectionView", CLASSINFO(ProjectionFileDocument), CLASSINFO(ProjectionFileView));
245 -  m_pDocTemplPhantom = new wxDocTemplate (m_docManager, "PhantomFile", "*.phm", "", "phm", "PhantomFile", "PhantomView", CLASSINFO(PhantomFileDocument), CLASSINFO(PhantomFileView));
246 -  m_pDocTemplPlot = new wxDocTemplate (m_docManager, "PlotFile", "*.plt", "", "plt", "PlotFile", "PlotView", CLASSINFO(PlotFileDocument), CLASSINFO(PlotFileView));
247 -  m_pDocTemplText = new wxDocTemplate (m_docManager, "TextFile", "*.txt", "", "txt", "TextFile", "TextView", CLASSINFO(TextFileDocument), CLASSINFO(TextFileView), wxTEMPLATE_INVISIBLE);
248 +  m_pDocTemplImage = new wxDocTemplate (m_docManager, _T("ImageFile"), _T("*.if"), _T(""), _T("if"), _T("ImageFile"), _T("ImageView"), CLASSINFO(ImageFileDocument), CLASSINFO(ImageFileView));
249 +  m_pDocTemplProjection = new wxDocTemplate (m_docManager, _T("ProjectionFile"), _T("*.pj"), _T(""), _T("pj"), _T("ProjectionFile"), _T("ProjectionView"), CLASSINFO(ProjectionFileDocument), CLASSINFO(ProjectionFileView));
250 +  m_pDocTemplPhantom = new wxDocTemplate (m_docManager, _T("PhantomFile"), _T("*.phm"), _T(""), _T("phm"), _T("PhantomFile"), _T("PhantomView"), CLASSINFO(PhantomFileDocument), CLASSINFO(PhantomFileView));
251 +  m_pDocTemplPlot = new wxDocTemplate (m_docManager, _T("PlotFile"), _T("*.plt"), _T(""), _T("plt"), _T("PlotFile"), _T("PlotView"), CLASSINFO(PlotFileDocument), CLASSINFO(PlotFileView));
252 +  m_pDocTemplText = new wxDocTemplate (m_docManager, _T("TextFile"), _T("*.txt"), _T(""), _T("txt"), _T("TextFile"), _T("TextView"), CLASSINFO(TextFileDocument), CLASSINFO(TextFileView), wxTEMPLATE_INVISIBLE);
253  #if wxUSE_GLCANVAS
254 -  m_pDocTemplGraph3d = new wxDocTemplate (m_docManager, "Graph3dFile", "*.g3d", "", "g3d", "Graph3dFile", "Graph3dView", CLASSINFO(Graph3dFileDocument), CLASSINFO(Graph3dFileView), wxTEMPLATE_INVISIBLE);
255 +  m_pDocTemplGraph3d = new wxDocTemplate (m_docManager, _T("Graph3dFile"), _T("*.g3d"), _T(""), _T("g3d"),
256 +                                          _T("Graph3dFile"), _T("Graph3dView"), CLASSINFO(Graph3dFileDocument), 
257 +                                          CLASSINFO(Graph3dFileView), wxTEMPLATE_INVISIBLE);
258  #endif
259  
260  #if wxUSE_GIF
261 @@ -163,7 +179,7 @@
262    int xDisplay, yDisplay;
263    ::wxDisplaySize (&xDisplay, &yDisplay);
264  
265 -  m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, "CTSim", wxPoint(0, 0),
266 +  m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, _T("CTSim"), wxPoint(0, 0),
267  #ifdef CTSIM_MDI
268      wxSize(nearest<int>(xDisplay * .75), nearest<int>(yDisplay * .75)),
269  #else
270 @@ -193,29 +209,29 @@
271      m_pLogDoc->getView()->getFrame()->Show (true);
272    } else
273  #else
274 -    m_pLog = new wxTextCtrl (m_pFrame, -1, "Log Window\n", wxPoint(0, 0), wxSize(0,0), wxTE_MULTILINE | wxTE_READONLY);
275 +    m_pLog = new wxTextCtrl (m_pFrame, -1, _T("Log Window\n"), wxPoint(0, 0), wxSize(0,0), wxTE_MULTILINE | wxTE_READONLY);
276  #endif
277    wxLog::SetActiveTarget (new wxLogTextCtrl(m_pLog));
278  
279    wxString helpDir;
280 -  if (! m_pConfig->Read("HelpDir", &helpDir))
281 +  if (! m_pConfig->Read(_T("HelpDir"), &helpDir))
282      helpDir = ::wxGetCwd();
283  #ifdef CTSIM_WINHELP
284 -  if (! m_pFrame->getWinHelpController().Initialize(helpDir + "/ctsim"))
285 -    *m_pLog << "Cannot initialize the Windows Help system" << "\n";
286 +  if (! m_pFrame->getWinHelpController().Initialize(helpDir + _T("/ctsim")))
287 +    *m_pLog << _T("Cannot initialize the Windows Help system") << _T("\n");
288  #else
289  #ifdef DATADIR
290 -  wxString docDir (DATADIR);
291 +  wxString docDir (DATADIR, *wxConvCurrent);
292  #else
293    wxString docDir (::wxGetCwd());
294  #endif
295 -  wxString docFile = docDir + "ctsim.htb";
296 +  wxString docFile = docDir + _T("ctsim.htb");
297    if (! m_pFrame->getHtmlHelpController().AddBook(docFile) &&
298 -    ! m_pFrame->getHtmlHelpController().AddBook("/usr/share/ctsim/ctsim.htb") &&
299 -        ! m_pFrame->getHtmlHelpController().AddBook("/tmp/ctsim.htb"))
300 -        *m_pLog << "Cannot initialize the HTML Help system" << "\n";
301 +      ! m_pFrame->getHtmlHelpController().AddBook(_T("/usr/share/ctsim/ctsim.htb")) &&
302 +      ! m_pFrame->getHtmlHelpController().AddBook(_T("/tmp/ctsim.htb")))
303 +    *m_pLog << _T("Cannot initialize the HTML Help system") << _T("\n");
304    else {
305 -    if (::wxDirExists ("/tmp"))
306 +    if (::wxDirExists (_T("/tmp")))
307        m_pFrame->getHtmlHelpController().SetTempDir(_T("/tmp"));
308      m_pFrame->getHtmlHelpController().UseConfig (m_pConfig);
309    }
310 @@ -297,40 +313,40 @@
311  CTSimApp::openConfig()
312  {
313  #ifdef MSVC
314 -  m_pConfig = new wxConfig("ctsim", "Kevin Rosenberg", "", "", wxCONFIG_USE_LOCAL_FILE);
315 +  m_pConfig = new wxConfig(_T("ctsim"), _T("Kevin Rosenberg"), _T(""), _T(""), wxCONFIG_USE_LOCAL_FILE);
316  #else
317 -  m_pConfig = new wxConfig("ctsim", "Kevin Rosenberg", ".ctsim", "", wxCONFIG_USE_LOCAL_FILE);
318 +  m_pConfig = new wxConfig(_T("ctsim"), _T("Kevin Rosenberg"), _T(".ctsim"), _T(""), wxCONFIG_USE_LOCAL_FILE);
319  #endif
320  
321    wxConfigBase::Set(m_pConfig);
322 -  m_pConfig->Read ("AdvancedOptions", &m_bAdvancedOptions);
323 -  m_pConfig->Read ("SetModifyNewDocs", &m_bSetModifyNewDocs);
324 -  m_pConfig->Read ("VerboseLogging", &m_bVerboseLogging);
325 -  m_pConfig->Read ("StartupTips", &m_bShowStartupTips);
326 -  m_pConfig->Read ("CurrentTip", &m_iCurrentTip);
327 -  m_pConfig->Read ("UseBackgroundTasks", &m_bUseBackgroundTasks);
328 +  m_pConfig->Read (_T("AdvancedOptions"), &m_bAdvancedOptions);
329 +  m_pConfig->Read (_T("SetModifyNewDocs"), &m_bSetModifyNewDocs);
330 +  m_pConfig->Read (_T("VerboseLogging"), &m_bVerboseLogging);
331 +  m_pConfig->Read (_T("StartupTips"), &m_bShowStartupTips);
332 +  m_pConfig->Read (_T("CurrentTip"), &m_iCurrentTip);
333 +  m_pConfig->Read (_T("UseBackgroundTasks"), &m_bUseBackgroundTasks);
334  #ifdef HAVE_FFTW
335    wxString strFftwWisdom;
336 -  m_pConfig->Read ("FftwWisdom", strFftwWisdom);
337 +  m_pConfig->Read (_T("FftwWisdom"), strFftwWisdom);
338    if (strFftwWisdom.size() > 0)
339 -    fftw_import_wisdom_from_string (strFftwWisdom.c_str());
340 +    fftw_import_wisdom_from_string (strFftwWisdom.mb_str(wxConvUTF8));
341  #endif
342  }
343  
344  void
345  CTSimApp::closeConfig()
346  {
347 -  m_pConfig->Write ("AdvancedOptions", m_bAdvancedOptions);
348 -  m_pConfig->Write ("SetModifyNewDocs", m_bSetModifyNewDocs);
349 -  m_pConfig->Write ("VerboseLogging", m_bVerboseLogging);
350 -  m_pConfig->Write ("StartupTips", m_bShowStartupTips);
351 -  m_pConfig->Write ("CurrentTip", m_iCurrentTip);
352 -  m_pConfig->Write ("UseBackgroundTasks", m_bUseBackgroundTasks);
353 +  m_pConfig->Write (_T("AdvancedOptions"), m_bAdvancedOptions);
354 +  m_pConfig->Write (_T("SetModifyNewDocs"), m_bSetModifyNewDocs);
355 +  m_pConfig->Write (_T("VerboseLogging"), m_bVerboseLogging);
356 +  m_pConfig->Write (_T("StartupTips"), m_bShowStartupTips);
357 +  m_pConfig->Write (_T("CurrentTip"), m_iCurrentTip);
358 +  m_pConfig->Write (_T("UseBackgroundTasks"), m_bUseBackgroundTasks);
359  #ifdef HAVE_FFTW
360    const char* const pszWisdom = fftw_export_wisdom_to_string();
361 -  wxString strFftwWisdom (pszWisdom);
362 +  wxString strFftwWisdom (pszWisdom, *wxConvCurrent);
363    fftw_free ((void*) pszWisdom);
364 -  m_pConfig->Write ("FftwWisdom", strFftwWisdom);
365 +  m_pConfig->Write (_T("FftwWisdom"), strFftwWisdom);
366  #endif
367  
368    delete m_pConfig;
369 @@ -342,7 +358,7 @@
370  {
371    static int untitledNumber = 1;
372  
373 -  wxString filename ("Untitled");
374 +  wxString filename (_T("Untitled"));
375    filename << untitledNumber++;
376  
377    return (filename);
378 @@ -421,7 +437,7 @@
379  : wxDocMDIParentFrame(manager, NULL, id, title, pos, size, type, "MainFrame")
380  #else
381  MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long type)
382 -: wxDocParentFrame(manager, frame, id, title, pos, size, type, "MainFrame")
383 +: wxDocParentFrame(manager, frame, id, title, pos, size, type, _T("MainFrame"))
384  #endif
385  {
386    m_bShuttingDown = false;
387 @@ -429,14 +445,14 @@
388    //// Make a menubar
389    wxMenu *file_menu = new wxMenu;
390  
391 -  file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
392 -  file_menu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
393 -  file_menu->Append(wxID_OPEN, "&Open...\tCtrl-O");
394 +  file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
395 +  file_menu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
396 +  file_menu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
397  
398    file_menu->AppendSeparator();
399 -  file_menu->Append (MAINMENU_IMPORT, "&Import...\tCtrl-M");
400 -  file_menu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
401 -  file_menu->Append(MAINMENU_FILE_EXIT, "E&xit");
402 +  file_menu->Append (MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
403 +  file_menu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
404 +  file_menu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
405  
406    //  history of files visited
407    theApp->getDocManager()->FileHistoryAddFilesToMenu(file_menu);
408 @@ -448,21 +464,21 @@
409  #endif
410  
411    wxMenu* help_menu = new wxMenu;
412 -  help_menu->Append (MAINMENU_HELP_CONTENTS, "&Contents\tF1");
413 -  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
414 -  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
415 +  help_menu->Append (MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
416 +  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
417 +  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
418  #if defined(CTSIM_WINHELP) && (defined(DEBUG) || defined(_DEBUG))
419 -  help_menu->Append (MAINMENU_HELP_SECONDARY, "&Secondary Help");
420 +  help_menu->Append (MAINMENU_HELP_SECONDARY, _T("&Secondary Help"));
421  #endif
422 -  help_menu->Append (MAINMENU_HELP_ABOUT, "&About");
423 +  help_menu->Append (MAINMENU_HELP_ABOUT, _T("&About"));
424  
425    wxMenuBar* menu_bar = new wxMenuBar;
426  
427 -  menu_bar->Append(file_menu, "&File");
428 +  menu_bar->Append(file_menu, _T("&File"));
429  #ifndef CTSIM_MDI
430 -  menu_bar->Append(m_pWindowMenu, "&Window");
431 +  menu_bar->Append(m_pWindowMenu, _T("&Window"));
432  #endif
433 -  menu_bar->Append(help_menu, "&Help");
434 +  menu_bar->Append(help_menu, _T("&Help"));
435  
436    SetMenuBar(menu_bar);
437  
438 @@ -470,7 +486,7 @@
439  #ifndef CTSIM_MDI
440    int i;
441    for (i = 0; i < MAX_WINDOW_MENUITEMS; i++) {
442 -    m_apWindowMenuItems[i] = new wxMenuItem (m_pWindowMenu, MAINMENU_WINDOW_BASE+i, wxString("[EMPTY]"));
443 +    m_apWindowMenuItems[i] = new wxMenuItem (m_pWindowMenu, MAINMENU_WINDOW_BASE+i, _T("[EMPTY]"));
444      m_pWindowMenu->Append (m_apWindowMenuItems[i]);
445      m_pWindowMenu->Enable (MAINMENU_WINDOW_BASE+i, false);
446    }
447 @@ -552,11 +568,11 @@
448    DialogGetPhantom dialogPhantom (this, m_iDefaultPhantomID);
449    int dialogReturn = dialogPhantom.ShowModal();
450    if (dialogReturn == wxID_OK) {
451 -    wxString selection (dialogPhantom.getPhantom());
452 +    wxString selection (dialogPhantom.getPhantom(), *wxConvCurrent);
453      if (theApp->getVerboseLogging())
454 -      *theApp->getLog() << "Selected phantom " << selection.c_str() << "\n";
455 -    wxString filename = selection + ".phm";
456 -    m_iDefaultPhantomID = Phantom::convertNameToPhantomID (selection.c_str());
457 +      *theApp->getLog() << _T("Selected phantom ") << selection.c_str() << _T("\n");
458 +    wxString filename = selection + _T(".phm");
459 +    m_iDefaultPhantomID = Phantom::convertNameToPhantomID (selection.mb_str(wxConvUTF8));
460      theApp->getDocManager()->CreateDocument (filename, wxDOC_SILENT);
461    }
462  
463 @@ -568,23 +584,26 @@
464    DialogGetFilterParameters dialogFilter (this, m_iDefaultFilterXSize, m_iDefaultFilterYSize, m_iDefaultFilterID, m_dDefaultFilterParam, m_dDefaultFilterBandwidth, m_iDefaultFilterDomainID, m_dDefaultFilterInputScale, m_dDefaultFilterOutputScale);
465    int dialogReturn = dialogFilter.ShowModal();
466    if (dialogReturn == wxID_OK) {
467 -    wxString strFilter (dialogFilter.getFilterName());
468 -    wxString strDomain (dialogFilter.getDomainName());
469 -    m_iDefaultFilterID = SignalFilter::convertFilterNameToID (strFilter.c_str());
470 -    m_iDefaultFilterDomainID = SignalFilter::convertDomainNameToID (strDomain.c_str());
471 +    wxString strFilter (dialogFilter.getFilterName(), *wxConvCurrent);
472 +    wxString strDomain (dialogFilter.getDomainName(), *wxConvCurrent);
473 +    m_iDefaultFilterID = SignalFilter::convertFilterNameToID (strFilter.mb_str(wxConvUTF8));
474 +    m_iDefaultFilterDomainID = SignalFilter::convertDomainNameToID (strDomain.mb_str(wxConvUTF8));
475      m_iDefaultFilterXSize = dialogFilter.getXSize();
476      m_iDefaultFilterYSize = dialogFilter.getYSize();
477      m_dDefaultFilterBandwidth = dialogFilter.getBandwidth();
478      m_dDefaultFilterParam= dialogFilter.getFilterParam();
479      m_dDefaultFilterInputScale = dialogFilter.getInputScale();
480      m_dDefaultFilterOutputScale = dialogFilter.getOutputScale();
481 -    std::ostringstream os;
482 -    os << "Generate Filter=" << strFilter.c_str()
483 -      << ", size=(" << static_cast<int>(m_iDefaultFilterXSize) << "," << static_cast<int>(m_iDefaultFilterYSize)
484 -      << "), domain=" << strDomain.c_str() << ", filterParam=" << m_dDefaultFilterParam << ", bandwidth=" << m_dDefaultFilterBandwidth
485 -      << ", inputScale=" << m_dDefaultFilterInputScale << ", outputScale=" << m_dDefaultFilterOutputScale;
486 -    *theApp->getLog() << os.str().c_str() << "\n";
487 -    wxString filename = "untitled.if";
488 +    wxString os;
489 +    os << _T("Generate Filter=") << strFilter
490 +       << _T(", size=(") << static_cast<int>(m_iDefaultFilterXSize) << _T(",")
491 +       << static_cast<int>(m_iDefaultFilterYSize)
492 +       << _T("), domain=") << strDomain.c_str() << _T(", filterParam=")
493 +       << m_dDefaultFilterParam << _T(", bandwidth=") <<
494 +      m_dDefaultFilterBandwidth
495 +       << _T(", inputScale=") << m_dDefaultFilterInputScale << _T(", outputScale=") << m_dDefaultFilterOutputScale;
496 +    *theApp->getLog() << os << _T("\n");
497 +    wxString filename = _T("untitled.if");
498      ImageFileDocument* pFilterDoc = theApp->newImageDoc();
499      pFilterDoc->setBadFileOpen();
500      if (! pFilterDoc) {
501 @@ -593,8 +612,8 @@
502      }
503      ImageFile& rIF = pFilterDoc->getImageFile();
504      rIF.setArraySize (m_iDefaultFilterXSize, m_iDefaultFilterYSize);
505 -    rIF.filterResponse (strDomain.c_str(), m_dDefaultFilterBandwidth, strFilter.c_str(), m_dDefaultFilterParam, m_dDefaultFilterInputScale, m_dDefaultFilterOutputScale);
506 -    rIF.labelAdd (os.str().c_str());
507 +    rIF.filterResponse (strDomain.mb_str(wxConvUTF8), m_dDefaultFilterBandwidth, strFilter.mb_str(wxConvUTF8), m_dDefaultFilterParam, m_dDefaultFilterInputScale, m_dDefaultFilterOutputScale);
508 +    rIF.labelAdd (os.mb_str(wxConvUTF8));
509      if (theApp->getAskDeleteNewDocs())
510        pFilterDoc->Modify (true);
511      pFilterDoc->UpdateAllViews();
512 @@ -693,7 +712,7 @@
513  #ifdef CTSIM_WINHELP
514      m_winHelp.DisplayContents ();
515  #else
516 -    m_htmlHelp.Display ("Contents");
517 +    m_htmlHelp.Display (_T("Contents"));
518  #endif
519      break;
520  
521 @@ -724,7 +743,7 @@
522      wxDocument* pDoc = static_cast<wxDocument*>(pNode->GetData());
523      wxString strFilename = pDoc->GetFilename();
524      if (iPos < 10) {
525 -      strFilename += "\tCtrl-";
526 +      strFilename += _T("\tCtrl-");
527        strFilename += static_cast<char>('0' + iPos);
528      }
529      static_cast<wxMenuItemBase*>(m_apWindowMenuItems[iPos])->SetName (strFilename);
530 @@ -735,7 +754,7 @@
531    }
532    for (int i = iPos; i < MAX_WINDOW_MENUITEMS; i++) {
533      m_pWindowMenu->Enable (MAINMENU_WINDOW_BASE+i, false);
534 -    static_cast<wxMenuItemBase*>(m_apWindowMenuItems[i])->SetName (wxString("[EMPTY]"));
535 +    static_cast<wxMenuItemBase*>(m_apWindowMenuItems[i])->SetName (_T("[EMPTY]"));
536      m_apWindowMenuData[i] = NULL;
537    }
538  #endif
539 @@ -830,7 +849,7 @@
540      const wxSize& size = wxDefaultSize,
541      long style = wxSTATIC_BORDER,
542      const wxValidator& validator = wxDefaultValidator,
543 -    const wxString& name = "BitmapCtrl");
544 +                 const wxString& name = _T("BitmapCtrl"));
545  
546  
547    virtual ~BitmapControl();
548 @@ -891,14 +910,14 @@
549  };
550  
551  BitmapDialog::BitmapDialog (wxBitmap* pBitmap, char const* pszTitle)
552 -: wxDialog(theApp->getMainFrame(), -1, wxString(pszTitle), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE)
553 +  : wxDialog(theApp->getMainFrame(), -1, wxString(pszTitle,*wxConvCurrent), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE)
554  {
555    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
556  
557    pTopSizer->Add (new BitmapControl (pBitmap, this), 0, wxALIGN_CENTER | wxALL, 5);
558  
559    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
560 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Ok");
561 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Ok"));
562    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
563  
564    pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
565 @@ -916,7 +935,7 @@
566  void
567  MainFrame::OnPreferences (wxCommandEvent& WXUNUSED(event) )
568  {
569 -  DialogPreferences dlg (this, "CTSim Preferences", theApp->getAdvancedOptions(),
570 +  DialogPreferences dlg (this, _T("CTSim Preferences"), theApp->getAdvancedOptions(),
571      theApp->getAskDeleteNewDocs(), theApp->getVerboseLogging(), theApp->getStartupTips(),
572      theApp->getUseBackgroundTasks());
573    if (dlg.ShowModal() == wxID_OK) {
574 @@ -935,37 +954,43 @@
575    if (dialogImport.ShowModal() != wxID_OK)
576      return;
577  
578 -  wxString strFormatName (dialogImport.getFormatName ());
579 -  m_iDefaultImportFormat = ImageFile::convertImportFormatNameToID (strFormatName.c_str());
580 +  wxString strFormatName (dialogImport.getFormatName (), *wxConvCurrent);
581 +  m_iDefaultImportFormat = ImageFile::convertImportFormatNameToID (strFormatName.mb_str(wxConvUTF8));
582  
583    wxString strExt;
584    wxString strWildcard;
585    if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PPM) {
586 -    strExt = ".ppm";
587 -    strWildcard = "PPM Files (*.ppm)|*.ppm|PGM Files (*.pgm)|*.pgm";
588 +    strExt = _T(".ppm");
589 +    strWildcard = _T("PPM Files (*.ppm)|*.ppm|PGM Files (*.pgm)|*.pgm");
590    }
591  #ifdef HAVE_PNG
592    else if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PNG) {
593 -    strExt = ".png";
594 -    strWildcard = "PNG Files (*.png)|*.png";
595 +    strExt = _T(".png");
596 +    strWildcard = _T("PNG Files (*.png)|*.png");
597    }
598  #endif
599  #ifdef HAVE_CTN_DICOM
600    else if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_DICOM) {
601 -    strExt = "*.*";
602 -    strWildcard = "Dicom Files (*.*)|*.*";
603 +    strExt = _T("*.*");
604 +    strWildcard = _T("Dicom Files (*.*)|*.*");
605    }
606  #endif
607    else {
608      return;
609    }
610  
611 -  wxString strFilename = wxFileSelector (wxString("Import Filename"), wxString(""),
612 -    wxString(""), strExt, strWildcard, wxHIDE_READONLY | wxOPEN);
613 +#if WXWIN_COMPATIBILITY_2_4
614 +  wxString strFilename = wxFileSelector (wxString(wxConvUTF8.cMB2WX("Import Filename")), wxString(wxConvUTF8.cMB2WX("")),
615 +                                         wxString(wxConvUTF8.cMB2WX("")), strExt, strWildcard, wxHIDE_READONLY | wxOPEN);
616 +#else
617 +  wxString strFilename = wxFileSelector (wxString(wxConvUTF8.cMB2WX("Import Filename")), wxString(wxConvUTF8.cMB2WX("")),
618 +                                         wxString(wxConvUTF8.cMB2WX("")), strExt, strWildcard, wxOPEN);
619 +#endif
620 +
621    if (! strFilename.IsEmpty()) {
622      if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PPM || m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PNG) {
623        ImageFile* pIF = new ImageFile;
624 -      if (pIF->importImage (strFormatName.c_str(), strFilename.c_str())) {
625 +      if (pIF->importImage (strFormatName.mb_str(wxConvUTF8), strFilename.mb_str(wxConvUTF8))) {
626          ImageFileDocument* pIFDoc = theApp->newImageDoc();
627          pIFDoc->setImageFile(pIF);
628          pIFDoc->getView()->getFrame()->Show(true);
629 @@ -982,9 +1007,9 @@
630      }
631  #ifdef HAVE_CTN_DICOM
632      else if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_DICOM) {
633 -      DicomImporter dicomImport (strFilename.c_str());
634 +      DicomImporter dicomImport (strFilename.mb_str(wxConvUTF8));
635        if (dicomImport.fail()) {
636 -        ::wxMessageBox (dicomImport.failMessage().c_str(), "Import Error");
637 +        ::wxMessageBox (wxConvUTF8.cMB2WX(dicomImport.failMessage().c_str()), _T("Import Error"));
638        } else if (dicomImport.testImage()) {
639          ImageFileDocument* pIFDoc = theApp->newImageDoc();
640          ImageFile* pIF = dicomImport.getImageFile();
641 @@ -1011,7 +1036,7 @@
642          pProjDoc->getView()->setInitialClientSize();
643          pProjDoc->Activate();
644        } else
645 -        ::wxMessageBox ("Unrecognized DICOM file contents", "Import Error");
646 +        ::wxMessageBox (_T("Unrecognized DICOM file contents"), _T("Import Error"));
647      }
648  #endif
649      else
650 @@ -1024,38 +1049,38 @@
651  MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
652  {
653    wxString strOSDesc = ::wxGetOsDescription();
654 -  *theApp->getLog() << "Operating System: " << strOSDesc;
655 -  *theApp->getLog() << ", wxWindows: " << wxVERSION_STRING;
656 -#ifdef __TIMESTAMP__
657 -  *theApp->getLog() << ", Build Date: " << __TIMESTAMP__;
658 +  *theApp->getLog() << _T("Operating System: ") << strOSDesc;
659 +  *theApp->getLog() << _T(", wxWindows: ") << wxVERSION_STRING;
660 +#ifdef _TIMESTAMP__
661 +  *theApp->getLog() << _T(", Build Date: ") << wxConvUTF8.cMB2WX(_TIMESTAMP__);
662  #endif
663  #if defined(DEBUG)
664 -  *theApp->getLog() << ", Debug version";
665 +  *theApp->getLog() << _T(", Debug version");
666  #else
667 -  *theApp->getLog() << ", Release version";
668 +  *theApp->getLog() << _T(", Release version");
669  #endif
670  #ifdef VERSION
671 -    *theApp->getLog() << " " <<  VERSION;
672 +  *theApp->getLog() << _T(" ") <<  wxConvUTF8.cMB2WX(VERSION);
673  #elif defined(CTSIMVERSION)
674 -    *theApp->getLog() << " " <<  CTSIMVERSION;
675 +  *theApp->getLog() << _T(" ") <<  _T(CTSIMVERSION);
676  #endif
677 -  *theApp->getLog() << "\n";
678 +    *theApp->getLog() << _T("\n");
679  
680    wxBitmap bmp (splash);
681    if (bmp.Ok()) {
682      BitmapDialog dlg (&bmp, "About CTSim");
683      dlg.ShowModal();
684    } else {
685 -    wxString msg = "CTSim\nThe Open Source Computed Tomography Simulator\n";
686 +    wxString msg = _T("CTSim\nThe Open Source Computed Tomography Simulator\n");
687  #ifdef VERSION
688 -    msg << "Version: " <<  VERSION << "\n\n";
689 +    msg << _T("Version: ") <<  wxConvUTF8.cMB2WX(VERSION) << _T("\n\n");
690  #elif defined(CTSIMVERSION)
691 -    msg << "Version: " <<  CTSIMVERSION << "\n\n";
692 +    msg << _T("Version: ") <<  wxConvUTF8.cMB2WX(CTSIMVERSION) << _T("\n\n");
693  #endif
694 -    msg += "Author: Kevin Rosenberg <kevin@rosenberg.net>\nUsage: ctsim [files-to-open..] [--help]";
695 +    msg += _T("Author: Kevin Rosenberg <kevin@rosenberg.net>\nUsage: ctsim [files-to-open..] [--help]");
696  
697 -    wxMessageBox(msg, "About CTSim", wxOK | wxICON_INFORMATION, this);
698 -    *theApp->getLog() << msg << "\n";
699 +    wxMessageBox(msg, _T("About CTSim"), wxOK | wxICON_INFORMATION, this);
700 +    *theApp->getLog() << msg << wxConvUTF8.cMB2WX("\n");
701    }
702  }
703  
704 @@ -1065,7 +1090,7 @@
705  ProjectionFileDocument*
706  CTSimApp::newProjectionDoc()
707  {
708 -  ProjectionFileDocument* newDoc = dynamic_cast<ProjectionFileDocument*>(m_pDocTemplProjection->CreateDocument (""));
709 +  ProjectionFileDocument* newDoc = dynamic_cast<ProjectionFileDocument*>(m_pDocTemplProjection->CreateDocument (_T("")));
710    if (newDoc) {
711      newDoc->SetDocumentName (m_pDocTemplProjection->GetDocumentName());
712      newDoc->SetDocumentTemplate (m_pDocTemplProjection);
713 @@ -1078,7 +1103,7 @@
714  ImageFileDocument*
715  CTSimApp::newImageDoc()
716  {
717 -  ImageFileDocument* newDoc = dynamic_cast<ImageFileDocument*>(m_pDocTemplImage->CreateDocument (""));
718 +  ImageFileDocument* newDoc = dynamic_cast<ImageFileDocument*>(m_pDocTemplImage->CreateDocument (_T("")));
719    if (newDoc) {
720      newDoc->SetDocumentName (m_pDocTemplImage->GetDocumentName());
721      newDoc->SetDocumentTemplate (m_pDocTemplImage);
722 @@ -1091,7 +1116,7 @@
723  PlotFileDocument*
724  CTSimApp::newPlotDoc()
725  {
726 -  PlotFileDocument* newDoc = dynamic_cast<PlotFileDocument*>(m_pDocTemplPlot->CreateDocument (""));
727 +  PlotFileDocument* newDoc = dynamic_cast<PlotFileDocument*>(m_pDocTemplPlot->CreateDocument (_T("")));
728    if (newDoc) {
729      newDoc->SetDocumentName (m_pDocTemplPlot->GetDocumentName());
730      newDoc->SetDocumentTemplate (m_pDocTemplPlot);
731 @@ -1106,9 +1131,9 @@
732  CTSimApp::newTextDoc()
733  {
734    wxString strFilename (getUntitledFilename());
735 -  strFilename += ".txt";
736 +  strFilename += wxString(".txt", *wxConvCurrent);
737  
738 -  TextFileDocument* newDoc = dynamic_cast<TextFileDocument*>(m_pDocTemplText->CreateDocument (""));
739 +  TextFileDocument* newDoc = dynamic_cast<TextFileDocument*>(m_pDocTemplText->CreateDocument (_T("")));
740    if (newDoc) {
741      newDoc->SetDocumentName (m_pDocTemplText->GetDocumentName());
742      newDoc->SetDocumentTemplate (m_pDocTemplText);
743 @@ -1122,7 +1147,7 @@
744  PhantomFileDocument*
745  CTSimApp::newPhantomDoc()
746  {
747 -  PhantomFileDocument* newDoc = dynamic_cast<PhantomFileDocument*>(m_pDocTemplPhantom->CreateDocument (""));
748 +  PhantomFileDocument* newDoc = dynamic_cast<PhantomFileDocument*>(m_pDocTemplPhantom->CreateDocument (_T("")));
749    if (newDoc) {
750      newDoc->SetDocumentName (m_pDocTemplPhantom->GetDocumentName());
751      newDoc->SetDocumentTemplate (m_pDocTemplPhantom);
752 @@ -1137,7 +1162,7 @@
753  Graph3dFileDocument*
754  CTSimApp::newGraph3dDoc()
755  {
756 -  Graph3dFileDocument* newDoc = dynamic_cast<Graph3dFileDocument*>(m_pDocTemplGraph3d->CreateDocument (""));
757 +  Graph3dFileDocument* newDoc = dynamic_cast<Graph3dFileDocument*>(m_pDocTemplGraph3d->CreateDocument (_T("")));
758    if (newDoc) {
759      newDoc->SetDocumentName (m_pDocTemplGraph3d->GetDocumentName());
760      newDoc->SetDocumentTemplate (m_pDocTemplGraph3d);
761 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
762 --- ctsim/src/dialogs.cpp       2007-09-04 00:40:08.000000000 -0600
763 +++ ctsim-wx2.8/src/dialogs.cpp 2008-07-21 10:08:10.892315253 -0600
764 @@ -57,12 +57,14 @@
765  //    StringValueAndTitleListBox
766  ///////////////////////////////////////////////////////////////////////
767  
768 -StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* const aszTitle[], const char* const aszValue[])
769 +StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, 
770 +                                                        wxChar const* const* asTitle, 
771 +                                                        char const* const* aszValue)
772  : wxListBox ()
773  {
774    wxString* psTitle = new wxString [nChoices];
775    for (int i = 0; i < nChoices; i++)
776 -    psTitle[i] = aszTitle[i];
777 +    psTitle[i] = asTitle[i];
778  
779    Create (pParent, -1, wxDefaultPosition, wxSize(-1,-1), nChoices, psTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
780  
781 @@ -76,12 +78,16 @@
782    return m_ppszValues[GetSelection()];
783  }
784  
785 -StringValueAndTitleRadioBox::StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* const aszTitle[], const char* const aszValue[])
786 +StringValueAndTitleRadioBox::StringValueAndTitleRadioBox (wxDialog* pParent, 
787 +                                                          wxChar const* strTitle, 
788 +                                                          int nChoices, 
789 +                                                          char const* const* aszTitle, 
790 +                                                          char const* const* aszValue)
791  : wxRadioBox ()
792  {
793    wxString* psTitle = new wxString [nChoices];
794    for (int i = 0; i < nChoices; i++)
795 -    psTitle[i] = aszTitle[i];
796 +    psTitle[i] = wxConvUTF8.cMB2WX(aszTitle[i]);
797  
798    Create (pParent, -1, strTitle, wxDefaultPosition, wxDefaultSize, nChoices, psTitle, 1, wxRA_SPECIFY_COLS);
799  
800 @@ -89,6 +95,8 @@
801    delete [] psTitle;
802  };
803  
804 +
805 +
806  const char*
807  StringValueAndTitleRadioBox::getSelectionStringValue () const
808  {
809 @@ -105,7 +113,7 @@
810  {
811    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
812  
813 -  pTopSizer->Add (new wxStaticText (this, -1, "Select Phantom"), 0, wxCENTER | wxALL, 5);
814 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Select Phantom")), 0, wxCENTER | wxALL, 5);
815  
816    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
817  
818 @@ -116,9 +124,9 @@
819    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
820  
821    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
822 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
823 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
824    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
825 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
826 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
827    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
828    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PHANTOM);
829    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
830 @@ -149,11 +157,11 @@
831  {
832    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
833  
834 -  pTopSizer->Add (new wxStaticText (this, -1, "Select Theta Range"), 0, wxCENTER | wxALL, 5);
835 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Select Theta Range")), 0, wxCENTER | wxALL, 5);
836  
837    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
838  
839 -  wxString asTitle[] = {"Unconstrained", "Normalized to 2pi", "Fold to pi"};
840 +  wxString asTitle[] = {_T("Unconstrained"), _T("Normalized to 2pi"), _T("Fold to pi")};
841  
842    m_pRadioBoxThetaRange = new wxRadioBox (this, -1, _T("Theta Range"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS);
843    if (iDefaultThetaRange == ParallelRaysums::THETA_RANGE_UNCONSTRAINED)
844 @@ -168,9 +176,9 @@
845    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
846  
847    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
848 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
849 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
850    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
851 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
852 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
853    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
854    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_THETA_RANGE);
855    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
856 @@ -202,12 +210,13 @@
857  //    DialogGetComparisonImage
858  ///////////////////////////////////////////////////////////////////////
859  
860 -DialogGetComparisonImage::DialogGetComparisonImage (wxWindow* pParent, const char* const pszTitle, const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference)
861 -: wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_rVecIF(rVecIF)
862 +DialogGetComparisonImage::DialogGetComparisonImage (wxWindow* pParent, wxChar const* pwszTitle, 
863 +                                                    const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference)
864 +: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_rVecIF(rVecIF)
865  {
866    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
867  
868 -  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxALL, 5);
869 +  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxALL, 5);
870  
871    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
872  
873 @@ -226,7 +235,7 @@
874    pTopSizer->Add (m_pListBoxImageChoices, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
875  
876    if (bShowMakeDifference) {
877 -    m_pMakeDifferenceImage = new wxCheckBox (this, -1, "Make Difference Image");
878 +    m_pMakeDifferenceImage = new wxCheckBox (this, -1, _T("Make Difference Image"));
879      m_pMakeDifferenceImage->SetValue (FALSE);
880      pTopSizer->Add (m_pMakeDifferenceImage, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
881    } else
882 @@ -235,9 +244,9 @@
883    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
884  
885    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
886 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
887 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
888    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
889 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
890 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
891    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
892    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_COMPARISON);
893    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
894 @@ -271,34 +280,35 @@
895  // CLASS DiaglogPreferences Implementation
896  /////////////////////////////////////////////////////////////////////
897  
898 -DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTitle,
899 -                   bool bAdvancedOptions, bool bAskDeleteNewDocs, bool bVerboseLogging, bool bStartupTips, bool bUseBackgroundTasks)
900 -: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
901 +DialogPreferences::DialogPreferences (wxWindow* pParent, wxChar const* pwszTitle,
902 +                                      bool bAdvancedOptions, bool bAskDeleteNewDocs, bool bVerboseLogging, bool bStartupTips, 
903 +                                      bool bUseBackgroundTasks)
904 +: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
905  {
906    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
907  
908 -  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
909 +  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
910  
911    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
912  
913 -  m_pCBAdvancedOptions = new wxCheckBox (this, -1, "Advanced Options", wxDefaultPosition, wxSize(250, 25), 0);
914 +  m_pCBAdvancedOptions = new wxCheckBox (this, -1, _T("Advanced Options"), wxDefaultPosition, wxSize(250, 25), 0);
915    m_pCBAdvancedOptions->SetValue (bAdvancedOptions);
916    pTopSizer->Add (m_pCBAdvancedOptions, 0, wxALIGN_CENTER_VERTICAL);
917  
918 -  m_pCBAskDeleteNewDocs = new wxCheckBox (this, -1, "Ask \"Save New Documents\" Before Closing", wxDefaultPosition, wxSize(250, 25), 0);
919 +  m_pCBAskDeleteNewDocs = new wxCheckBox (this, -1, _T("Ask \"Save New Documents\" Before Closing"), wxDefaultPosition, wxSize(250, 25), 0);
920    m_pCBAskDeleteNewDocs->SetValue (bAskDeleteNewDocs);
921    pTopSizer->Add (m_pCBAskDeleteNewDocs, 0, wxALIGN_CENTER_VERTICAL);
922  
923 -  m_pCBVerboseLogging = new wxCheckBox (this, -1, "Verbose Logging", wxDefaultPosition, wxSize(250, 25), 0);
924 +  m_pCBVerboseLogging = new wxCheckBox (this, -1, _T("Verbose Logging"), wxDefaultPosition, wxSize(250, 25), 0);
925    m_pCBVerboseLogging->SetValue (bVerboseLogging);
926    pTopSizer->Add (m_pCBVerboseLogging, 0, wxALIGN_CENTER_VERTICAL);
927  
928 -  m_pCBStartupTips = new wxCheckBox (this, -1, "Show Tips at Start", wxDefaultPosition, wxSize(250, 25), 0);
929 +  m_pCBStartupTips = new wxCheckBox (this, -1, _T("Show Tips at Start"), wxDefaultPosition, wxSize(250, 25), 0);
930    m_pCBStartupTips->SetValue (bStartupTips);
931    pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL);
932  
933  #if HAVE_WXTHREADS && MSVC
934 -  m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
935 +  m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, _T("Put Tasks in Background"), wxDefaultPosition, wxSize(250, 25), 0);
936    m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
937    pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL);
938  #endif
939 @@ -306,9 +316,9 @@
940    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
941  
942    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
943 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
944 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
945    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
946 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
947 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
948    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
949    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PREFERENCES);
950    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
951 @@ -365,35 +375,35 @@
952  // CLASS DiaglogGetMinMax Implementation
953  /////////////////////////////////////////////////////////////////////
954  
955 -DialogGetMinMax::DialogGetMinMax (wxWindow* pParent, const char* const pszTitle, double dDefaultMin, double dDefaultMax)
956 -: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
957 +DialogGetMinMax::DialogGetMinMax (wxWindow* pParent, wxChar const* pwszTitle, double dDefaultMin, double dDefaultMax)
958 +: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
959  {
960    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
961  
962 -  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
963 +  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
964  
965    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
966  
967 -  std::ostringstream os;
968 -  os << dDefaultMin;
969 -  m_pTextCtrlMin = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
970 -  std::ostringstream osMax;
971 -  osMax << dDefaultMax;
972 -  m_pTextCtrlMax = new wxTextCtrl (this, -1, osMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
973 +  wxString sMin;
974 +  sMin << dDefaultMin;
975 +  m_pTextCtrlMin = new wxTextCtrl (this, -1, sMin, wxDefaultPosition, wxSize(100, 25), 0);
976 +  wxString sMax;
977 +  sMax << dDefaultMax;
978 +  m_pTextCtrlMax = new wxTextCtrl (this, -1, sMax, wxDefaultPosition, wxSize(100, 25), 0);
979  
980    wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
981 -  pGridSizer->Add (new wxStaticText (this, -1, "Minimum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
982 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Minimum")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
983    pGridSizer->Add (m_pTextCtrlMin, 0, wxALIGN_CENTER_VERTICAL);
984 -  pGridSizer->Add (new wxStaticText (this, -1, "Maximum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
985 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Maximum")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
986    pGridSizer->Add (m_pTextCtrlMax, 0, wxALIGN_CENTER_VERTICAL);
987    pTopSizer->Add (pGridSizer, 1, wxALL, 10);
988  
989    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
990  
991    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
992 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
993 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
994    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
995 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
996 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
997    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
998    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_MINMAX);
999    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1000 @@ -443,30 +453,30 @@
1001  {
1002    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1003  
1004 -  pTopSizer->Add (new wxStaticText (this, -1, "Auto Scale Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1005 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Auto Scale Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1006  
1007    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1008  
1009 -  wxString asTitle[] = {"Mode", "Median", "Mean"};
1010 +  wxString asTitle[] = {_T("Mode"), _T("Median"), _T("Mean")};
1011  
1012    m_pRadioBoxCenter = new wxRadioBox (this, -1, _T("Center"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS);
1013    m_pRadioBoxCenter->SetSelection (0);
1014    pTopSizer->Add (m_pRadioBoxCenter, 0, wxALL | wxALIGN_CENTER);
1015  
1016    wxGridSizer *pGridSizer = new wxGridSizer (2);
1017 -  pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1018 -  std::ostringstream osDefaultFactor;
1019 -  osDefaultFactor << dDefaultScaleFactor;
1020 -  m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, osDefaultFactor.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1021 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Standard Deviation Factor")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1022 +  wxString sDefaultFactor;
1023 +  sDefaultFactor << dDefaultScaleFactor;
1024 +  m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, sDefaultFactor, wxDefaultPosition, wxSize(100, 25), 0);
1025    pGridSizer->Add (m_pTextCtrlStdDevFactor, 0, wxALIGN_CENTER_VERTICAL);
1026    pTopSizer->Add (pGridSizer, 1, wxALL, 10);
1027  
1028    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1029  
1030    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1031 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1032 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1033    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1034 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1035 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1036    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1037    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_AUTOSCALE);
1038    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1039 @@ -493,13 +503,13 @@
1040    wxString sStddevFactor = m_pTextCtrlStdDevFactor->GetValue();
1041    double dValue;
1042    if (! sStddevFactor.ToDouble (&dValue)) {
1043 -    *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";
1044 +    *theApp->getLog() << _T("Error: Non-numeric Standard Deviation Factor of ") << sStddevFactor << _T("\n");
1045      return false;
1046    }
1047    double dHalfWidth = dValue * m_dStdDev / 2;
1048    *pMin = dCenter - dHalfWidth;
1049    *pMax = dCenter + dHalfWidth;
1050 -  *theApp->getLog() << "Setting minimum to " << *pMin << " and maximum to " << *pMax << "\n";
1051 +  *theApp->getLog() << _T("Setting minimum to ") << *pMin << _T(" and maximum to ") << *pMax << _T("\n");
1052  
1053    return true;
1054  }
1055 @@ -510,7 +520,7 @@
1056    wxString sStddevFactor = m_pTextCtrlStdDevFactor->GetValue();
1057    double dValue = 1.;
1058    if (! sStddevFactor.ToDouble (&dValue)) {
1059 -    *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";
1060 +    *theApp->getLog() << _T("Error: Non-numeric Standard Deviation Factor of ") << sStddevFactor << _T("\n");
1061    }
1062  
1063    return dValue;
1064 @@ -530,30 +540,30 @@
1065  {
1066    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1067  
1068 -  pTopSizer->Add (new wxStaticText (this, -1, "Rasterization Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1069 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Rasterization Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1070  
1071    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1072  
1073    wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
1074 -  std::ostringstream os;
1075 -  os << iDefaultXSize;
1076 -  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1077 -  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1078 +  wxString sXSize;
1079 +  sXSize << iDefaultXSize;
1080 +  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
1081 +  pGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1082    pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
1083 -  std::ostringstream osYSize;
1084 -  osYSize << iDefaultYSize;
1085 -  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1086 -  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1087 +  wxString sYSize;
1088 +  sYSize << iDefaultYSize;
1089 +  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
1090 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1091    pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
1092 -  std::ostringstream osViewRatio;
1093 -  osViewRatio << dDefaultViewRatio;
1094 -  m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1095 -  pGridSizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1096 +  wxString sViewRatio;
1097 +  sViewRatio << dDefaultViewRatio;
1098 +  m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, sViewRatio, wxDefaultPosition, wxSize(100, 25), 0);
1099 +  pGridSizer->Add (new wxStaticText (this, -1, _T("View Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1100    pGridSizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
1101 -  std::ostringstream osNSamples;
1102 -  osNSamples << iDefaultNSamples;
1103 -  m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1104 -  pGridSizer->Add (new wxStaticText (this, -1, "Samples per Pixel"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1105 +  wxString sNSamples;
1106 +  sNSamples << iDefaultNSamples;
1107 +  m_pTextCtrlNSamples = new wxTextCtrl (this, -1, sNSamples, wxDefaultPosition, wxSize(100, 25), 0);
1108 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Samples per Pixel")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1109    pGridSizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
1110  
1111    pTopSizer->Add (pGridSizer, 1, wxALL, 10);
1112 @@ -561,9 +571,9 @@
1113    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1114  
1115    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1116 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1117 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1118    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1119 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1120 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1121    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1122    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RASTERIZE);
1123    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1124 @@ -653,7 +663,7 @@
1125    m_iDefaultTrace = iDefaultTrace;
1126    m_iDefaultGeometry = iDefaultGeometry;
1127  
1128 -  pTopSizer->Add (new wxStaticText (this, -1, "Projection Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1129 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Projection Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1130  
1131    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1132  
1133 @@ -668,58 +678,58 @@
1134    pGridSizer->Add (m_pRadioBoxTrace, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
1135  
1136            wxFlexGridSizer* pText1Sizer = new wxFlexGridSizer(2);
1137 -  std::ostringstream os;
1138 -  os << iDefaultNDet;
1139 -  m_pTextCtrlNDet = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1140 -  pText1Sizer->Add (new wxStaticText (this, -1, "Detectors"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1141 +  wxString sNDet;
1142 +  sNDet << iDefaultNDet;
1143 +  m_pTextCtrlNDet = new wxTextCtrl (this, -1, sNDet, wxDefaultPosition, wxSize(100, 25), 0);
1144 +  pText1Sizer->Add (new wxStaticText (this, -1, _T("Detectors")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1145    pText1Sizer->Add (m_pTextCtrlNDet, 0, wxALIGN_CENTER_VERTICAL);
1146 -  std::ostringstream osNView;
1147 -  osNView << iDefaultNView;
1148 -  m_pTextCtrlNView = new wxTextCtrl (this, -1, osNView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1149 -  pText1Sizer->Add (new wxStaticText (this, -1, "Views"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1150 +  wxString sNView;
1151 +  sNView << iDefaultNView;
1152 +  m_pTextCtrlNView = new wxTextCtrl (this, -1, sNView, wxDefaultPosition, wxSize(100, 25), 0);
1153 +  pText1Sizer->Add (new wxStaticText (this, -1, _T("Views")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1154    pText1Sizer->Add (m_pTextCtrlNView, 0, wxALIGN_CENTER_VERTICAL);
1155 -  std::ostringstream osNSamples;
1156 -  osNSamples << iDefaultNSamples;
1157 -  m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1158 -  pText1Sizer->Add (new wxStaticText (this, -1, "Samples per Detector"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1159 +  wxString sNSamples;
1160 +  sNSamples << iDefaultNSamples;
1161 +  m_pTextCtrlNSamples = new wxTextCtrl (this, -1, sNSamples, wxDefaultPosition, wxSize(100, 25), 0);
1162 +  pText1Sizer->Add (new wxStaticText (this, -1, _T("Samples per Detector")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1163    pText1Sizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
1164  
1165    pGridSizer->Add (pText1Sizer);
1166  
1167    wxFlexGridSizer* pText2Sizer = new wxFlexGridSizer(2);
1168 -  std::ostringstream osViewRatio;
1169 -  osViewRatio << dDefaultViewRatio;
1170 -  m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1171 -  pText2Sizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1172 +  wxString sViewRatio;
1173 +  sViewRatio << dDefaultViewRatio;
1174 +  m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, sViewRatio, wxDefaultPosition, wxSize(100, 25), 0);
1175 +  pText2Sizer->Add (new wxStaticText (this, -1, _T("View Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1176    pText2Sizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
1177 -  std::ostringstream osScanRatio;
1178 -  osScanRatio << dDefaultScanRatio;
1179 -  m_pTextCtrlScanRatio = new wxTextCtrl (this, -1, osScanRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1180 -  pText2Sizer->Add (new wxStaticText (this, -1, "Scan Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1181 +  wxString sScanRatio;
1182 +  sScanRatio << dDefaultScanRatio;
1183 +  m_pTextCtrlScanRatio = new wxTextCtrl (this, -1, sScanRatio, wxDefaultPosition, wxSize(100, 25), 0);
1184 +  pText2Sizer->Add (new wxStaticText (this, -1, _T("Scan Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1185    pText2Sizer->Add (m_pTextCtrlScanRatio, 0, wxALIGN_CENTER_VERTICAL);
1186 -  std::ostringstream osFocalLength;
1187 -  osFocalLength << dDefaultFocalLength;
1188 -  m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1189 -  pText2Sizer->Add (new wxStaticText (this, -1, "Focal Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1190 +  wxString sFocalLength;
1191 +  sFocalLength << dDefaultFocalLength;
1192 +  m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, sFocalLength, wxDefaultPosition, wxSize(100, 25), 0);
1193 +  pText2Sizer->Add (new wxStaticText (this, -1, _T("Focal Length Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1194    pText2Sizer->Add (m_pTextCtrlFocalLength, 0, wxALIGN_CENTER_VERTICAL);
1195  
1196    if (theApp->getAdvancedOptions()) {
1197 -    std::ostringstream osCenterDetectorLength;
1198 -    osCenterDetectorLength << dDefaultCenterDetectorLength;
1199 -    m_pTextCtrlCenterDetectorLength = new wxTextCtrl (this, -1, osCenterDetectorLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1200 -    pText2Sizer->Add (new wxStaticText (this, -1, "Center-Detector Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1201 +    wxString sCenterDetectorLength;
1202 +    sCenterDetectorLength << dDefaultCenterDetectorLength;
1203 +    m_pTextCtrlCenterDetectorLength = new wxTextCtrl (this, -1, sCenterDetectorLength, wxDefaultPosition, wxSize(100, 25), 0);
1204 +    pText2Sizer->Add (new wxStaticText (this, -1, _T("Center-Detector Length Ratio")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1205      pText2Sizer->Add (m_pTextCtrlCenterDetectorLength, 0, wxALIGN_CENTER_VERTICAL);
1206  
1207 -    std::ostringstream osRotAngle;
1208 -    osRotAngle << dDefaultRotAngle;
1209 -    m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1210 -    pText2Sizer->Add (new wxStaticText (this, -1, "Rotation Angle (Fraction of circle)"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1211 +    wxString sRotAngle;
1212 +    sRotAngle << dDefaultRotAngle;
1213 +    m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, sRotAngle, wxDefaultPosition, wxSize(100, 25), 0);
1214 +    pText2Sizer->Add (new wxStaticText (this, -1, _T("Rotation Angle (Fraction of circle)")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1215      pText2Sizer->Add (m_pTextCtrlRotAngle, 0, wxALIGN_CENTER_VERTICAL);
1216  
1217 -    std::ostringstream osOffsetView;
1218 -    osOffsetView << iDefaultOffsetView;
1219 -    m_pTextCtrlOffsetView = new wxTextCtrl (this, -1, osOffsetView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1220 -    pText2Sizer->Add (new wxStaticText (this, -1, "Gantry offset in units of 'views' "), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1221 +    wxString sOffsetView;
1222 +    sOffsetView << iDefaultOffsetView;
1223 +    m_pTextCtrlOffsetView = new wxTextCtrl (this, -1, sOffsetView, wxDefaultPosition, wxSize(100, 25), 0);
1224 +    pText2Sizer->Add (new wxStaticText (this, -1, _T("Gantry offset in units of 'views' ")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1225      pText2Sizer->Add (m_pTextCtrlOffsetView, 0, wxALIGN_CENTER_VERTICAL);
1226  
1227    }
1228 @@ -730,9 +740,9 @@
1229    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1230  
1231    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1232 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1233 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1234    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1235 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1236 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1237    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1238    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PROJECTIONS);
1239    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1240 @@ -907,7 +917,7 @@
1241    m_dDefaultRoiYMin = pDefaultROI->m_dYMin;
1242    m_dDefaultRoiYMax = pDefaultROI->m_dYMax;
1243  
1244 -  pTopSizer->Add (new wxStaticText (this, -1, "Filtered Backprojection Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1245 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Filtered Backprojection Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1246    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1247  
1248    wxFlexGridSizer* pGridSizer = NULL;
1249 @@ -966,61 +976,61 @@
1250    pGridSizer->Add (m_pRadioBoxTrace);
1251  
1252    wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
1253 -  std::ostringstream os;
1254 -  os << iDefaultXSize;
1255 -  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1256 -  pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1257 +  wxString sXSize;
1258 +  sXSize << iDefaultXSize;
1259 +  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
1260 +  pTextGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1261    pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1262 -  std::ostringstream osYSize;
1263 -  osYSize << iDefaultYSize;
1264 -  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1265 -  pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1266 +  wxString sYSize;
1267 +  sYSize << iDefaultYSize;
1268 +  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
1269 +  pTextGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1270    pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1271  
1272 -  std::ostringstream osHammingParam;
1273 -  osHammingParam << dDefaultHammingParam;
1274 -  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osHammingParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1275 -  pTextGridSizer->Add (new wxStaticText (this, -1, "Hamming Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1276 +  wxString sHammingParam;
1277 +  sHammingParam << dDefaultHammingParam;
1278 +  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, sHammingParam, wxDefaultPosition, wxSize(100, 25), 0);
1279 +  pTextGridSizer->Add (new wxStaticText (this, -1, _T("Hamming Parameter")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1280    pTextGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1281  
1282    if (theApp->getAdvancedOptions()) {
1283 -    std::ostringstream osZeropad;
1284 -    osZeropad << iDefaultZeropad;
1285 -    m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1286 -    pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1287 +    wxString sZeropad;
1288 +    sZeropad << iDefaultZeropad;
1289 +    m_pTextCtrlZeropad = new wxTextCtrl (this, -1, sZeropad, wxDefaultPosition, wxSize(100, 25), 0);
1290 +    pTextGridSizer->Add (new wxStaticText (this, -1, _T("Zeropad")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1291      pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1292    }
1293    pGridSizer->Add (pTextGridSizer);
1294  
1295  #if HAVE_FREQ_PREINTERP
1296 -  std::ostringstream osInterpParam;
1297 -  osInterpParam << iDefaultInterpParam;
1298 -  m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1299 -  pGridSizer->Add (new wxStaticText (this, -1, "Interpolation Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1300 +  wxString sInterpParam;
1301 +  sInterpParam << iDefaultInterpParam;
1302 +  m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, sInterpParam, wxDefaultPosition, wxSize(100, 25), 0);
1303 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Interpolation Parameter")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1304    pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1305  #endif
1306  
1307    if (theApp->getAdvancedOptions()) {
1308      wxFlexGridSizer* pROIGridSizer = new wxFlexGridSizer (2);
1309 -    std::ostringstream osRoiXMin;
1310 -    osRoiXMin << m_dDefaultRoiXMin;
1311 -    m_pTextCtrlRoiXMin = new wxTextCtrl (this, -1, osRoiXMin.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1312 -    pROIGridSizer->Add (new wxStaticText (this, -1, "ROI XMin"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1313 +    wxString sRoiXMin;
1314 +    sRoiXMin << m_dDefaultRoiXMin;
1315 +    m_pTextCtrlRoiXMin = new wxTextCtrl (this, -1, sRoiXMin, wxDefaultPosition, wxSize(100, 25), 0);
1316 +    pROIGridSizer->Add (new wxStaticText (this, -1, _T("ROI XMin")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1317      pROIGridSizer->Add (m_pTextCtrlRoiXMin, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1318 -    std::ostringstream osRoiXMax;
1319 -    osRoiXMax << m_dDefaultRoiXMax;
1320 -    m_pTextCtrlRoiXMax = new wxTextCtrl (this, -1, osRoiXMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1321 -    pROIGridSizer->Add (new wxStaticText (this, -1, "ROI XMax"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1322 +    wxString sRoiXMax;
1323 +    sRoiXMax << m_dDefaultRoiXMax;
1324 +    m_pTextCtrlRoiXMax = new wxTextCtrl (this, -1, sRoiXMax, wxDefaultPosition, wxSize(100, 25), 0);
1325 +    pROIGridSizer->Add (new wxStaticText (this, -1, _T("ROI XMax")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1326      pROIGridSizer->Add (m_pTextCtrlRoiXMax, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1327 -    std::ostringstream osRoiYMin;
1328 -    osRoiYMin << m_dDefaultRoiYMin;
1329 -    m_pTextCtrlRoiYMin = new wxTextCtrl (this, -1, osRoiYMin.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1330 -    pROIGridSizer->Add (new wxStaticText (this, -1, "ROI YMin"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1331 +    wxString sRoiYMin;
1332 +    sRoiYMin << m_dDefaultRoiYMin;
1333 +    m_pTextCtrlRoiYMin = new wxTextCtrl (this, -1, sRoiYMin, wxDefaultPosition, wxSize(100, 25), 0);
1334 +    pROIGridSizer->Add (new wxStaticText (this, -1, _T("ROI YMin")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1335      pROIGridSizer->Add (m_pTextCtrlRoiYMin, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1336 -    std::ostringstream osRoiYMax;
1337 -    osRoiYMax << m_dDefaultRoiYMax;
1338 -    m_pTextCtrlRoiYMax = new wxTextCtrl (this, -1, osRoiYMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1339 -    pROIGridSizer->Add (new wxStaticText (this, -1, "ROI YMax"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1340 +    wxString sRoiYMax;
1341 +    sRoiYMax << m_dDefaultRoiYMax;
1342 +    m_pTextCtrlRoiYMax = new wxTextCtrl (this, -1, sRoiYMax, wxDefaultPosition, wxSize(100, 25), 0);
1343 +    pROIGridSizer->Add (new wxStaticText (this, -1, _T("ROI YMax")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1344      pROIGridSizer->Add (m_pTextCtrlRoiYMax, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1345  
1346      pGridSizer->Add (pROIGridSizer);
1347 @@ -1031,9 +1041,9 @@
1348    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1349  
1350    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1351 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1352 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1353    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1354 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1355 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1356    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1357    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RECONSTRUCTION);
1358    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1359 @@ -1211,7 +1221,7 @@
1360  {
1361    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1362  
1363 -  pTopSizer->Add (new wxStaticText (this, -1, "Filter Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1364 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Filter Parameters")), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1365    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1366  
1367    wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
1368 @@ -1224,40 +1234,40 @@
1369    m_pRadioBoxDomain->SetSelection (iDefaultDomainID);
1370    pGridSizer->Add (m_pRadioBoxDomain, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
1371  
1372 -  std::ostringstream os;
1373 -  os << iDefaultXSize;
1374 -  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1375 -  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1376 +  wxString sXSize;
1377 +  sXSize << iDefaultXSize;
1378 +  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
1379 +  pGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1380    pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1381  
1382 -  std::ostringstream osYSize;
1383 -  osYSize << iDefaultYSize;
1384 -  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1385 -  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1386 +  wxString sYSize;
1387 +  sYSize << iDefaultYSize;
1388 +  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
1389 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1390    pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1391  
1392 -  std::ostringstream osFilterParam;
1393 -  osFilterParam << dDefaultFilterParam;
1394 -  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1395 -  pGridSizer->Add (new wxStaticText (this, -1, "Filter Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1396 +  wxString sFilterParam;
1397 +  sFilterParam << dDefaultFilterParam;
1398 +  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, sFilterParam, wxDefaultPosition, wxSize(100, 25), 0);
1399 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Filter Parameter")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1400    pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1401  
1402 -  std::ostringstream osBandwidth;
1403 -  osBandwidth << dDefaultBandwidth;
1404 -  m_pTextCtrlBandwidth = new wxTextCtrl (this, -1, osBandwidth.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1405 -  pGridSizer->Add (new wxStaticText (this, -1, "Bandwidth"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1406 +  wxString sBandwidth;
1407 +  sBandwidth << dDefaultBandwidth;
1408 +  m_pTextCtrlBandwidth = new wxTextCtrl (this, -1, sBandwidth, wxDefaultPosition, wxSize(100, 25), 0);
1409 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Bandwidth")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1410    pGridSizer->Add (m_pTextCtrlBandwidth, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1411  
1412 -  std::ostringstream osInputScale;
1413 -  osInputScale << dDefaultInputScale;
1414 -  m_pTextCtrlInputScale = new wxTextCtrl (this, -1, osInputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1415 -  pGridSizer->Add (new wxStaticText (this, -1, "Axis (input) Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1416 +  wxString sInputScale;
1417 +  sInputScale << dDefaultInputScale;
1418 +  m_pTextCtrlInputScale = new wxTextCtrl (this, -1, sInputScale, wxDefaultPosition, wxSize(100, 25), 0);
1419 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Axis (input) Scale")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1420    pGridSizer->Add (m_pTextCtrlInputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1421  
1422 -  std::ostringstream osOutputScale;
1423 -  osOutputScale << dDefaultOutputScale;
1424 -  m_pTextCtrlOutputScale = new wxTextCtrl (this, -1, osOutputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1425 -  pGridSizer->Add (new wxStaticText (this, -1, "Filter Output Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1426 +  wxString sOutputScale;
1427 +  sOutputScale << dDefaultOutputScale;
1428 +  m_pTextCtrlOutputScale = new wxTextCtrl (this, -1, sOutputScale, wxDefaultPosition, wxSize(100, 25), 0);
1429 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Filter Output Scale")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1430    pGridSizer->Add (m_pTextCtrlOutputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1431  
1432    pTopSizer->Add (pGridSizer, 1, wxALL, 3);
1433 @@ -1265,9 +1275,9 @@
1434    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1435  
1436    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1437 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1438 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1439    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1440 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1441 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1442    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1443    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_FILTER);
1444    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1445 @@ -1376,7 +1386,7 @@
1446  {
1447    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1448  
1449 -  pTopSizer->Add (new wxStaticText (this, -1, "Select Export Format"), 0, wxALIGN_CENTER | wxALL, 5);
1450 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Select Export Format")), 0, wxALIGN_CENTER | wxALL, 5);
1451  
1452    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
1453  
1454 @@ -1388,9 +1398,9 @@
1455    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1456  
1457    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1458 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1459 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1460    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1461 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1462 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1463    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1464    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_EXPORT);
1465    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1466 @@ -1421,7 +1431,7 @@
1467  {
1468    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1469  
1470 -  pTopSizer->Add (new wxStaticText (this, -1, "Select Import Format"), 0, wxALIGN_CENTER | wxALL, 5);
1471 +  pTopSizer->Add (new wxStaticText (this, -1, _T("Select Import Format")), 0, wxALIGN_CENTER | wxALL, 5);
1472  
1473    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
1474  
1475 @@ -1433,9 +1443,9 @@
1476    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1477  
1478    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1479 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1480 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1481    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1482 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1483 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1484    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1485    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_IMPORT);
1486    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1487 @@ -1460,38 +1470,38 @@
1488  // CLASS DiaglogGetXYSize Implementation
1489  /////////////////////////////////////////////////////////////////////
1490  
1491 -DialogGetXYSize::DialogGetXYSize (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize, int iDefaultYSize)
1492 -: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1493 +DialogGetXYSize::DialogGetXYSize (wxWindow* pParent, wxChar const * pwszTitle, int iDefaultXSize, int iDefaultYSize)
1494 +: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1495  {
1496    m_iDefaultXSize = iDefaultXSize;
1497    m_iDefaultYSize = iDefaultYSize;
1498  
1499    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1500  
1501 -  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1502 +  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1503  
1504    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1505  
1506 -  std::ostringstream os;
1507 -  os << iDefaultXSize;
1508 -  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1509 -  std::ostringstream osYSize;
1510 -  osYSize << iDefaultYSize;
1511 -  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1512 +  wxString sXSize;
1513 +  sXSize << iDefaultXSize;
1514 +  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
1515 +  wxString sYSize;
1516 +  sYSize << iDefaultYSize;
1517 +  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
1518  
1519    wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
1520 -  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1521 +  pGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1522    pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
1523 -  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1524 +  pGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1525    pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
1526    pTopSizer->Add (pGridSizer, 1, wxALL, 10);
1527  
1528    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1529  
1530    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1531 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1532 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1533    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1534 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1535 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1536    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1537  
1538    pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1539 @@ -1537,9 +1547,9 @@
1540  // DialogGetConvertPolarParameters
1541  /////////////////////////////////////////////////////////////////////
1542  
1543 -DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle,
1544 +DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, wxChar const * pwszTitle,
1545         int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad, int iHelpID)
1546 -: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1547 +: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1548  {
1549    m_iDefaultXSize = iDefaultXSize;
1550    m_iDefaultYSize = iDefaultYSize;
1551 @@ -1547,7 +1557,7 @@
1552  
1553    wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1554  
1555 -  pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1556 +  pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1557    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1558  
1559    wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (1);
1560 @@ -1557,21 +1567,21 @@
1561    pGridSizer->Add (m_pRadioBoxInterpolation, 0, wxALL | wxALIGN_CENTER);
1562  
1563    wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
1564 -  std::ostringstream os;
1565 -  os << iDefaultXSize;
1566 -  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1567 -  pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1568 +  wxString sXSize;
1569 +  sXSize << iDefaultXSize;
1570 +  m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
1571 +  pTextGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1572    pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1573 -  std::ostringstream osYSize;
1574 -  osYSize << iDefaultYSize;
1575 -  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1576 -  pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1577 +  wxString sYSize;
1578 +  sYSize << iDefaultYSize;
1579 +  m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
1580 +  pTextGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1581    pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1582    if (m_iDefaultZeropad >= 0) {
1583 -    std::ostringstream osZeropad;
1584 -    osZeropad << iDefaultZeropad;
1585 -    m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1586 -    pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1587 +    wxString sZeropad;
1588 +    sZeropad << iDefaultZeropad;
1589 +    m_pTextCtrlZeropad = new wxTextCtrl (this, -1, sZeropad, wxDefaultPosition, wxSize(100, 25), 0);
1590 +    pTextGridSizer->Add (new wxStaticText (this, -1, _T("Zeropad")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1591      pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1592    }
1593  
1594 @@ -1582,9 +1592,9 @@
1595    pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1596  
1597    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1598 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1599 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
1600    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1601 -  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1602 +  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1603    pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1604    CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, iHelpID);
1605    pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1606 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
1607 --- ctsim/src/dialogs.h 2007-09-04 00:40:08.000000000 -0600
1608 +++ ctsim-wx2.8/src/dialogs.h   2008-07-21 10:08:10.892315253 -0600
1609 @@ -44,7 +44,7 @@
1610  {
1611  public:
1612    CTSimHelpButton (wxWindow* parent, int id)
1613 -    : wxButton (parent, id, "Help")
1614 +    : wxButton (parent, id, _T("Help"))
1615    {}
1616  };
1617  
1618 @@ -57,7 +57,12 @@
1619  class StringValueAndTitleListBox : public wxListBox
1620  {
1621   public:
1622 -  StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* const aszTitle[], const char* const aszValue[]);
1623 +  StringValueAndTitleListBox (wxDialog* pParent, int nChoices, wxChar const* const* asTitle,
1624 +                              char const* const aszValue[]);
1625 +  StringValueAndTitleListBox (wxDialog* pParent, int nChoices, wxChar const* title,
1626 +                              char const* const* aszTitle, char const* const* aszValue);
1627 +  StringValueAndTitleListBox (wxDialog* pParent, int nChoices, wxChar const* title,
1628 +                              wxChar const* const* asTitle, char const* const* aszValue);
1629  
1630      const char* getSelectionStringValue () const;
1631  
1632 @@ -69,7 +74,7 @@
1633  class StringValueAndTitleRadioBox : public wxRadioBox
1634  {
1635   public:
1636 -  StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* const aszTitle[], const char* const aszValue[]);
1637 +  StringValueAndTitleRadioBox (wxDialog* pParent, wxChar const* strTitle, int nChoices, const char* const aszTitle[], const char* const aszValue[]);
1638  
1639    const char* getSelectionStringValue () const;
1640  
1641 @@ -108,7 +113,7 @@
1642  class DialogGetComparisonImage : public wxDialog
1643  {
1644   public:
1645 -   DialogGetComparisonImage (wxWindow* pParent, const char* const pszTitle, const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference);
1646 +   DialogGetComparisonImage (wxWindow* pParent, wxChar const * pwszTitle, const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference);
1647      virtual ~DialogGetComparisonImage () {}
1648  
1649      ImageFileDocument* getImageFileDocument ();
1650 @@ -125,7 +130,7 @@
1651  class DialogPreferences : public wxDialog
1652  {
1653   public:
1654 -    DialogPreferences (wxWindow* pParent, const char* const pszTitle, bool bAdvanced, bool bAskNewDocs,
1655 +  DialogPreferences (wxWindow* pParent, wxChar const* pszTitle, bool bAdvanced, bool bAskNewDocs,
1656        bool bVerboseLogging, bool bStartupTips, bool bUseBackgroundTasks);
1657      virtual ~DialogPreferences ();
1658  
1659 @@ -148,7 +153,7 @@
1660  class DialogGetMinMax : public wxDialog
1661  {
1662   public:
1663 -    DialogGetMinMax (wxWindow* pParent, const char* const pszTitle, double dDefaultMin = 0., double dDefaultMax = 0.);
1664 +    DialogGetMinMax (wxWindow* pParent, wxChar const* pszTitle, double dDefaultMin = 0., double dDefaultMax = 0.);
1665      virtual ~DialogGetMinMax ();
1666  
1667      double getMinimum ();
1668 @@ -373,7 +378,7 @@
1669  class DialogGetXYSize : public wxDialog
1670  {
1671   public:
1672 -    DialogGetXYSize (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize = 1, int iDefaultYSize = 1);
1673 +    DialogGetXYSize (wxWindow* pParent, wxChar const * pwszTitle, int iDefaultXSize = 1, int iDefaultYSize = 1);
1674      virtual ~DialogGetXYSize ();
1675  
1676      unsigned int getXSize ();
1677 @@ -391,7 +396,7 @@
1678  class DialogGetConvertPolarParameters : public wxDialog
1679  {
1680   public:
1681 -   DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize = 0,
1682 +   DialogGetConvertPolarParameters (wxWindow* pParent, wxChar const * pwszTitle, int iDefaultXSize = 0,
1683       int iDefaultYSize = 0, int iDefaultInterpolationID = Projections::POLAR_INTERP_BILINEAR,
1684       int iDefaultZeropad = 3, int iHelpID = IDH_DLG_POLAR);
1685     virtual ~DialogGetConvertPolarParameters ();
1686 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
1687 --- ctsim/src/dlgezplot.cpp     2007-09-04 00:40:08.000000000 -0600
1688 +++ ctsim-wx2.8/src/dlgezplot.cpp       2008-07-21 10:08:10.900315744 -0600
1689 @@ -104,7 +104,7 @@
1690  
1691  
1692  wxEZPlotDialog::wxEZPlotDialog (wxWindow *parent, bool bCancelButton)
1693 -: wxDialog((parent ? parent : theApp->getMainFrame()), -1, wxString("EZPlot"), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL),
1694 +: wxDialog((parent ? parent : theApp->getMainFrame()), -1, _T("EZPlot"), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL),
1695    m_parentTop(0)
1696  {
1697    if (! parent)
1698 @@ -119,10 +119,10 @@
1699    pTopSizer->Add (m_pEZPlotCtrl = new EZPlotControl (this), 0, wxALIGN_CENTER | wxALL, 5);
1700  
1701    wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1702 -  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Ok");
1703 +  wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Ok"));
1704    pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1705    if (bCancelButton) {
1706 -    wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1707 +    wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
1708      pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1709    }
1710    pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1711 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
1712 --- ctsim/src/dlgezplot.h       2007-09-04 00:40:08.000000000 -0600
1713 +++ ctsim-wx2.8/src/dlgezplot.h 2008-07-21 10:08:10.908316235 -0600
1714 @@ -57,7 +57,7 @@
1715                 const wxSize& size = wxDefaultSize,
1716                 long style = wxSTATIC_BORDER,
1717                 const wxValidator& validator = wxDefaultValidator,
1718 -               const wxString& name = "EZPlotCtrl");
1719 +                   const wxString& name = _T("EZPlotCtrl"));
1720  
1721     virtual ~EZPlotControl();
1722  
1723 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
1724 --- ctsim/src/dlgprojections.cpp        2007-09-04 00:40:08.000000000 -0600
1725 +++ ctsim-wx2.8/src/dlgprojections.cpp  2008-07-21 10:08:10.916316725 -0600
1726 @@ -59,7 +59,7 @@
1727  
1728  
1729    ProjectionsDialog::ProjectionsDialog (Scanner& rScanner, Projections& rProj, const Phantom& rPhantom, const int iTrace, wxWindow *parent)
1730 -    : wxDialog(parent, -1, "Collect Projections", wxDefaultPosition), m_rScanner(rScanner), m_rProjections(rProj), m_rPhantom(rPhantom),
1731 +: wxDialog(parent, -1, _T("Collect Projections"), wxDefaultPosition), m_rScanner(rScanner), m_rProjections(rProj), m_rPhantom(rPhantom),
1732        m_pSGPDriver(NULL), m_pSGP(NULL), m_iTrace(iTrace), m_pDC(NULL), m_btnAbort(0), m_btnPause(0), m_btnStep(0)
1733  {
1734    m_state = Continue;
1735 @@ -79,7 +79,7 @@
1736  
1737    m_btnAbort->SetConstraints(c);
1738  
1739 -  m_btnPause = new wxButton (this, ID_BTN_PAUSE, wxString("Pause"));
1740 +  m_btnPause = new wxButton (this, ID_BTN_PAUSE, _T("Pause"));
1741    wxLayoutConstraints* cPause = new wxLayoutConstraints;
1742    cPause->right.SameAs(this, wxRight, 3*LAYOUT_X_MARGIN + sizeBtn.x);
1743    cPause->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
1744 @@ -87,7 +87,7 @@
1745    cPause->height.Absolute(sizeBtn.y);
1746    m_btnPause->SetConstraints(cPause);
1747  
1748 -  m_btnStep = new wxButton (this, ID_BTN_STEP, wxString("Step"));
1749 +  m_btnStep = new wxButton (this, ID_BTN_STEP, _T("Step"));
1750    wxLayoutConstraints* cStep = new wxLayoutConstraints;
1751    cStep->right.SameAs(this, wxRight, 5*LAYOUT_X_MARGIN + sizeBtn.x * 2);
1752    cStep->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
1753 @@ -187,7 +187,7 @@
1754      showView (iViewNumber);
1755      wxYield();        // update the display
1756      if (m_iTrace >= Trace::TRACE_PLOT) {
1757 -      ::wxUsleep(500);
1758 +      ::wxMilliSleep(500);
1759      }
1760    } else {
1761      m_state = Finished;    // so that we return TRUE below and
1762 @@ -232,12 +232,12 @@
1763      m_pSGP->setDC (&m_memoryDC);
1764      showView (m_iLastView);
1765      m_state = Paused;
1766 -    m_btnPause->SetLabel (wxString("Resume"));
1767 +    m_btnPause->SetLabel (_T("Resume"));
1768      m_pSGP->setDC (m_pDC);
1769      m_memoryDC.SelectObject(wxNullBitmap);
1770    } else if (m_state == Paused) {
1771      m_state = Continue;
1772 -    m_btnPause->SetLabel (wxString("Pause"));
1773 +    m_btnPause->SetLabel (_T("Pause"));
1774    }
1775  }
1776  
1777 @@ -252,7 +252,7 @@
1778      showView (m_iLastView);
1779      // m_rScanner.collectProjections (m_rProjections, m_rPhantom, m_iLastView, 1, true, m_iTrace, m_pSGP);
1780      m_state = Paused;
1781 -    m_btnPause->SetLabel (wxString("Resume"));
1782 +    m_btnPause->SetLabel (_T("Resume"));
1783      m_pSGP->setDC (m_pDC);
1784      m_memoryDC.SelectObject(wxNullBitmap);
1785      Refresh();
1786 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
1787 --- ctsim/src/dlgreconstruct.cpp        2007-09-04 00:40:08.000000000 -0600
1788 +++ ctsim-wx2.8/src/dlgreconstruct.cpp  2008-07-21 10:08:10.920316971 -0600
1789 @@ -67,7 +67,7 @@
1790  
1791  ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Projections& rProj,
1792                                        ImageFile& rIF, const int iTrace, wxWindow *parent)
1793 -: wxDialog(parent, -1, "Reconstruction", wxDefaultPosition), m_rReconstructor(rReconstruct),
1794 +: wxDialog(parent, -1, _T("Reconstruction"), wxDefaultPosition), m_rReconstructor(rReconstruct),
1795             m_rProjections(rProj), m_rImageFile(rIF), m_pSGPDriver(NULL), m_pSGP(NULL),
1796    m_iTrace(iTrace), m_pDC(NULL), m_btnAbort(0), m_btnPause(0), m_btnStep(0)
1797  {
1798 @@ -77,7 +77,7 @@
1799      while ( m_parentTop && m_parentTop->GetParent() )
1800          m_parentTop = m_parentTop->GetParent();
1801  
1802 -    m_btnAbort = new wxButton(this, wxID_CANCEL, _("Cancel"));
1803 +    m_btnAbort = new wxButton(this, wxID_CANCEL, _T("Cancel"));
1804      wxLayoutConstraints* c = new wxLayoutConstraints;
1805      c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
1806      c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
1807 @@ -88,7 +88,7 @@
1808  
1809      m_btnAbort->SetConstraints(c);
1810  
1811 -    m_btnPause = new wxButton (this, ID_BTN_PAUSE, wxString("Pause"));
1812 +    m_btnPause = new wxButton (this, ID_BTN_PAUSE, _T("Pause"));
1813      wxLayoutConstraints* cPause = new wxLayoutConstraints;
1814      cPause->right.SameAs(this, wxRight, 3*LAYOUT_X_MARGIN + sizeBtn.x);
1815      cPause->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
1816 @@ -96,7 +96,7 @@
1817      cPause->height.Absolute(sizeBtn.y);
1818      m_btnPause->SetConstraints(cPause);
1819  
1820 -    m_btnStep = new wxButton (this, ID_BTN_STEP, wxString("Step"));
1821 +    m_btnStep = new wxButton (this, ID_BTN_STEP, _T("Step"));
1822      wxLayoutConstraints* cStep = new wxLayoutConstraints;
1823      cStep->right.SameAs(this, wxRight, 5*LAYOUT_X_MARGIN + sizeBtn.x * 2);
1824      cStep->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
1825 @@ -223,7 +223,7 @@
1826                  showView (iViewNumber, bBackproject);
1827                  ::wxYield();        // update the display
1828                  if (m_iTrace >= Trace::TRACE_PLOT) {
1829 -                        ::wxUsleep(250);
1830 +                        ::wxMilliSleep(250);
1831                  }
1832          } else {
1833                  m_state = Finished;    // so that we return TRUE below and
1834 @@ -267,12 +267,12 @@
1835                  m_memoryDC.SetFont (*wxSWISS_FONT);
1836                  showView (m_iLastView, false);
1837                  m_state = Paused;
1838 -                m_btnPause->SetLabel (wxString("Resume"));
1839 +                m_btnPause->SetLabel (_T("Resume"));
1840                  m_pSGP->setDC (m_pDC);
1841                  m_memoryDC.SelectObject(wxNullBitmap);
1842          } else if (m_state == Paused) {
1843                  m_state = Continue;
1844 -                m_btnPause->SetLabel (wxString("Pause"));
1845 +                m_btnPause->SetLabel (_T("Pause"));
1846          }
1847  }
1848  
1849 @@ -288,7 +288,7 @@
1850                  m_memoryDC.SetFont (*wxSWISS_FONT);
1851                  showView (m_iLastView, false);
1852                  m_state = Paused;
1853 -                m_btnPause->SetLabel (wxString("Resume"));
1854 +                m_btnPause->SetLabel (_T("Resume"));
1855                  m_pSGP->setDC (m_pDC);
1856                  m_memoryDC.SelectObject(wxNullBitmap);
1857                  Refresh();
1858 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
1859 --- ctsim/src/docs.cpp  2007-09-04 00:40:08.000000000 -0600
1860 +++ ctsim-wx2.8/src/docs.cpp    2008-07-21 10:08:10.924317216 -0600
1861 @@ -51,12 +51,12 @@
1862  
1863  bool ImageFileDocument::OnSaveDocument(const wxString& filename)
1864  {
1865 -  if (! m_pImageFile->fileWrite (filename)) {
1866 -    *theApp->getLog() << "Unable to write image file " << filename << "\n";
1867 +  if (! m_pImageFile->fileWrite (filename.mb_str(wxConvUTF8))) {
1868 +    *theApp->getLog() << _T("Unable to write image file ") << filename << _T("\n");
1869      return false;
1870    }
1871    if (theApp->getVerboseLogging())
1872 -    *theApp->getLog() << "Wrote image file " << filename << "\n";
1873 +    *theApp->getLog() << _T("Wrote image file ") << filename << _T("\n");
1874    Modify(false);
1875    return true;
1876  }
1877 @@ -66,14 +66,14 @@
1878    if (! OnSaveModified())
1879      return false;
1880  
1881 -  if (! m_pImageFile->fileRead (filename.c_str())) {
1882 -    *theApp->getLog() << "Unable to read image file " << filename << "\n";
1883 +  if (! m_pImageFile->fileRead (filename.mb_str(wxConvUTF8))) {
1884 +    *theApp->getLog() << _T("Unable to read image file ") << filename << _T("\n");
1885      m_bBadFileOpen = true;
1886      return false;
1887    }
1888  
1889 -  if (theApp->getVerboseLogging() && filename != "")
1890 -    *theApp->getLog() << "Read image file " << filename << "\n";
1891 +  if (theApp->getVerboseLogging() && filename != _T(""))
1892 +    *theApp->getLog() << _T("Read image file ") << filename << _T("\n");
1893  
1894    SetFilename(filename, true);
1895    Modify(false);
1896 @@ -106,13 +106,13 @@
1897  ImageFileDocument::Revert ()
1898  {
1899    if (IsModified()) {
1900 -    wxString msg ("Revert to saved ");
1901 +    wxString msg (_T("Revert to saved "));
1902      msg += GetFilename();
1903 -    msg += "?";
1904 -    wxMessageDialog dialog (getView()->getFrame(), msg, "Are you sure?", wxYES_NO | wxNO_DEFAULT);
1905 +    msg += _T("?");
1906 +    wxMessageDialog dialog (getView()->getFrame(), msg, _T("Are you sure?"), wxYES_NO | wxNO_DEFAULT);
1907      if (dialog.ShowModal() == wxID_YES) {
1908        if (theApp->getVerboseLogging())
1909 -        *theApp->getLog() << "Reverting to saved " << GetFilename() << "\n";
1910 +        *theApp->getLog() << _T("Reverting to saved ") << GetFilename() << _T("\n");
1911        Modify (false);
1912        OnOpenDocument (GetFilename());
1913      }
1914 @@ -177,7 +177,7 @@
1915  
1916    while (m_vecpBackgroundSupervisors.size() > 0) {
1917       ::wxYield();
1918 -     ::wxUsleep(50);
1919 +     ::wxMilliSleep(50);
1920    }
1921  #endif
1922  }
1923 @@ -190,12 +190,12 @@
1924  bool
1925  ProjectionFileDocument::OnSaveDocument(const wxString& filename)
1926  {
1927 -  if (! m_pProjectionFile->write (filename.c_str())) {
1928 -    *theApp->getLog() << "Unable to write projection file " << filename << "\n";
1929 +  if (! m_pProjectionFile->write (filename.mb_str(wxConvUTF8))) {
1930 +    *theApp->getLog() << _T("Unable to write projection file ") << filename << _T("\n");
1931      return false;
1932    }
1933    if (theApp->getVerboseLogging())
1934 -    *theApp->getLog() << "Wrote projection file " << filename << "\n";
1935 +    *theApp->getLog() << _T("Wrote projection file ") << filename << _T("\n");
1936    Modify(false);
1937    return true;
1938  }
1939 @@ -213,15 +213,15 @@
1940    if (! OnSaveModified())
1941      return false;
1942  
1943 -  if (! m_pProjectionFile->read (filename.c_str())) {
1944 -    *theApp->getLog() << "Unable to read projection file " << filename << "\n";
1945 +  if (! m_pProjectionFile->read (filename.mb_str(wxConvUTF8))) {
1946 +    *theApp->getLog() << _T("Unable to read projection file ") << filename << _T("\n");
1947      m_bBadFileOpen = true;
1948      return false;
1949    }
1950    m_bBadFileOpen = false;
1951  
1952 -  if (theApp->getVerboseLogging() && filename != "")
1953 -    *theApp->getLog() << "Read projection file " << filename << "\n";
1954 +  if (theApp->getVerboseLogging() && filename != _T(""))
1955 +    *theApp->getLog() << _T("Read projection file ") << filename << _T("\n");
1956  
1957    SetFilename(filename, true);
1958    Modify(false);
1959 @@ -276,17 +276,17 @@
1960    wxString filename (constFilename);
1961  
1962    if (wxFile::Exists (filename)) {
1963 -    m_phantom.createFromFile (filename);
1964 +    m_phantom.createFromFile (filename.mb_str(wxConvUTF8));
1965      if (theApp->getVerboseLogging())
1966 -      *theApp->getLog() << "Read phantom file " << filename << "\n";
1967 +      *theApp->getLog() << _T("Read phantom file ") << filename << _T("\n");
1968    } else {
1969 -    filename.Replace (".phm", "");
1970 -    m_phantom.createFromPhantom (filename);
1971 +    filename.Replace (_T(".phm"), _T(""));
1972 +    m_phantom.createFromPhantom (filename.mb_str(wxConvUTF8));
1973    }
1974    m_namePhantom = filename;
1975    SetFilename (filename, true);
1976    if (m_phantom.fail()) {
1977 -    *theApp->getLog() << "Failure creating phantom " << filename << "\n";
1978 +    *theApp->getLog() << _T("Failure creating phantom ") << filename << _T("\n");
1979      m_bBadFileOpen = true;
1980      return false;
1981    }
1982 @@ -301,12 +301,12 @@
1983  bool
1984  PhantomFileDocument::OnSaveDocument(const wxString& filename)
1985  {
1986 -  if (! m_phantom.fileWrite (filename.c_str())) {
1987 -    *theApp->getLog() << "Unable to write phantom file " << filename << "\n";
1988 +  if (! m_phantom.fileWrite (filename.mb_str(wxConvUTF8))) {
1989 +    *theApp->getLog() << _T("Unable to write phantom file ") << filename << _T("\n");
1990      return false;
1991    }
1992    if (theApp->getVerboseLogging())
1993 -    *theApp->getLog() << "Wrote phantom file " << filename << "\n";
1994 +    *theApp->getLog() << _T("Wrote phantom file ") << filename << _T("\n");
1995    Modify(false);
1996    return true;
1997  }
1998 @@ -346,12 +346,12 @@
1999  PlotFileDocument::OnSaveDocument(const wxString& filename)
2000  {
2001    m_namePlot = filename.c_str();
2002 -  if (! m_plot.fileWrite (filename)) {
2003 -    *theApp->getLog() << "Unable to write plot file " << filename << "\n";
2004 +  if (! m_plot.fileWrite (filename.mb_str(wxConvUTF8))) {
2005 +    *theApp->getLog() << _T("Unable to write plot file ") << filename << _T("\n");
2006      return false;
2007    }
2008    if (theApp->getVerboseLogging())
2009 -    *theApp->getLog() << "Wrote plot file " << filename << "\n";
2010 +    *theApp->getLog() << _T("Wrote plot file ") << filename << _T("\n");
2011    Modify(false);
2012    return true;
2013  }
2014 @@ -362,15 +362,15 @@
2015    if (! OnSaveModified())
2016      return false;
2017  
2018 -  if (! m_plot.fileRead (filename.c_str())) {
2019 -    *theApp->getLog() << "Unable to read plot file " << filename << "\n";
2020 +  if (! m_plot.fileRead (filename.mb_str(wxConvUTF8))) {
2021 +    *theApp->getLog() << _T("Unable to read plot file ") << filename << _T("\n");
2022      m_bBadFileOpen = true;
2023      return false;
2024    }
2025    m_bBadFileOpen = false;
2026  
2027 -  if (theApp->getVerboseLogging() && filename != "")
2028 -    *theApp->getLog() << "Read plot file " << filename << "\n";
2029 +  if (theApp->getVerboseLogging() && filename != _T(""))
2030 +    *theApp->getLog() << _T("Read plot file ") << filename << _T("\n");
2031  
2032    SetFilename (filename, true);
2033    m_namePlot = filename.c_str();
2034 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
2035 --- ctsim/src/graph3dview.cpp   2007-09-04 00:40:08.000000000 -0600
2036 +++ ctsim-wx2.8/src/graph3dview.cpp     2008-07-21 10:08:10.932317707 -0600
2037 @@ -154,7 +154,7 @@
2038  Graph3dFileView::~Graph3dFileView()
2039  {
2040    GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
2041 -  GetDocumentManager()->ActivateView(this, false, true);
2042 +  GetDocumentManager()->ActivateView(this, false);
2043  }
2044  
2045  bool
2046 @@ -166,7 +166,7 @@
2047  
2048    m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
2049    m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
2050 -  m_pFrame->SetTitle("Graph3dFileView");
2051 +  m_pFrame->SetTitle(_T("Graph3dFileView"));
2052  
2053    m_pCanvas->SetCurrent();
2054    InitGL();
2055 @@ -190,7 +190,7 @@
2056    Graph3dFileCanvas* pCanvas = new Graph3dFileCanvas (this, parent, wxPoint(-1,-1), wxSize(-1,-1), 0);
2057  
2058    pCanvas->SetBackgroundColour(*wxWHITE);
2059 -  pCanvas->Clear();
2060 +  pCanvas->ClearBackground();
2061  
2062    return pCanvas;
2063  }
2064 @@ -362,10 +362,11 @@
2065  void
2066  Graph3dFileView::OnProperties (wxCommandEvent& event)
2067  {
2068 -  std::ostringstream os;
2069 -  *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
2070 -  wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(),
2071 -                             "Imagefile Properties", wxOK | wxICON_INFORMATION);
2072 +  wxString os;
2073 +  *theApp->getLog() << _T(">>>>\n") << os << _T("<<<<\n");
2074 +  wxMessageDialog dialogMsg (getFrameForChild(), os,
2075 +                             _T("Imagefile Properties"), 
2076 +                             wxOK | wxICON_INFORMATION);
2077    dialogMsg.ShowModal();
2078  }
2079  
2080 @@ -409,17 +410,17 @@
2081    if (m_pCanvas) {
2082      m_pCanvas->SetCurrent();
2083  #ifdef DEBUG
2084 -        *theApp->getLog() << "Drawing 3d surface\n";
2085 +    *theApp->getLog() << _T("Drawing 3d surface\n");
2086  #endif
2087      Draw();
2088      m_pCanvas->SwapBuffers();
2089    }
2090  
2091    if (m_pStatusBar) {
2092 -    std::ostringstream os;
2093 -    os << "Xangle=" << m_dXRotate << ", Yangle=" << m_dYRotate
2094 -       << ", Zangle=" << m_dZRotate;
2095 -    m_pStatusBar->SetStatusText (os.str().c_str());
2096 +    wxString os;
2097 +    os << _T("Xangle=") << m_dXRotate << _T(", Yangle=") << m_dYRotate
2098 +       << _T(", Zangle=") << m_dZRotate;
2099 +    m_pStatusBar->SetStatusText (os);
2100    }
2101  }
2102  
2103 @@ -726,7 +727,7 @@
2104    if (m_bColorScaleMaxSet)
2105      dMax = m_dColorScaleMax;
2106  
2107 -  DialogGetMinMax dialogMinMax (getFrameForChild(), "Set Color Scale Minimum & Maximum", dMin, dMax);
2108 +  DialogGetMinMax dialogMinMax (getFrameForChild(), _T("Set Color Scale Minimum & Maximum"), dMin, dMax);
2109    int retVal = dialogMinMax.ShowModal();
2110    if (retVal == wxID_OK) {
2111      m_bColorScaleMinSet = true;
2112 @@ -755,9 +756,9 @@
2113  Graph3dFileView::CreateChildFrame (wxDocument *doc, wxView *view)
2114  {
2115  #if CTSIM_MDI
2116 -  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
2117 +  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Graph3dFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
2118  #else
2119 -  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
2120 +  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Graph3dFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
2121  #endif
2122    theApp->setIconForFrame (subframe);
2123  
2124 @@ -770,45 +771,45 @@
2125  
2126    m_pFileMenu = new wxMenu;
2127  
2128 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
2129 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
2130 -  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
2131 -  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
2132 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
2133 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
2134 +  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
2135 +  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
2136  
2137    m_pFileMenu->AppendSeparator();
2138 -  m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, "P&roperties");
2139 +  m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, _T("P&roperties"));
2140  
2141    m_pFileMenu->AppendSeparator();
2142 -  m_pFileMenu->Append(wxID_PRINT, "&Print...");
2143 -  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
2144 -  m_pFileMenu->Append(wxID_PREVIEW, "Print Preview");
2145 +  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
2146 +  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
2147 +  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Preview"));
2148    m_pFileMenu->AppendSeparator();
2149 -  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
2150 -  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
2151 +  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
2152 +  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
2153  
2154    GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
2155    GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
2156  
2157    m_pViewMenu = new wxMenu;
2158 -  m_pViewMenu->Append(GRAPH3D_VIEW_WIREFRAME, "Wi&reframe\tCtrl-R", "", true);
2159 -  m_pViewMenu->Append(GRAPH3D_VIEW_SMOOTH, "S&mooth\tCtrl-M", "", true);
2160 -  m_pViewMenu->Append(GRAPH3D_VIEW_COLOR, "Co&lor\tCtrl-L", "", true);
2161 -  m_pViewMenu->Append(GRAPH3D_VIEW_LIGHTING, "Li&ghting\tCtrl-G", "", true);
2162 +  m_pViewMenu->Append(GRAPH3D_VIEW_WIREFRAME, _T("Wi&reframe\tCtrl-R"), _T(""), true);
2163 +  m_pViewMenu->Append(GRAPH3D_VIEW_SMOOTH, _T("S&mooth\tCtrl-M"), _T(""), true);
2164 +  m_pViewMenu->Append(GRAPH3D_VIEW_COLOR, _T("Co&lor\tCtrl-L"), _T(""), true);
2165 +  m_pViewMenu->Append(GRAPH3D_VIEW_LIGHTING, _T("Li&ghting\tCtrl-G"), _T(""), true);
2166    m_pViewMenu->AppendSeparator();
2167 -  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_MINMAX, "Color Scale S&et Min/Max...\tCtrl-E");
2168 -  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_AUTO, "Color Scale &Auto...\tCtrl-A");
2169 -  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_FULL, "Color F&ull Scale\tCtrl-U");
2170 +  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_MINMAX, _T("Color Scale S&et Min/Max...\tCtrl-E"));
2171 +  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_AUTO, _T("Color Scale &Auto...\tCtrl-A"));
2172 +  m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_FULL, _T("Color F&ull Scale\tCtrl-U"));
2173  
2174  
2175    wxMenu *help_menu = new wxMenu;
2176 -  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
2177 -  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
2178 +  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
2179 +  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
2180  
2181    wxMenuBar *menu_bar = new wxMenuBar;
2182  
2183 -  menu_bar->Append(m_pFileMenu, "&File");
2184 -  menu_bar->Append(m_pViewMenu, "&View");
2185 -  menu_bar->Append(help_menu, "&Help");
2186 +  menu_bar->Append(m_pFileMenu, _T("&File"));
2187 +  menu_bar->Append(m_pViewMenu, _T("&View"));
2188 +  menu_bar->Append(help_menu, _T("&Help"));
2189  
2190    subframe->SetMenuBar(menu_bar);
2191  
2192 @@ -894,7 +895,7 @@
2193      return;
2194  
2195    wxCommandEvent dummyEvent;
2196 -  switch (event.KeyCode()) {
2197 +  switch (event.GetKeyCode()) {
2198    case WXK_LEFT:
2199          m_pView->m_dZRotate += 15.0;
2200      Refresh (false);
2201 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
2202 --- ctsim/src/threadproj.cpp    2007-09-04 00:40:08.000000000 -0600
2203 +++ ctsim-wx2.8/src/threadproj.cpp      2008-07-21 10:08:10.936317952 -0600
2204 @@ -56,7 +56,7 @@
2205  
2206  ProjectorSupervisorThread::ProjectorSupervisorThread (PhantomFileView* pProjView, int iNDet, int iNView, int iOffsetView,
2207     const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dCenterDetectorLength,
2208 -   double dViewRatio, double dScanRatio, const char* const pszLabel)
2209 +   double dViewRatio, double dScanRatio, wxChar const* pszLabel)
2210  : SupervisorThread(), m_pPhantomView(pProjView), m_iNDet(iNDet), m_iNView(iNView), m_iOffsetView(iOffsetView), m_strGeometry(pszGeometry),
2211    m_iNSample(iNSample), m_dRotation(dRotation), m_dFocalLength(dFocalLength), m_dCenterDetectorLength(dCenterDetectorLength),
2212    m_dViewRatio(dViewRatio), m_dScanRatio(dScanRatio), m_strLabel(pszLabel)
2213 @@ -67,7 +67,7 @@
2214  ProjectorSupervisorThread::Entry()
2215  {
2216    ProjectorSupervisor projSupervisor (this, m_pPhantomView, m_iNDet, m_iNView, m_iOffsetView,
2217 -   m_strGeometry.c_str(), m_iNSample, m_dRotation, m_dFocalLength, m_dCenterDetectorLength, m_dViewRatio, m_dScanRatio, m_strLabel.c_str());
2218 +   m_strGeometry.c_str(), m_iNSample, m_dRotation, m_dFocalLength, m_dCenterDetectorLength, m_dViewRatio, m_dScanRatio, m_strLabel);
2219  
2220    projSupervisor.start();
2221    while (! projSupervisor.workersDone() && ! projSupervisor.fail() && ! projSupervisor.cancelled()) {
2222 @@ -75,9 +75,9 @@
2223    }
2224    if (projSupervisor.fail())
2225    {
2226 -    wxString msg ("Error starting Projector supervisor: ");
2227 -    msg += projSupervisor.getFailMessage().c_str();
2228 -    msg += "\n";
2229 +    wxString msg (_T("Error starting Projector supervisor: "));
2230 +    msg += projSupervisor.getFailMessage();
2231 +    msg += _T("\n");
2232      wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2233      eventLog.SetString( msg );
2234      wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
2235 @@ -104,12 +104,12 @@
2236  
2237  ProjectorSupervisor::ProjectorSupervisor (SupervisorThread* pThread, PhantomFileView* pPhantomView, int iNDet, int iNView, int iOffsetView,
2238     const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dCenterDetectorLength,
2239 -   double dViewRatio, double dScanRatio, const char* const pszLabel)
2240 -    : BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), "Projecting", iNView),
2241 +   double dViewRatio, double dScanRatio, wxChar const* pszLabel)
2242 +  : BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), _T("Projecting"), iNView),
2243        m_pPhantomView(pPhantomView), m_pPhantomDoc(pPhantomView->GetDocument()),
2244        m_iNDet(iNDet), m_iNView(iNView), m_iOffsetView(iOffsetView), m_pszGeometry(pszGeometry), m_iNSample(iNSample),
2245        m_dRotation(dRotation), m_dFocalLength(dFocalLength), m_dCenterDetectorLength(dCenterDetectorLength),
2246 -      m_dViewRatio(dViewRatio), m_dScanRatio(dScanRatio), m_pszLabel(pszLabel)
2247 +      m_dViewRatio(dViewRatio), m_dScanRatio(dScanRatio), m_strLabel(pszLabel)
2248  {
2249    m_pScanner = new Scanner (m_pPhantomDoc->getPhantom(), m_pszGeometry, m_iNDet,
2250                    m_iNView, m_iOffsetView, m_iNSample, m_dRotation, m_dFocalLength, m_dCenterDetectorLength, m_dViewRatio, m_dScanRatio);
2251 @@ -151,12 +151,12 @@
2252    wxCriticalSectionLocker critsect (doneSection);
2253  
2254    Projections* pProjections = getProjections();
2255 -  pProjections->setRemark (m_pszLabel);
2256 +  pProjections->setRemark (m_strLabel.mb_str(wxConvUTF8));
2257    pProjections->setCalcTime (getTimerEnd());
2258  
2259    wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2260 -  wxString msg (m_pszLabel);
2261 -  msg += "\n";
2262 +  wxString msg (m_strLabel);
2263 +  msg += _T("\n");
2264    eventLog.SetString( msg );
2265    wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
2266  
2267 @@ -218,12 +218,12 @@
2268  {
2269    const Phantom& rPhantom = m_pPhantomView->GetDocument()->getPhantom();
2270    bool bFail = m_pScanner->fail();
2271 -  std::string failMsg;
2272 +  wxString failMsg;
2273    if (bFail) {
2274 -      failMsg = "Unable to make Projector: ";
2275 -      failMsg += m_pScanner->failMessage().c_str();
2276 +    failMsg = _T("Unable to make Projector: ");
2277 +    failMsg += wxConvUTF8.cMB2WX(m_pScanner->failMessage().c_str());
2278        wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2279 -      event.SetString( failMsg.c_str() );
2280 +    event.SetString( failMsg );
2281        wxPostEvent( theApp->getMainFrame(), event );
2282    }
2283    else
2284 @@ -234,7 +234,7 @@
2285  #ifdef DEBUG
2286          if (theApp->getVerboseLogging()) {
2287            wxString msg;
2288 -          msg.Printf("Worker thread: Received destroy message at work unit #%d\n", iUnit);
2289 +          msg.Printf(_T("Worker thread: Received destroy message at work unit #%d\n"), iUnit);
2290            wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2291            event.SetString( msg );
2292            wxPostEvent( theApp->getMainFrame(), event );
2293 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
2294 --- ctsim/src/threadproj.h      2007-09-04 00:40:08.000000000 -0600
2295 +++ ctsim-wx2.8/src/threadproj.h        2008-07-21 10:08:10.944318442 -0600
2296 @@ -56,12 +56,12 @@
2297    const double m_dCenterDetectorLength;
2298    const double m_dViewRatio;
2299    const double m_dScanRatio;
2300 -  const std::string m_strLabel;
2301 +  const wxString m_strLabel;
2302  
2303  public:
2304    ProjectorSupervisorThread(PhantomFileView* pProjView, int iNDet, int iNView, int iOffsetView,
2305     const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dCenterDetectorLength,
2306 -   double dViewRatio, double dScanRatio, const char* const pszLabel);
2307 +   double dViewRatio, double dScanRatio, wxChar const* strLabel);
2308  
2309    virtual wxThread::ExitCode Entry();
2310  
2311 @@ -88,13 +88,13 @@
2312    const double m_dCenterDetectorLength;
2313    const double m_dViewRatio;
2314    const double m_dScanRatio;
2315 -  const char* const m_pszLabel;
2316 +  const wxString m_strLabel;
2317  
2318  
2319  public:
2320     ProjectorSupervisor (SupervisorThread* pThread, PhantomFileView* pProjView, int iNDet, int iNView,  int iOffsetView,
2321     const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dCenterDetectorLength,
2322 -   double dViewRatio, double dScanRatio, const char* const pszLabel);
2323 +   double dViewRatio, double dScanRatio, wxChar const* pszLabel);
2324  
2325     virtual BackgroundWorkerThread* createWorker (int iThread, int iStartUnit, int iNumUnits);
2326  
2327 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
2328 --- ctsim/src/threadraster.cpp  2007-09-04 00:40:08.000000000 -0600
2329 +++ ctsim-wx2.8/src/threadraster.cpp    2008-07-21 10:08:10.948318688 -0600
2330 @@ -57,7 +57,7 @@
2331  /////////////////////////////////////////////////////////////////////
2332  
2333  RasterizerSupervisorThread::RasterizerSupervisorThread (PhantomFileView* pProjView, int iNX, int iNY,
2334 -                                                        int iNSample, double dViewRatio, const char* const pszLabel)
2335 +                                                        int iNSample, double dViewRatio, wxChar const* pszLabel)
2336                                                          :   SupervisorThread(), m_pPhantomView(pProjView), m_iNX(iNX), m_iNY(iNY), m_iNSample(iNSample), m_dViewRatio(dViewRatio), m_strLabel(pszLabel)
2337  {
2338  }
2339 @@ -65,7 +65,7 @@
2340  wxThread::ExitCode
2341  RasterizerSupervisorThread::Entry()
2342  {
2343 -  RasterizerSupervisor rasterSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel.c_str());
2344 +  RasterizerSupervisor rasterSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel);
2345  
2346    rasterSupervisor.start();
2347  
2348 @@ -75,9 +75,9 @@
2349  
2350    if (rasterSupervisor.fail())
2351    {
2352 -    wxString msg ("Error starting Rasterizer supervisor: ");
2353 -    msg += rasterSupervisor.getFailMessage().c_str();
2354 -    msg += "\n";
2355 +    wxString msg (_T("Error starting Rasterizer supervisor: "));
2356 +    msg += rasterSupervisor.getFailMessage();
2357 +    msg += _T("\n");
2358      wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2359      eventLog.SetString( msg );
2360      wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
2361 @@ -103,10 +103,10 @@
2362  /////////////////////////////////////////////////////////////////////
2363  
2364  RasterizerSupervisor::RasterizerSupervisor (SupervisorThread* pThread, PhantomFileView* pPhantomView, int iNX, int iNY,
2365 -                                            int iNSample, double dViewRatio, const char* const pszLabel)
2366 -                                            : BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), "Rasterizing", iNX),
2367 +                                            int iNSample, double dViewRatio, wxChar const* pszLabel)
2368 +  : BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), _T("Rasterizing"), iNX),
2369                                              m_pPhantomView(pPhantomView), m_pPhantomDoc(pPhantomView->GetDocument()),
2370 -                                            m_iNX(iNX), m_iNY(iNY), m_iNSample(iNSample), m_dViewRatio(dViewRatio), m_pszLabel(pszLabel)
2371 +                                            m_iNX(iNX), m_iNY(iNY), m_iNSample(iNSample), m_dViewRatio(dViewRatio), m_strLabel(pszLabel)
2372  {
2373    m_vecpChildImageFiles.reserve (getNumWorkers());
2374    for (int iThread = 0; iThread < getNumWorkers(); iThread++) {
2375 @@ -137,11 +137,11 @@
2376    wxCriticalSectionLocker critsect (doneSection);
2377  
2378    ImageFile* pImageFile = getImageFile();
2379 -  pImageFile->labelAdd (m_pszLabel, getTimerEnd());
2380 +  pImageFile->labelAdd (m_strLabel.mb_str(wxConvUTF8), getTimerEnd());
2381  
2382    wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2383 -  wxString msg (m_pszLabel);
2384 -  msg += "\n";
2385 +  wxString msg (m_strLabel);
2386 +  msg += _T("\n");
2387    eventLog.SetString( msg );
2388    wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
2389  
2390 @@ -199,7 +199,7 @@
2391  #ifdef DEBUG
2392        if (theApp->getVerboseLogging()) {
2393          wxString msg;
2394 -        msg.Printf("Worker thread: Received destroy message at work unit #%d\n", iUnit);
2395 +        msg.Printf(_T("Worker thread: Received destroy message at work unit #%d\n"), iUnit);
2396          wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2397          event.SetString( msg );
2398          wxPostEvent( theApp->getMainFrame(), event );
2399 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
2400 --- ctsim/src/threadraster.h    2007-09-04 00:40:08.000000000 -0600
2401 +++ ctsim-wx2.8/src/threadraster.h      2008-07-21 10:08:10.956319178 -0600
2402 @@ -50,10 +50,10 @@
2403    const int m_iNY;
2404    const int m_iNSample;
2405    const double m_dViewRatio;
2406 -  const std::string m_strLabel;
2407 +  const wxString m_strLabel;
2408  
2409  public:
2410 -  RasterizerSupervisorThread(PhantomFileView* pProjView, int iNX, int iNY, int iNSample, double dViewRatio, const char* const pszLabel);
2411 +  RasterizerSupervisorThread(PhantomFileView* pProjView, int iNX, int iNY, int iNSample, double dViewRatio, wxChar const* strLabel);
2412  
2413    virtual wxThread::ExitCode Entry();
2414    virtual void OnExit();
2415 @@ -72,12 +72,12 @@
2416    const int m_iNY;
2417    const int m_iNSample;
2418    const double m_dViewRatio;
2419 -  const char* const m_pszLabel;
2420 +  const wxString m_strLabel;
2421  
2422  
2423  public:
2424     RasterizerSupervisor (SupervisorThread* pThread, PhantomFileView* pProjView, int iNX, int iNY,
2425 -   int iNSample, double dViewRatio, const char* const pszLabel);
2426 +   int iNSample, double dViewRatio, wxChar const* pszLabel);
2427  
2428     virtual BackgroundWorkerThread* createWorker (int iThread, int iStartUnit, int iNumUnits);
2429  
2430 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
2431 --- ctsim/src/threadrecon.cpp   2007-09-04 00:40:08.000000000 -0600
2432 +++ ctsim-wx2.8/src/threadrecon.cpp     2008-07-21 10:08:10.956319178 -0600
2433 @@ -54,7 +54,7 @@
2434  ReconstructorSupervisorThread::ReconstructorSupervisorThread (ProjectionFileView* pProjView, int iNX, int iNY,
2435     const char* pszFilterName, double dFilterParam, const char* pszFilterMethod, int iZeropad,
2436     const char* pszFilterGenerationName, const char* pszInterpName, int iInterpParam,
2437 -   const char* pszBackprojectName, const char* const pszLabel, ReconstructionROI* pROI, bool bRebinToParallel)
2438 +   const char* pszBackprojectName, wxChar const* pszLabel, ReconstructionROI* pROI, bool bRebinToParallel)
2439  :   SupervisorThread(), m_pProjView(pProjView), m_iNX(iNX), m_iNY(iNY), m_strFilterName(pszFilterName), m_dFilterParam(dFilterParam),
2440    m_strFilterMethod(pszFilterMethod), m_iZeropad(iZeropad), m_strFilterGenerationName(pszFilterGenerationName),
2441    m_strInterpName(pszInterpName), m_iInterpParam(iInterpParam), m_strBackprojectName(pszBackprojectName),
2442 @@ -72,7 +72,7 @@
2443  
2444    ReconstructorSupervisor reconSupervisor (this, pProj, m_pProjView, m_iNX, m_iNY,
2445     m_strFilterName.c_str(), m_dFilterParam, m_strFilterMethod.c_str(), m_iZeropad, m_strFilterGenerationName.c_str(),
2446 -   m_strInterpName.c_str(), m_iInterpParam, m_strBackprojectName.c_str(), m_strLabel.c_str(), &m_reconROI);
2447 +   m_strInterpName.c_str(), m_iInterpParam, m_strBackprojectName.c_str(), m_strLabel, &m_reconROI);
2448  
2449    reconSupervisor.start();
2450    while (! reconSupervisor.workersDone() && ! reconSupervisor.fail() && ! reconSupervisor.cancelled()) {
2451 @@ -80,9 +80,9 @@
2452    }
2453    if (reconSupervisor.fail())
2454    {
2455 -    wxString msg ("Error starting reconstructor supervisor: ");
2456 -    msg += reconSupervisor.getFailMessage().c_str();
2457 -    msg += "\n";
2458 +    wxString msg (_T("Error starting reconstructor supervisor: "));
2459 +    msg += reconSupervisor.getFailMessage();
2460 +    msg += _T("\n");
2461      wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2462      eventLog.SetString( msg );
2463      wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
2464 @@ -112,14 +112,16 @@
2465  ReconstructorSupervisor::ReconstructorSupervisor (SupervisorThread* pThread, Projections* pProj,
2466    ProjectionFileView* pProjView, int iImageNX, int iImageNY, const char* pszFilterName, double dFilterParam,
2467    const char* pszFilterMethod, int iZeropad, const char* pszFilterGenerationName,
2468 -  const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, const char* const pszLabel,
2469 +  const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, wxChar const* pszLabel,
2470    ReconstructionROI* pROI)
2471 -    : BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(), "Reconstructing", pProjView->GetDocument()->getProjections().nView()),
2472 +    : BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(),
2473 +                            _T("Reconstructing"), 
2474 +                            pProjView->GetDocument()->getProjections().nView()),
2475        m_pProj(pProj), m_pProjView(pProjView), m_pProjDoc(pProjView->GetDocument()),
2476        m_iImageNX(iImageNX), m_iImageNY(iImageNY),
2477        m_pszFilterName(pszFilterName), m_dFilterParam(dFilterParam), m_pszFilterMethod(pszFilterMethod),
2478        m_iZeropad(iZeropad), m_pszFilterGenerationName(pszFilterGenerationName), m_pszInterpName(pszInterpName),
2479 -      m_iInterpParam(iInterpParam), m_pszBackprojectName(pszBackprojectName), m_pszLabel(pszLabel),
2480 +      m_iInterpParam(iInterpParam), m_pszBackprojectName(pszBackprojectName), m_strLabel(pszLabel),
2481        m_pReconROI(pROI)
2482  {
2483    m_vecpChildImageFile.reserve (getNumWorkers());
2484 @@ -156,11 +158,11 @@
2485  
2486    ImageFile* pImageFile = getImageFile();
2487    pImageFile->labelAdd (m_pProj->getLabel());
2488 -  pImageFile->labelAdd (m_pszLabel, getTimerEnd());
2489 +  pImageFile->labelAdd (m_strLabel.mb_str(wxConvUTF8), getTimerEnd());
2490  
2491    wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2492 -  wxString msg (m_pszLabel);
2493 -  msg += "\n";
2494 +  wxString msg (m_strLabel);
2495 +  msg += _T("\n");
2496    eventLog.SetString( msg );
2497    wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
2498  
2499 @@ -225,12 +227,12 @@
2500      m_iInterpParam, m_pszBackprojectName, Trace::TRACE_NONE, m_pReconROI, false);
2501  
2502    bool bFail = pReconstructor->fail();
2503 -  std::string failMsg;
2504 +  wxString failMsg;
2505    if (bFail) {
2506 -      failMsg = "Unable to make reconstructor: ";
2507 -      failMsg += pReconstructor->failMessage().c_str();
2508 +    failMsg = _T("Unable to make reconstructor: ");
2509 +    failMsg += wxConvUTF8.cMB2WX(pReconstructor->failMessage().c_str());
2510        wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2511 -      event.SetString( failMsg.c_str() );
2512 +    event.SetString( failMsg );
2513        wxPostEvent( theApp->getMainFrame(), event );
2514    }
2515    else
2516 @@ -241,7 +243,7 @@
2517  #ifdef DEBUG
2518          if (theApp->getVerboseLogging()) {
2519            wxString msg;
2520 -          msg.Printf("Worker thread: Received destroy message at work unit #%d\n", iUnit);
2521 +          msg.Printf(_T("Worker thread: Received destroy message at work unit #%d\n"), iUnit);
2522            wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
2523            event.SetString( msg );
2524            wxPostEvent( theApp->getMainFrame(), event );
2525 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
2526 --- ctsim/src/threadrecon.h     2007-09-04 00:40:08.000000000 -0600
2527 +++ ctsim-wx2.8/src/threadrecon.h       2008-07-21 10:08:10.956319178 -0600
2528 @@ -59,14 +59,14 @@
2529    const std::string m_strInterpName;
2530    const int m_iInterpParam;
2531    const std::string m_strBackprojectName;
2532 -  const std::string m_strLabel;
2533 +  const wxString m_strLabel;
2534    ReconstructionROI m_reconROI;
2535    const bool m_bRebinToParallel;
2536  
2537  public:
2538    ReconstructorSupervisorThread(ProjectionFileView* pProjView, int iNX, int iNY, const char* pszFilterName,
2539     double dFilterParam, const char* pszFilterMethod, int iZeropad, const char* pszFilterGenerationName,
2540 -   const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, const char* const pszLabel,
2541 +   const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, wxChar const* pszLabel,
2542     ReconstructionROI* pROI, bool bRebinToParallel);
2543  
2544    virtual wxThread::ExitCode Entry();
2545 @@ -95,14 +95,14 @@
2546    const char* const m_pszInterpName;
2547    const int m_iInterpParam;
2548    const char* const m_pszBackprojectName;
2549 -  const char* const m_pszLabel;
2550 +  const wxString m_strLabel;
2551    ReconstructionROI* m_pReconROI;
2552  
2553  public:
2554     ReconstructorSupervisor (SupervisorThread* pMyThread, Projections* pProj, ProjectionFileView* pProjView,
2555     int iNX, int iNY, const char* pszFilterName, double dFilterParam, const char* pszFilterMethod, int iZeropad,
2556     const char* pszFilterGenerationName, const char* pszInterpName, int iInterpParam,
2557 -   const char* pszBackprojectName, const char* const pszLabel, ReconstructionROI* pReconROI);
2558 +   const char* pszBackprojectName, wxChar const* pszLabel, ReconstructionROI* pReconROI);
2559  
2560     virtual BackgroundWorkerThread* createWorker (int iThread, int iStartUnit, int iNumUnits);
2561  
2562 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
2563 --- ctsim/src/tips.cpp  2007-09-04 00:40:08.000000000 -0600
2564 +++ ctsim-wx2.8/src/tips.cpp    2008-07-21 10:08:10.964319669 -0600
2565 @@ -83,7 +83,7 @@
2566    size_t iThisTip = m_iCurrentTip;
2567    ++m_iCurrentTip;
2568  
2569 -  return wxString (s_aszTips[iThisTip]);
2570 +  return wxString (wxConvUTF8.cMB2WX(s_aszTips[iThisTip]));
2571  }
2572  
2573  size_t
2574 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
2575 --- ctsim/src/views.cpp 2007-09-04 00:40:08.000000000 -0600
2576 +++ ctsim-wx2.8/src/views.cpp   2008-07-29 20:38:45.351315859 -0600
2577 @@ -133,20 +133,21 @@
2578    const int yPt = ny - 1 - pt.y;
2579    if (event.RightIsDown()) {
2580      if (pt.x >= 0 && pt.x < nx && pt.y >= 0 && pt.y < ny) {
2581 -      std::ostringstream os;
2582 -      os << "Image value (" << pt.x << "," << yPt << ") = " << v[pt.x][yPt];
2583 +      wxString os;
2584 +      os << _T("Image value (") << pt.x << _T(",") << yPt << _T(") = ")
2585 +         << v[pt.x][yPt];
2586        if (rIF.isComplex()) {
2587          double dImag = rIF.getImaginaryArray()[pt.x][yPt];
2588          if (dImag < 0)
2589 -          os << " - " << -dImag;
2590 +          os << _T(" - ") << -dImag;
2591          else
2592 -          os << " + " << dImag;
2593 -        os << "i\n";
2594 +          os << _T(" + ") << dImag;
2595 +        os << _T("i\n");
2596        } else
2597 -        os << "\n";
2598 -      *theApp->getLog() << os.str().c_str();
2599 +        os << _T("\n");
2600 +      *theApp->getLog() << os;
2601      } else
2602 -      *theApp->getLog() << "Mouse out of image range (" << pt.x << "," << yPt << ")\n";
2603 +      *theApp->getLog() << _T("Mouse out of image range (") << pt.x << _T(",") << yPt << _T(")\n");
2604    }
2605    else if (event.LeftIsDown() || event.LeftUp() || event.RightUp()) {
2606      if (pt.x >= 0 && pt.x < nx && pt.y >= 0 && pt.y < ny) {
2607 @@ -166,12 +167,12 @@
2608          pMenu->Enable (IFMENU_PLOT_FFT_COL, true);
2609        }
2610      } else
2611 -      *theApp->getLog() << "Mouse out of image range (" << pt.x << "," << yPt << ")\n";
2612 +      *theApp->getLog() << _T("Mouse out of image range (") << pt.x << _T(",") << yPt << _T(")\n");
2613    }
2614    if (event.LeftUp()) {
2615 -    std::ostringstream os;
2616 -    os << "Selected column " << pt.x << " , row " << yPt << "\n";
2617 -    *theApp->getLog() << os.str().c_str();
2618 +    wxString os;
2619 +    os << _T("Selected column ") << pt.x << _T(" , row ") << yPt << _T("\n");
2620 +    *theApp->getLog() << os;
2621    }
2622  }
2623  
2624 @@ -276,7 +277,7 @@
2625  ImageFileView::~ImageFileView()
2626  {
2627    GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
2628 -  GetDocumentManager()->ActivateView(this, FALSE, TRUE);
2629 +  GetDocumentManager()->ActivateView(this, FALSE);
2630  }
2631  
2632  
2633 @@ -285,9 +286,9 @@
2634  {
2635    const ImageFile& rIF = GetDocument()->getImageFile();
2636    if (rIF.nx() == 0 || rIF.ny() == 0)
2637 -    *theApp->getLog() << "Properties: empty imagefile\n";
2638 +    *theApp->getLog() << _T("Properties: empty imagefile\n");
2639    else {
2640 -    const std::string rFilename = m_pFrame->GetTitle().c_str();
2641 +    const std::string rFilename (m_pFrame->GetTitle().mb_str(wxConvUTF8));
2642      std::ostringstream os;
2643      double min, max, mean, mode, median, stddev;
2644      rIF.statistics (rIF.getArray(), min, max, mean, mode, median, stddev);
2645 @@ -306,8 +307,8 @@
2646      if (rIF.nLabels() > 0) {
2647        rIF.printLabelsBrief (os);
2648      }
2649 -    *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
2650 -    wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), "Imagefile Properties", wxOK | wxICON_INFORMATION);
2651 +    *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<\n");
2652 +    wxMessageDialog dialogMsg (getFrameForChild(), wxConvUTF8.cMB2WX(os.str().c_str()), _T("Imagefile Properties"), wxOK | wxICON_INFORMATION);
2653      dialogMsg.ShowModal();
2654    }
2655    GetDocument()->Activate();
2656 @@ -349,7 +350,7 @@
2657    if (m_bMaxSpecified)
2658      max = m_dMaxPixel;
2659  
2660 -  DialogGetMinMax dialogMinMax (getFrameForChild(), "Set Image Minimum & Maximum", min, max);
2661 +  DialogGetMinMax dialogMinMax (getFrameForChild(), _T("Set Image Minimum & Maximum"), min, max);
2662    int retVal = dialogMinMax.ShowModal();
2663    if (retVal == wxID_OK) {
2664      m_bMinSpecified = true;
2665 @@ -381,9 +382,9 @@
2666    theApp->getCompatibleImages (GetDocument(), vecIF);
2667  
2668    if (vecIF.size() == 0) {
2669 -    wxMessageBox("There are no compatible image files open for comparision", "No comparison images");
2670 +    wxMessageBox(_T("There are no compatible image files open for comparision"), _T("No comparison images"));
2671    } else {
2672 -    DialogGetComparisonImage dialogGetCompare(getFrameForChild(), "Get Comparison Image", vecIF, true);
2673 +    DialogGetComparisonImage dialogGetCompare(getFrameForChild(), _T("Get Comparison Image"), vecIF, true);
2674  
2675      if (dialogGetCompare.ShowModal() == wxID_OK) {
2676        const ImageFile& rIF = GetDocument()->getImageFile();
2677 @@ -392,19 +393,19 @@
2678        std::ostringstream os;
2679        double min, max, mean, mode, median, stddev;
2680        rIF.statistics (min, max, mean, mode, median, stddev);
2681 -      os << GetFrame()->GetTitle().c_str() << ": minimum=" << min << ", maximum=" << max << ", mean=" << mean << ", mode=" << mode << ", median=" << median << ", stddev=" << stddev << "\n";
2682 +      os << m_pFrame->GetTitle().mb_str(wxConvUTF8) << ": minimum=" << min << ", maximum=" << max << ", mean=" << mean << ", mode=" << mode << ", median=" << median << ", stddev=" << stddev << "\n";
2683        rCompareIF.statistics (min, max, mean, mode, median, stddev);
2684 -      os << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str() << ": minimum=" << min << ", maximum=" << max << ", mean=" << mean << ", mode=" << mode << ", median=" << median << ", stddev=" << stddev << "\n";
2685 +      os << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << ": minimum=" << min << ", maximum=" << max << ", mean=" << mean << ", mode=" << mode << ", median=" << median << ", stddev=" << stddev << "\n";
2686        double d, r, e;
2687        rIF.comparativeStatistics (rCompareIF, d, r, e);
2688        os << "Comparative Statistics: d=" << d << ", r=" << r << ", e=" << e << "\n";
2689 -      *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
2690 +      *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<\n");
2691        if (dialogGetCompare.getMakeDifferenceImage()) {
2692          ImageFile* pDifferenceImage = new ImageFile;
2693  
2694          pDifferenceImage->setArraySize (rIF.nx(), rIF.ny());
2695          if (! rIF.subtractImages (rCompareIF, *pDifferenceImage)) {
2696 -          *theApp->getLog() << "Unable to subtract images\n";
2697 +          *theApp->getLog() << _T("Unable to subtract images\n");
2698            delete pDifferenceImage;
2699            return;
2700          }
2701 @@ -415,13 +416,13 @@
2702          }
2703          pDifferenceDoc->setImageFile (pDifferenceImage);
2704  
2705 -        wxString s = GetFrame()->GetTitle() + ": ";
2706 -        pDifferenceImage->labelsCopy (rIF, s.c_str());
2707 -        s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
2708 -        pDifferenceImage->labelsCopy (rCompareIF, s.c_str());
2709 +        wxString s = m_pFrame->GetTitle() + _T(": ");
2710 +        pDifferenceImage->labelsCopy (rIF, s.mb_str(wxConvUTF8));
2711 +        s = dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2712 +        pDifferenceImage->labelsCopy (rCompareIF, s.mb_str(wxConvUTF8));
2713          std::ostringstream osLabel;
2714 -        osLabel << "Compare image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str()
2715 -          << " and " << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str() << ": "
2716 +        osLabel << "Compare image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str()
2717 +                << " and " << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().c_str() << ": "
2718            << os.str().c_str();
2719          pDifferenceImage->labelAdd (os.str().c_str());
2720          if (theApp->getAskDeleteNewDocs())
2721 @@ -431,7 +432,7 @@
2722          pDifferenceDoc->getView()->setInitialClientSize();
2723          pDifferenceDoc->Activate();
2724        }
2725 -      wxMessageBox(os.str().c_str(), "Image Comparison");
2726 +      wxMessageBox(wxConvUTF8.cMB2WX(os.str().c_str()), _T("Image Comparison"));
2727      }
2728    }
2729  }
2730 @@ -508,9 +509,9 @@
2731    theApp->getCompatibleImages (GetDocument(), vecIF);
2732  
2733    if (vecIF.size() == 0) {
2734 -    wxMessageBox ("There are no compatible image files open for comparision", "No comparison images");
2735 +    wxMessageBox (_T("There are no compatible image files open for comparision"), _T("No comparison images"));
2736    } else {
2737 -    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Image to Add", vecIF, false);
2738 +    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Image to Add"), vecIF, false);
2739  
2740      if (dialogGetCompare.ShowModal() == wxID_OK) {
2741        ImageFile& rIF = GetDocument()->getImageFile();
2742 @@ -525,14 +526,14 @@
2743        newImage.setArraySize (rIF.nx(), rIF.ny());
2744        rIF.addImages (rRHSIF, newImage);
2745        std::ostringstream os;
2746 -      os << "Add image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
2747 -        << pRHSDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
2748 -      wxString s = GetDocument()->GetFirstView()->GetFrame()->GetTitle() + ": ";
2749 -      newImage.labelsCopy (rIF, s.c_str());
2750 -      s = pRHSDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
2751 -      newImage.labelsCopy (rRHSIF, s.c_str());
2752 +      os << "Add image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
2753 +         << dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
2754 +      wxString s = dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2755 +      newImage.labelsCopy (rIF, s.mb_str(wxConvUTF8));
2756 +      s = dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2757 +      newImage.labelsCopy (rRHSIF, s.mb_str(wxConvUTF8));
2758        newImage.labelAdd (os.str().c_str());
2759 -      *theApp->getLog() << os.str().c_str() << "\n";
2760 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
2761        if (theApp->getAskDeleteNewDocs())
2762          pNewDoc->Modify (true);
2763        OnUpdate(this, NULL);
2764 @@ -550,9 +551,9 @@
2765    theApp->getCompatibleImages (GetDocument(), vecIF);
2766  
2767    if (vecIF.size() == 0) {
2768 -    wxMessageBox ("There are no compatible image files open for comparision", "No comparison images");
2769 +    wxMessageBox (_T("There are no compatible image files open for comparision"), _T("No comparison images"));
2770    } else {
2771 -    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Image to Subtract", vecIF, false);
2772 +    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Image to Subtract"), vecIF, false);
2773  
2774      if (dialogGetCompare.ShowModal() == wxID_OK) {
2775        ImageFile& rIF = GetDocument()->getImageFile();
2776 @@ -567,14 +568,14 @@
2777        newImage.setArraySize (rIF.nx(), rIF.ny());
2778        rIF.subtractImages (rRHSIF, newImage);
2779        std::ostringstream os;
2780 -      os << "Subtract image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
2781 -        << pRHSDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
2782 -      wxString s = GetDocument()->GetFirstView()->GetFrame()->GetTitle() + ": ";
2783 -      newImage.labelsCopy (rIF, s.c_str());
2784 -      s = pRHSDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
2785 -      newImage.labelsCopy (rRHSIF, s.c_str());
2786 +      os << "Subtract image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
2787 +         << dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
2788 +      wxString s = dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2789 +      newImage.labelsCopy (rIF, s.mb_str(wxConvUTF8));
2790 +      s = dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2791 +      newImage.labelsCopy (rRHSIF, s.mb_str(wxConvUTF8));
2792        newImage.labelAdd (os.str().c_str());
2793 -      *theApp->getLog() << os.str().c_str() << "\n";
2794 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
2795        if (theApp->getAskDeleteNewDocs())
2796          pNewDoc->Modify (true);
2797        OnUpdate(this, NULL);
2798 @@ -592,9 +593,9 @@
2799    theApp->getCompatibleImages (GetDocument(), vecIF);
2800  
2801    if (vecIF.size() == 0) {
2802 -    wxMessageBox ("There are no compatible image files open for comparision", "No comparison images");
2803 +    wxMessageBox (_T("There are no compatible image files open for comparision"), _T("No comparison images"));
2804    } else {
2805 -    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Image to Multiply", vecIF, false);
2806 +    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Image to Multiply"), vecIF, false);
2807  
2808      if (dialogGetCompare.ShowModal() == wxID_OK) {
2809        ImageFile& rIF = GetDocument()->getImageFile();
2810 @@ -609,14 +610,14 @@
2811        newImage.setArraySize (rIF.nx(), rIF.ny());
2812        rIF.multiplyImages (rRHSIF, newImage);
2813        std::ostringstream os;
2814 -      os << "Multiply image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
2815 -        << pRHSDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
2816 -      wxString s = GetDocument()->GetFirstView()->GetFrame()->GetTitle() + ": ";
2817 -      newImage.labelsCopy (rIF, s.c_str());
2818 -      s = pRHSDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
2819 -      newImage.labelsCopy (rRHSIF, s.c_str());
2820 +      os << "Multiply image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
2821 +         << dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
2822 +      wxString s = dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2823 +      newImage.labelsCopy (rIF, s.mb_str(wxConvUTF8));
2824 +      s = dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2825 +      newImage.labelsCopy (rRHSIF, s.mb_str(wxConvUTF8));
2826        newImage.labelAdd (os.str().c_str());
2827 -      *theApp->getLog() << os.str().c_str() << "\n";
2828 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
2829        if (theApp->getAskDeleteNewDocs())
2830          pNewDoc->Modify (true);
2831        OnUpdate(this, NULL);
2832 @@ -634,9 +635,9 @@
2833    theApp->getCompatibleImages (GetDocument(), vecIF);
2834  
2835    if (vecIF.size() == 0) {
2836 -    wxMessageBox ("There are no compatible image files open for comparision", "No comparison images");
2837 +    wxMessageBox (_T("There are no compatible image files open for comparision"), _T("No comparison images"));
2838    } else {
2839 -    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Image to Divide", vecIF, false);
2840 +    DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Image to Divide"), vecIF, false);
2841  
2842      if (dialogGetCompare.ShowModal() == wxID_OK) {
2843        ImageFile& rIF = GetDocument()->getImageFile();
2844 @@ -651,14 +652,14 @@
2845        newImage.setArraySize (rIF.nx(), rIF.ny());
2846        rIF.divideImages (rRHSIF, newImage);
2847        std::ostringstream os;
2848 -      os << "Divide image " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " by "
2849 -        << pRHSDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
2850 -      wxString s = GetDocument()->GetFirstView()->GetFrame()->GetTitle() + ": ";
2851 -      newImage.labelsCopy (rIF, s.c_str());
2852 -      s = pRHSDoc->GetFirstView()->GetFrame()->GetTitle() + ": ";
2853 -      newImage.labelsCopy (rRHSIF, s.c_str());
2854 +      os << "Divide image " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " by "
2855 +         << dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
2856 +      wxString s = dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2857 +      newImage.labelsCopy (rIF, s.mb_str(wxConvUTF8));
2858 +      s = dynamic_cast<wxFrame*>(pRHSDoc->GetFirstView()->GetFrame())->GetTitle() + _T(": ");
2859 +      newImage.labelsCopy (rRHSIF, s.mb_str(wxConvUTF8));
2860        newImage.labelAdd (os.str().c_str());
2861 -      *theApp->getLog() << os.str().c_str() << "\n";
2862 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
2863        if (theApp->getAskDeleteNewDocs())
2864          pNewDoc->Modify (true);
2865        OnUpdate(this, NULL);
2866 @@ -766,7 +767,7 @@
2867  ImageFileView::OnFourier (wxCommandEvent& event)
2868  {
2869    ImageFile& rIF = GetDocument()->getImageFile();
2870 -  wxProgressDialog dlgProgress (wxString("Fourier"), wxString("Fourier Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
2871 +  wxProgressDialog dlgProgress (_T("Fourier"), _T("Fourier Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
2872    rIF.fourier (rIF);
2873    rIF.labelAdd ("Fourier Image");
2874    m_bMinSpecified = false;
2875 @@ -782,7 +783,7 @@
2876  ImageFileView::OnInverseFourier (wxCommandEvent& event)
2877  {
2878    ImageFile& rIF = GetDocument()->getImageFile();
2879 -  wxProgressDialog dlgProgress (wxString("Inverse Fourier"), wxString("Inverse Fourier Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
2880 +  wxProgressDialog dlgProgress (_T("Inverse Fourier"), _T("Inverse Fourier Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
2881    rIF.inverseFourier (rIF);
2882    rIF.labelAdd ("Inverse Fourier Image");
2883    m_bMinSpecified = false;
2884 @@ -897,7 +898,7 @@
2885    ImageFileCanvas* pCanvas = new ImageFileCanvas (this, parent, wxPoint(-1,-1),
2886                                                    wxSize(-1,-1), 0);
2887    pCanvas->SetBackgroundColour(*wxWHITE);
2888 -  pCanvas->Clear();
2889 +  pCanvas->ClearBackground();
2890  
2891    return pCanvas;
2892  }
2893 @@ -910,97 +911,97 @@
2894  ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
2895  {
2896  #if CTSIM_MDI
2897 -  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
2898 +  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("ImageFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
2899  #else
2900 -  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
2901 +  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("ImageFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
2902  #endif
2903    theApp->setIconForFrame (subframe);
2904  
2905    m_pFileMenu = new wxMenu;
2906 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
2907 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
2908 -  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
2909 -  m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
2910 -  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
2911 -  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
2912 -  m_pFileMenu->Append(wxID_REVERT, "Re&vert");
2913 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
2914 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
2915 +  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
2916 +  m_pFileMenu->Append(wxID_SAVE, _T("&Save\tCtrl-S"));
2917 +  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
2918 +  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
2919 +  m_pFileMenu->Append(wxID_REVERT, _T("Re&vert"));
2920  
2921    m_pFileMenu->AppendSeparator();
2922 -  m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, "P&roperties\tCtrl-I");
2923 -  m_pFileMenu->Append(IFMENU_FILE_EXPORT, "Expor&t...");
2924 +  m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, _T("P&roperties\tCtrl-I"));
2925 +  m_pFileMenu->Append(IFMENU_FILE_EXPORT, _T("Expor&t..."));
2926  
2927    m_pFileMenu->AppendSeparator();
2928 -  m_pFileMenu->Append(wxID_PRINT, "&Print...");
2929 -  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
2930 -  m_pFileMenu->Append(wxID_PREVIEW, "Print Preview");
2931 +  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
2932 +  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
2933 +  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Preview"));
2934    m_pFileMenu->AppendSeparator();
2935 -  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
2936 +  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
2937    m_pFileMenu->AppendSeparator();
2938 -  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
2939 -  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
2940 +  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
2941 +  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
2942    GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
2943    GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
2944  
2945    wxMenu* edit_menu = new wxMenu;
2946 -  edit_menu->Append(IFMENU_EDIT_COPY, "Copy\tCtrl-C");
2947 -  edit_menu->Append(IFMENU_EDIT_CUT, "Cut\tCtrl-X");
2948 -  edit_menu->Append(IFMENU_EDIT_PASTE, "Paste\tCtrl-V");
2949 +  edit_menu->Append(IFMENU_EDIT_COPY, _T("Copy\tCtrl-C"));
2950 +  edit_menu->Append(IFMENU_EDIT_CUT, _T("Cut\tCtrl-X"));
2951 +  edit_menu->Append(IFMENU_EDIT_PASTE, _T("Paste\tCtrl-V"));
2952  
2953    wxMenu *view_menu = new wxMenu;
2954 -  view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, "Display Scale S&et...\tCtrl-E");
2955 -  view_menu->Append(IFMENU_VIEW_SCALE_AUTO, "Display Scale &Auto...\tCtrl-A");
2956 -  view_menu->Append(IFMENU_VIEW_SCALE_FULL, "Display F&ull Scale\tCtrl-U");
2957 +  view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, _T("Display Scale S&et...\tCtrl-E"));
2958 +  view_menu->Append(IFMENU_VIEW_SCALE_AUTO, _T("Display Scale &Auto...\tCtrl-A"));
2959 +  view_menu->Append(IFMENU_VIEW_SCALE_FULL, _T("Display F&ull Scale\tCtrl-U"));
2960  
2961    m_pFilterMenu = new wxMenu;
2962 -  m_pFilterMenu->Append (IFMENU_FILTER_INVERTVALUES, "In&vert Values");
2963 -  m_pFilterMenu->Append (IFMENU_FILTER_SQUARE, "&Square");
2964 -  m_pFilterMenu->Append (IFMENU_FILTER_SQRT, "Square &Root");
2965 -  m_pFilterMenu->Append (IFMENU_FILTER_LOG, "&Log");
2966 -  m_pFilterMenu->Append (IFMENU_FILTER_EXP, "E&xp");
2967 +  m_pFilterMenu->Append (IFMENU_FILTER_INVERTVALUES, _T("In&vert Values"));
2968 +  m_pFilterMenu->Append (IFMENU_FILTER_SQUARE, _T("&Square"));
2969 +  m_pFilterMenu->Append (IFMENU_FILTER_SQRT, _T("Square &Root"));
2970 +  m_pFilterMenu->Append (IFMENU_FILTER_LOG, _T("&Log"));
2971 +  m_pFilterMenu->Append (IFMENU_FILTER_EXP, _T("E&xp"));
2972    m_pFilterMenu->AppendSeparator();
2973  #ifdef HAVE_FFT
2974 -  m_pFilterMenu->Append (IFMENU_FILTER_FFT, "2-D &FFT\tCtrl-2");
2975 -  m_pFilterMenu->Append (IFMENU_FILTER_IFFT, "2-D &IFFT\tAlt-2");
2976 -  m_pFilterMenu->Append (IFMENU_FILTER_FFT_ROWS, "FFT Rows");
2977 -  m_pFilterMenu->Append (IFMENU_FILTER_IFFT_ROWS, "IFFT Rows");
2978 -  m_pFilterMenu->Append (IFMENU_FILTER_FFT_COLS, "FFT Columns");
2979 -  m_pFilterMenu->Append (IFMENU_FILTER_IFFT_COLS, "IFFT Columns");
2980 -  m_pFilterMenu->Append (IFMENU_FILTER_FOURIER, "2-D F&ourier");
2981 -  m_pFilterMenu->Append (IFMENU_FILTER_INVERSE_FOURIER, "2-D Inverse Fo&urier");
2982 +  m_pFilterMenu->Append (IFMENU_FILTER_FFT, _T("2-D &FFT\tCtrl-2"));
2983 +  m_pFilterMenu->Append (IFMENU_FILTER_IFFT, _T("2-D &IFFT\tAlt-2"));
2984 +  m_pFilterMenu->Append (IFMENU_FILTER_FFT_ROWS, _T("FFT Rows"));
2985 +  m_pFilterMenu->Append (IFMENU_FILTER_IFFT_ROWS, _T("IFFT Rows"));
2986 +  m_pFilterMenu->Append (IFMENU_FILTER_FFT_COLS, _T("FFT Columns"));
2987 +  m_pFilterMenu->Append (IFMENU_FILTER_IFFT_COLS, _T("IFFT Columns"));
2988 +  m_pFilterMenu->Append (IFMENU_FILTER_FOURIER, _T("2-D F&ourier"));
2989 +  m_pFilterMenu->Append (IFMENU_FILTER_INVERSE_FOURIER, _T("2-D Inverse Fo&urier"));
2990  #else
2991 -  m_pFilterMenu->Append (IFMENU_FILTER_FOURIER, "&Fourier");
2992 -  m_pFilterMenu->Append (IFMENU_FILTER_INVERSE_FOURIER, "&Inverse Fourier");
2993 +  m_pFilterMenu->Append (IFMENU_FILTER_FOURIER, _T("&Fourier"));
2994 +  m_pFilterMenu->Append (IFMENU_FILTER_INVERSE_FOURIER, _T("&Inverse Fourier"));
2995  #endif
2996 -  m_pFilterMenu->Append (IFMENU_FILTER_SHUFFLEFOURIERTONATURALORDER, "Shuffl&e Fourier to Natural Order");
2997 -  m_pFilterMenu->Append (IFMENU_FILTER_SHUFFLENATURALTOFOURIERORDER, "Shuffle &Natural to Fourier Order");
2998 +  m_pFilterMenu->Append (IFMENU_FILTER_SHUFFLEFOURIERTONATURALORDER, _T("Shuffl&e Fourier to Natural Order"));
2999 +  m_pFilterMenu->Append (IFMENU_FILTER_SHUFFLENATURALTOFOURIERORDER, _T("Shuffle &Natural to Fourier Order"));
3000    m_pFilterMenu->AppendSeparator();
3001 -  m_pFilterMenu->Append (IFMENU_FILTER_MAGNITUDE, "&Magnitude");
3002 -  m_pFilterMenu->Append (IFMENU_FILTER_PHASE, "&Phase");
3003 -  m_pFilterMenu->Append (IFMENU_FILTER_REAL, "Re&al");
3004 -  m_pFilterMenu->Append (IFMENU_FILTER_IMAGINARY, "Ima&ginary");
3005 +  m_pFilterMenu->Append (IFMENU_FILTER_MAGNITUDE, _T("&Magnitude"));
3006 +  m_pFilterMenu->Append (IFMENU_FILTER_PHASE, _T("&Phase"));
3007 +  m_pFilterMenu->Append (IFMENU_FILTER_REAL, _T("Re&al"));
3008 +  m_pFilterMenu->Append (IFMENU_FILTER_IMAGINARY, _T("Ima&ginary"));
3009  
3010    wxMenu* image_menu = new wxMenu;
3011 -  image_menu->Append (IFMENU_IMAGE_ADD, "&Add...");
3012 -  image_menu->Append (IFMENU_IMAGE_SUBTRACT, "&Subtract...");
3013 -  image_menu->Append (IFMENU_IMAGE_MULTIPLY, "&Multiply...");
3014 -  image_menu->Append (IFMENU_IMAGE_DIVIDE, "&Divide...");
3015 +  image_menu->Append (IFMENU_IMAGE_ADD, _T("&Add..."));
3016 +  image_menu->Append (IFMENU_IMAGE_SUBTRACT, _T("&Subtract..."));
3017 +  image_menu->Append (IFMENU_IMAGE_MULTIPLY, _T("&Multiply..."));
3018 +  image_menu->Append (IFMENU_IMAGE_DIVIDE, _T("&Divide..."));
3019    image_menu->AppendSeparator();
3020 -  image_menu->Append (IFMENU_IMAGE_SCALESIZE, "S&cale Size...");
3021 +  image_menu->Append (IFMENU_IMAGE_SCALESIZE, _T("S&cale Size..."));
3022  #if wxUSE_GLCANVAS
3023 -  image_menu->Append (IFMENU_IMAGE_CONVERT3D, "Convert &3-D\tCtrl-3");
3024 +  image_menu->Append (IFMENU_IMAGE_CONVERT3D, _T("Convert &3-D\tCtrl-3"));
3025  #endif
3026  
3027    m_pMenuAnalyze = new wxMenu;
3028 -  m_pMenuAnalyze->Append (IFMENU_PLOT_ROW, "Plot &Row");
3029 -  m_pMenuAnalyze->Append (IFMENU_PLOT_COL, "Plot &Column");
3030 -  m_pMenuAnalyze->Append (IFMENU_PLOT_HISTOGRAM, "Plot &Histogram");
3031 +  m_pMenuAnalyze->Append (IFMENU_PLOT_ROW, _T("Plot &Row"));
3032 +  m_pMenuAnalyze->Append (IFMENU_PLOT_COL, _T("Plot &Column"));
3033 +  m_pMenuAnalyze->Append (IFMENU_PLOT_HISTOGRAM, _T("Plot &Histogram"));
3034    m_pMenuAnalyze->AppendSeparator();
3035 -  m_pMenuAnalyze->Append (IFMENU_PLOT_FFT_ROW, "P&lot FFT Row");
3036 -  m_pMenuAnalyze->Append (IFMENU_PLOT_FFT_COL, "Plo&t FFT Column");
3037 +  m_pMenuAnalyze->Append (IFMENU_PLOT_FFT_ROW, _T("P&lot FFT Row"));
3038 +  m_pMenuAnalyze->Append (IFMENU_PLOT_FFT_COL, _T("Plo&t FFT Column"));
3039    m_pMenuAnalyze->AppendSeparator();
3040 -  m_pMenuAnalyze->Append (IFMENU_COMPARE_IMAGES, "Compare &Images...");
3041 -  m_pMenuAnalyze->Append (IFMENU_COMPARE_ROW, "Compare Ro&w");
3042 -  m_pMenuAnalyze->Append (IFMENU_COMPARE_COL, "Compare Colu&mn");
3043 +  m_pMenuAnalyze->Append (IFMENU_COMPARE_IMAGES, _T("Compare &Images..."));
3044 +  m_pMenuAnalyze->Append (IFMENU_COMPARE_ROW, _T("Compare Ro&w"));
3045 +  m_pMenuAnalyze->Append (IFMENU_COMPARE_COL, _T("Compare Colu&mn"));
3046    m_pMenuAnalyze->Enable (IFMENU_PLOT_ROW, false);
3047    m_pMenuAnalyze->Enable (IFMENU_PLOT_COL, false);
3048    m_pMenuAnalyze->Enable (IFMENU_COMPARE_ROW, false);
3049 @@ -1009,20 +1010,20 @@
3050    m_pMenuAnalyze->Enable (IFMENU_PLOT_FFT_COL, false);
3051  
3052    wxMenu *help_menu = new wxMenu;
3053 -  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
3054 -  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
3055 -  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
3056 -  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
3057 +  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
3058 +  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
3059 +  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
3060 +  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
3061  
3062    wxMenuBar *menu_bar = new wxMenuBar;
3063  
3064 -  menu_bar->Append(m_pFileMenu, "&File");
3065 -  menu_bar->Append(edit_menu, "&Edit");
3066 -  menu_bar->Append(view_menu, "&View");
3067 -  menu_bar->Append(image_menu, "&Image");
3068 -  menu_bar->Append(m_pFilterMenu, "Fi&lter");
3069 -  menu_bar->Append(m_pMenuAnalyze, "&Analyze");
3070 -  menu_bar->Append(help_menu, "&Help");
3071 +  menu_bar->Append(m_pFileMenu, _T("&File"));
3072 +  menu_bar->Append(edit_menu, _T("&Edit"));
3073 +  menu_bar->Append(view_menu, _T("&View"));
3074 +  menu_bar->Append(image_menu, _T("&Image"));
3075 +  menu_bar->Append(m_pFilterMenu, _T("Fi&lter"));
3076 +  menu_bar->Append(m_pMenuAnalyze, _T("&Analyze"));
3077 +  menu_bar->Append(help_menu, _T("&Help"));
3078  
3079    subframe->SetMenuBar(menu_bar);
3080  
3081 @@ -1064,7 +1065,7 @@
3082    m_pCanvas = CreateCanvas (m_pFrame);
3083    m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
3084    m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
3085 -  m_pFrame->SetTitle("ImageFileView");
3086 +  m_pFrame->SetTitle(_T("ImageFileView"));
3087  
3088    m_pFrame->Show(true);
3089    Activate(true);
3090 @@ -1089,7 +1090,7 @@
3091  {
3092    if (m_pBitmap && m_pBitmap->Ok()) {
3093  #ifdef DEBUG
3094 -    *theApp->getLog() << "Drawing bitmap\n";
3095 +    *theApp->getLog() << _T("Drawing bitmap\n");
3096  #endif
3097      dc->DrawBitmap(*m_pBitmap, 0, 0, false);
3098    }
3099 @@ -1147,7 +1148,7 @@
3100        m_pBitmap = NULL;
3101      }
3102  #ifdef DEBUG
3103 -    *theApp->getLog() << "Making new bitmap\n";
3104 +    *theApp->getLog() << _T("Making new bitmap\n");
3105  #endif
3106      m_pBitmap = new wxBitmap (image);
3107      delete imageData;
3108 @@ -1281,41 +1282,46 @@
3109  
3110      DialogExportParameters dialogExport (getFrameForChild(), m_iDefaultExportFormatID);
3111      if (dialogExport.ShowModal() == wxID_OK) {
3112 -      wxString strFormatName (dialogExport.getFormatName ());
3113 -      m_iDefaultExportFormatID = ImageFile::convertExportFormatNameToID (strFormatName.c_str());
3114 +      wxString strFormatName (dialogExport.getFormatName (), wxConvUTF8);
3115 +      m_iDefaultExportFormatID = ImageFile::convertExportFormatNameToID (strFormatName.mb_str(wxConvUTF8));
3116  
3117        wxString strExt;
3118        wxString strWildcard;
3119        if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_PGM || m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_PGMASCII) {
3120 -        strExt = ".pgm";
3121 -        strWildcard = "PGM Files (*.pgm)|*.pgm";
3122 +        strExt = _T(".pgm");
3123 +        strWildcard = _T("PGM Files (*.pgm)|*.pgm");
3124        }
3125  #ifdef HAVE_PNG
3126        else if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_PNG || m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_PNG16) {
3127 -        strExt = ".png";
3128 -        strWildcard = "PNG Files (*.png)|*.png";
3129 +        strExt = _T(".png");
3130 +        strWildcard = _T("PNG Files (*.png)|*.png");
3131        }
3132  #endif
3133  #ifdef HAVE_CTN_DICOM
3134        else if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_DICOM) {
3135 -        strExt = "";
3136 -        strWildcard = "DICOM Files (*.*)|*.*";
3137 +        strExt = _T("");
3138 +        strWildcard = _T("DICOM Files (*.*)|*.*");
3139        }
3140  #endif
3141        else if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_TEXT) {
3142 -        strExt = ".txt";
3143 -        strWildcard = "Text (*.txt)|*.txt";
3144 +        strExt = _T(".txt");
3145 +        strWildcard = _T("Text (*.txt)|*.txt");
3146        }
3147        else {
3148 -        strExt = "";
3149 -        strWildcard = "Miscellaneous (*.*)|*.*";
3150 +        strExt = _T("");
3151 +        strWildcard = _T("Miscellaneous (*.*)|*.*");
3152        }
3153  
3154 -      const wxString& strFilename = wxFileSelector (wxString("Export Filename"), wxString(""),
3155 -        wxString(""), strExt, strWildcard, wxOVERWRITE_PROMPT | wxHIDE_READONLY | wxSAVE);
3156 +#if WXWIN_COMPATIBILITY_2_4
3157 +      const wxString& strFilename = wxFileSelector (_T("Export Filename"), _T(""),
3158 +        _T(""), strExt, strWildcard, wxOVERWRITE_PROMPT | wxHIDE_READONLY | wxSAVE);
3159 +#else
3160 +      const wxString& strFilename = wxFileSelector (_T("Export Filename"), _T(""),
3161 +        _T(""), strExt, strWildcard, wxOVERWRITE_PROMPT | wxSAVE);
3162 +#endif
3163        if (strFilename) {
3164 -        rIF.exportImage (strFormatName.c_str(), strFilename.c_str(), 1, 1, m_dMinPixel, m_dMaxPixel);
3165 -        *theApp->getLog() << "Exported file " << strFilename << "\n";
3166 +        rIF.exportImage (strFormatName.mb_str(wxConvUTF8), strFilename.mb_str(wxConvUTF8), 1, 1, m_dMinPixel, m_dMaxPixel);
3167 +        *theApp->getLog() << _T("Exported file ") << strFilename << _T("\n");
3168        }
3169      }
3170    }
3171 @@ -1328,7 +1334,7 @@
3172    unsigned int iOldNX = rIF.nx();
3173    unsigned int iOldNY = rIF.ny();
3174  
3175 -  DialogGetXYSize dialogGetXYSize (getFrameForChild(), "Set New X & Y Dimensions", iOldNX, iOldNY);
3176 +  DialogGetXYSize dialogGetXYSize (getFrameForChild(), _T("Set New X & Y Dimensions"), iOldNX, iOldNY);
3177    if (dialogGetXYSize.ShowModal() == wxID_OK) {
3178      unsigned int iNewNX = dialogGetXYSize.getXSize();
3179      unsigned int iNewNY = dialogGetXYSize.getYSize();
3180 @@ -1344,7 +1350,7 @@
3181      rScaledIF.labelsCopy (rIF);
3182      rScaledIF.labelAdd (os.str().c_str());
3183      rIF.scaleImage (rScaledIF);
3184 -    *theApp->getLog() << os.str().c_str() << "\n";
3185 +    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3186      if (theApp->getAskDeleteNewDocs())
3187        pScaledDoc->Modify (true);
3188      OnUpdate(this, NULL);
3189 @@ -1376,7 +1382,7 @@
3190  {
3191    int xCursor, yCursor;
3192    if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
3193 -    wxMessageBox ("No row selected. Please use left mouse button on image to select column","Error");
3194 +    wxMessageBox (_T("No row selected. Please use left mouse button on image to select column"),_T("Error"));
3195      return;
3196    }
3197  
3198 @@ -1439,8 +1445,8 @@
3199        }
3200        for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
3201          rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
3202 -      os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3203 -      *theApp->getLog() << os.str().c_str() << "\n";
3204 +      os << " Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
3205 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3206        rPlotFile.addDescription (os.str().c_str());
3207      }
3208      delete pX;
3209 @@ -1462,7 +1468,7 @@
3210  {
3211    int xCursor, yCursor;
3212    if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
3213 -    wxMessageBox ("No column selected. Please use left mouse button on image to select column","Error");
3214 +    wxMessageBox (_T("No column selected. Please use left mouse button on image to select column"),_T("Error"));
3215      return;
3216    }
3217  
3218 @@ -1525,8 +1531,8 @@
3219        }
3220        for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
3221          rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
3222 -      os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3223 -      *theApp->getLog() << os.str().c_str() << "\n";
3224 +      os << " Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
3225 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3226        rPlotFile.addDescription (os.str().c_str());
3227      }
3228      delete pX;
3229 @@ -1549,7 +1555,7 @@
3230  {
3231    int xCursor, yCursor;
3232    if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
3233 -    wxMessageBox ("No row selected. Please use left mouse button on image to select column","Error");
3234 +    wxMessageBox (_T("No row selected. Please use left mouse button on image to select column"),_T("Error"));
3235      return;
3236    }
3237  
3238 @@ -1620,8 +1626,8 @@
3239        rPlotFile.addColumn (3, pYMag);
3240        for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
3241          rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
3242 -      os << " FFT Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3243 -      *theApp->getLog() << os.str().c_str() << "\n";
3244 +      os << " FFT Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
3245 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3246        rPlotFile.addDescription (os.str().c_str());
3247      }
3248      delete pX;
3249 @@ -1643,7 +1649,7 @@
3250  {
3251    int xCursor, yCursor;
3252    if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
3253 -    wxMessageBox ("No column selected. Please use left mouse button on image to select column","Error");
3254 +    wxMessageBox (_T("No column selected. Please use left mouse button on image to select column"),_T("Error"));
3255      return;
3256    }
3257  
3258 @@ -1720,8 +1726,8 @@
3259        rPlotFile.addColumn (3, pYMag);
3260        for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
3261          rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
3262 -      os << " FFT Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3263 -      *theApp->getLog() << os.str().c_str() << "\n";
3264 +      os << " FFT Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
3265 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3266        rPlotFile.addDescription (os.str().c_str());
3267      }
3268      delete pX;
3269 @@ -1745,17 +1751,17 @@
3270  {
3271    int xCursor, yCursor;
3272    if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
3273 -    wxMessageBox ("No column selected. Please use left mouse button on image to select column","Error");
3274 +    wxMessageBox (_T("No column selected. Please use left mouse button on image to select column"),_T("Error"));
3275      return;
3276    }
3277  
3278    std::vector<ImageFileDocument*> vecIFDoc;
3279    theApp->getCompatibleImages (GetDocument(), vecIFDoc);
3280    if (vecIFDoc.size() == 0) {
3281 -    wxMessageBox ("No compatible images for Column Comparison", "Error");
3282 +    wxMessageBox (_T("No compatible images for Column Comparison"), _T("Error"));
3283      return;
3284    }
3285 -  DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Comparison Image", vecIFDoc, false);
3286 +  DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Comparison Image"), vecIFDoc, false);
3287  
3288    if (dialogGetCompare.ShowModal() == wxID_OK) {
3289      ImageFileDocument* pCompareDoc = dialogGetCompare.getImageFileDocument();
3290 @@ -1803,20 +1809,21 @@
3291  
3292          unsigned int iL;
3293          for (iL = 0; iL < rIF.nLabels(); iL++) {
3294 -          std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3295 -          s += ": ";
3296 -          s += rIF.labelGet(iL).getLabelString();
3297 -          rPlotFile.addDescription (s.c_str());
3298 +          std::ostringstream os;
3299 +          os << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
3300 +          os << ": " << rIF.labelGet(iL).getLabelString();
3301 +          rPlotFile.addDescription (os.str().c_str());
3302          }
3303          for (iL = 0; iL < rCompareIF.nLabels(); iL++) {
3304 -          std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
3305 -          s += ": ";
3306 -          s += rCompareIF.labelGet(iL).getLabelString();
3307 -          rPlotFile.addDescription (s.c_str());
3308 -        }
3309 -        os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
3310 -          << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
3311 -        *theApp->getLog() << os.str().c_str() << "\n";
3312 +          std::ostringstream os;
3313 +          os << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
3314 +          os << ": ";
3315 +          os << rCompareIF.labelGet(iL).getLabelString();
3316 +          rPlotFile.addDescription (os.str().c_str());
3317 +        }
3318 +        os << " Between " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
3319 +           << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
3320 +        *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3321          rPlotFile.addDescription (os.str().c_str());
3322        }
3323        delete pX;
3324 @@ -1836,7 +1843,7 @@
3325  {
3326    int xCursor, yCursor;
3327    if (! m_pCanvas->GetCurrentCursor (xCursor, yCursor)) {
3328 -    wxMessageBox ("No column selected. Please use left mouse button on image to select column","Error");
3329 +    wxMessageBox (_T("No column selected. Please use left mouse button on image to select column"),_T("Error"));
3330      return;
3331    }
3332  
3333 @@ -1844,11 +1851,11 @@
3334    theApp->getCompatibleImages (GetDocument(), vecIFDoc);
3335  
3336    if (vecIFDoc.size() == 0) {
3337 -    wxMessageBox ("No compatible images for Row Comparison", "Error");
3338 +    wxMessageBox (_T("No compatible images for Row Comparison"), _T("Error"));
3339      return;
3340    }
3341  
3342 -  DialogGetComparisonImage dialogGetCompare (getFrameForChild(), "Get Comparison Image", vecIFDoc, false);
3343 +  DialogGetComparisonImage dialogGetCompare (getFrameForChild(), _T("Get Comparison Image"), vecIFDoc, false);
3344  
3345    if (dialogGetCompare.ShowModal() == wxID_OK) {
3346      ImageFileDocument* pCompareDoc = dialogGetCompare.getImageFileDocument();
3347 @@ -1895,20 +1902,21 @@
3348          rPlotFile.addColumn (2, pY2);
3349          unsigned int iL;
3350          for (iL = 0; iL < rIF.nLabels(); iL++) {
3351 -          std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3352 -          s += ": ";
3353 -          s += rIF.labelGet(iL).getLabelString();
3354 -          rPlotFile.addDescription (s.c_str());
3355 +          std::ostringstream os;
3356 +          os << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
3357 +          os << ": ";
3358 +          os << rIF.labelGet(iL).getLabelString();
3359 +          rPlotFile.addDescription (os.str().c_str());
3360          }
3361          for (iL = 0; iL < rCompareIF.nLabels(); iL++) {
3362 -          std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
3363 -          s += ": ";
3364 -          s += rCompareIF.labelGet(iL).getLabelString();
3365 -          rPlotFile.addDescription (s.c_str());
3366 -        }
3367 -        os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
3368 -          << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
3369 -        *theApp->getLog() << os.str().c_str() << "\n";
3370 +          std::ostringstream os;
3371 +          os << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << ": "
3372 +             << rCompareIF.labelGet(iL).getLabelString();
3373 +          rPlotFile.addDescription (os.str().c_str());
3374 +        }
3375 +        os << " Between " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << " and "
3376 +           << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
3377 +        *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3378          rPlotFile.addDescription (os.str().c_str());
3379        }
3380        delete pX;
3381 @@ -1971,13 +1979,13 @@
3382        rPlotFile.addColumn (0, pX);
3383        rPlotFile.addColumn (1, pY);
3384        for (unsigned int iL = 0; iL < rIF.nLabels(); iL++) {
3385 -        std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3386 -        s += ": ";
3387 -        s += rIF.labelGet(iL).getLabelString();
3388 -        rPlotFile.addDescription (s.c_str());
3389 +        std::ostringstream os;
3390 +        os << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
3391 +        os << ": " << rIF.labelGet(iL).getLabelString();
3392 +        rPlotFile.addDescription (os.str().c_str());
3393        }
3394 -      os << "  plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3395 -      *theApp->getLog() << os.str().c_str() << "\n";
3396 +      os << "  plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
3397 +      *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3398        rPlotFile.addDescription (os.str().c_str());
3399        delete pX;
3400        delete pY;
3401 @@ -2075,7 +2083,7 @@
3402  PhantomFileView::~PhantomFileView()
3403  {
3404    GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
3405 -  GetDocumentManager()->ActivateView(this, FALSE, TRUE);
3406 +  GetDocumentManager()->ActivateView(this, FALSE);
3407  }
3408  
3409  void
3410 @@ -2090,8 +2098,8 @@
3411  #if DEBUG
3412    rPhantom.print (os);
3413  #endif
3414 -  *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
3415 -  wxMessageBox (os.str().c_str(), "Phantom Properties");
3416 +  *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<\n");
3417 +  wxMessageBox (wxConvUTF8.cMB2WX(os.str().c_str()), _T("Phantom Properties"));
3418    GetDocument()->Activate();
3419  }
3420  
3421 @@ -2117,22 +2125,22 @@
3422    m_dDefaultCenterDetectorLength = dialogProjection.getCenterDetectorLengthRatio();
3423    m_dDefaultViewRatio = dialogProjection.getViewRatio();
3424    m_dDefaultScanRatio = dialogProjection.getScanRatio();
3425 -  wxString sGeometry = dialogProjection.getGeometry();
3426 -  m_iDefaultGeometry = Scanner::convertGeometryNameToID (sGeometry.c_str());
3427 +  wxString sGeometry (dialogProjection.getGeometry(), wxConvUTF8);
3428 +  m_iDefaultGeometry = Scanner::convertGeometryNameToID (sGeometry.mb_str(wxConvUTF8));
3429    double dRotationRadians = m_dDefaultRotation;
3430    m_dDefaultRotation /= TWOPI;  // convert back to fraction of a circle
3431  
3432 -  if (m_iDefaultNDet <= 0 || m_iDefaultNView <= 0 || sGeometry == "")
3433 +  if (m_iDefaultNDet <= 0 || m_iDefaultNView <= 0 || sGeometry == _T(""))
3434      return;
3435  
3436    const Phantom& rPhantom = GetDocument()->getPhantom();
3437 -  Scanner theScanner (rPhantom, sGeometry.c_str(), m_iDefaultNDet, m_iDefaultNView, m_iDefaultOffsetView, m_iDefaultNSample,
3438 +  Scanner theScanner (rPhantom, sGeometry.mb_str(wxConvUTF8), m_iDefaultNDet, m_iDefaultNView, m_iDefaultOffsetView, m_iDefaultNSample,
3439      dRotationRadians, m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, m_dDefaultScanRatio);
3440    if (theScanner.fail()) {
3441 -    wxString msg = "Failed making scanner\n";
3442 -    msg += theScanner.failMessage().c_str();
3443 -    *theApp->getLog() << msg << "\n";
3444 -    wxMessageBox (msg, "Error");
3445 +    wxString msg = _T("Failed making scanner\n");
3446 +    msg += wxConvUTF8.cMB2WX(theScanner.failMessage().c_str());
3447 +    *theApp->getLog() << msg << _T("\n");
3448 +    wxMessageBox (msg, _T("Error"));
3449      return;
3450    }
3451  
3452 @@ -2166,15 +2174,17 @@
3453        ::wxYield();
3454        while (dialogProjections.isPaused()) {
3455          ::wxYield();
3456 -        ::wxUsleep(50);
3457 +        ::wxMilliSleep(50);
3458        }
3459      }
3460    } else {
3461  #if HAVE_WXTHREADS
3462      if (theApp->getUseBackgroundTasks()) {
3463 -      ProjectorSupervisorThread* pProjector = new ProjectorSupervisorThread (this, m_iDefaultNDet,
3464 -        m_iDefaultNView, m_iDefaultOffsetView, sGeometry.c_str(), m_iDefaultNSample, dRotationRadians,
3465 -        m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, m_dDefaultScanRatio, os.str().c_str());
3466 +      ProjectorSupervisorThread* pProjector = new ProjectorSupervisorThread
3467 +        (this, m_iDefaultNDet, m_iDefaultNView, m_iDefaultOffsetView, 
3468 +         sGeometry.mb_str(wxConvUTF8), m_iDefaultNSample, dRotationRadians,
3469 +         m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, 
3470 +         m_dDefaultScanRatio, wxConvUTF8.cMB2WX(os.str().c_str()));
3471        if (pProjector->Create() != wxTHREAD_NO_ERROR) {
3472          sys_error (ERR_SEVERE, "Error creating projector thread");
3473          delete pProjector;
3474 @@ -2188,7 +2198,7 @@
3475      {
3476        pProj = new Projections;
3477        pProj->initFromScanner (theScanner);
3478 -      wxProgressDialog dlgProgress (wxString("Projection"), wxString("Projection Progress"), pProj->nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
3479 +      wxProgressDialog dlgProgress (_T("Projection"), _T("Projection Progress"), pProj->nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
3480        for (int i = 0; i < pProj->nView(); i++) {
3481          //theScanner.collectProjections (*pProj, rPhantom, i, 1, true, m_iDefaultTrace);
3482          theScanner.collectProjections (*pProj, rPhantom, i, 1, theScanner.offsetView(), true, m_iDefaultTrace);
3483 @@ -2201,7 +2211,7 @@
3484      }
3485    }
3486  
3487 -  *theApp->getLog() << os.str().c_str() << "\n";
3488 +  *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3489    pProj->setRemark (os.str());
3490    pProj->setCalcTime (timer.timerEnd());
3491  
3492 @@ -2218,8 +2228,6 @@
3493    pProjectionDoc->getView()->setInitialClientSize();
3494    pProjectionDoc->Activate();
3495  }
3496 -
3497 -
3498  void
3499  PhantomFileView::OnRasterize (wxCommandEvent& event)
3500  {
3501 @@ -2248,10 +2256,12 @@
3502  
3503  #if HAVE_WXTHREADS
3504    if (theApp->getUseBackgroundTasks()) {
3505 -    RasterizerSupervisorThread* pThread = new RasterizerSupervisorThread (this, m_iDefaultRasterNX, m_iDefaultRasterNY,
3506 -      m_iDefaultRasterNSamples, m_dDefaultRasterViewRatio, os.str().c_str());
3507 +    RasterizerSupervisorThread* pThread = new RasterizerSupervisorThread
3508 +      (this, m_iDefaultRasterNX, m_iDefaultRasterNY,
3509 +       m_iDefaultRasterNSamples, m_dDefaultRasterViewRatio, 
3510 +       wxConvUTF8.cMB2WX(os.str().c_str()));
3511      if (pThread->Create() != wxTHREAD_NO_ERROR) {
3512 -      *theApp->getLog() << "Error creating rasterizer thread\n";
3513 +      *theApp->getLog() << _T("Error creating rasterizer thread\n");
3514        return;
3515      }
3516      pThread->SetPriority (60);
3517 @@ -2261,8 +2271,8 @@
3518    {
3519      ImageFile* pImageFile = new ImageFile (m_iDefaultRasterNX, m_iDefaultRasterNY);
3520  
3521 -    wxProgressDialog dlgProgress (wxString("Rasterize"),
3522 -                                  wxString("Rasterization Progress"),
3523 +    wxProgressDialog dlgProgress (_T("Rasterize"),
3524 +                                  _T("Rasterization Progress"),
3525                                    pImageFile->nx() + 1,
3526                                    getFrameForChild(),
3527                                    wxPD_CAN_ABORT );
3528 @@ -2286,7 +2296,7 @@
3529      pRasterDoc->setImageFile (pImageFile);
3530      if (theApp->getAskDeleteNewDocs())
3531        pRasterDoc->Modify (true);
3532 -    *theApp->getLog() << os.str().c_str() << "\n";
3533 +    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3534      pImageFile->labelAdd (os.str().c_str(), timer.timerEnd());
3535  
3536      pRasterDoc->UpdateAllViews(this);
3537 @@ -2302,7 +2312,7 @@
3538    PhantomCanvas* pCanvas = new PhantomCanvas (this, parent, wxPoint(-1,-1),
3539                                                wxSize(-1,-1), 0);
3540    pCanvas->SetBackgroundColour(*wxWHITE);
3541 -  pCanvas->Clear();
3542 +  pCanvas->ClearBackground();
3543  
3544    return pCanvas;
3545  }
3546 @@ -2315,50 +2325,50 @@
3547  PhantomFileView::CreateChildFrame(wxDocument *doc, wxView *view)
3548  {
3549  #if CTSIM_MDI
3550 -  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
3551 +  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Phantom Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
3552  #else
3553 -  wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
3554 +  wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Phantom Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
3555  #endif
3556    theApp->setIconForFrame (subframe);
3557  
3558    m_pFileMenu = new wxMenu;
3559  
3560 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
3561 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
3562 -  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
3563 -  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
3564 -  m_pFileMenu->Append(wxID_CLOSE, "&Close");
3565 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
3566 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
3567 +  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
3568 +  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
3569 +  m_pFileMenu->Append(wxID_CLOSE, _T("&Close"));
3570  
3571    m_pFileMenu->AppendSeparator();
3572 -  m_pFileMenu->Append(PHMMENU_FILE_PROPERTIES, "P&roperties\tCtrl-I");
3573 +  m_pFileMenu->Append(PHMMENU_FILE_PROPERTIES, _T("P&roperties\tCtrl-I"));
3574  
3575    m_pFileMenu->AppendSeparator();
3576 -  m_pFileMenu->Append(wxID_PRINT, "&Print...");
3577 -  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
3578 -  m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
3579 +  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
3580 +  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
3581 +  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Pre&view"));
3582    m_pFileMenu->AppendSeparator();
3583 -  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
3584 +  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
3585    m_pFileMenu->AppendSeparator();
3586 -  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
3587 -  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
3588 +  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
3589 +  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
3590    GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
3591    GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
3592  
3593    wxMenu *process_menu = new wxMenu;
3594 -  process_menu->Append(PHMMENU_PROCESS_RASTERIZE, "&Rasterize...\tCtrl-R");
3595 -  process_menu->Append(PHMMENU_PROCESS_PROJECTIONS, "&Projections...\tCtrl-J");
3596 +  process_menu->Append(PHMMENU_PROCESS_RASTERIZE, _T("&Rasterize...\tCtrl-R"));
3597 +  process_menu->Append(PHMMENU_PROCESS_PROJECTIONS, _T("&Projections...\tCtrl-J"));
3598  
3599    wxMenu *help_menu = new wxMenu;
3600 -  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
3601 -  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
3602 -  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
3603 -  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
3604 +  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
3605 +  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
3606 +  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
3607 +  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
3608  
3609    wxMenuBar *menu_bar = new wxMenuBar;
3610  
3611 -  menu_bar->Append(m_pFileMenu, "&File");
3612 -  menu_bar->Append(process_menu, "&Process");
3613 -  menu_bar->Append(help_menu, "&Help");
3614 +  menu_bar->Append(m_pFileMenu, _T("&File"));
3615 +  menu_bar->Append(process_menu, _T("&Process"));
3616 +  menu_bar->Append(help_menu, _T("&Help"));
3617  
3618    subframe->SetMenuBar(menu_bar);
3619    subframe->Centre(wxBOTH);
3620 @@ -2382,7 +2392,7 @@
3621    m_pCanvas = CreateCanvas (m_pFrame);
3622    m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
3623    m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
3624 -  m_pFrame->SetTitle ("PhantomFileView");
3625 +  m_pFrame->SetTitle (_T("PhantomFileView"));
3626  
3627    m_pFrame->Show(true);
3628    Activate(true);
3629 @@ -2536,7 +2546,7 @@
3630  ProjectionFileView::~ProjectionFileView()
3631  {
3632    GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
3633 -  GetDocumentManager()->ActivateView(this, FALSE, TRUE);;
3634 +  GetDocumentManager()->ActivateView(this, FALSE);;
3635  }
3636  
3637  void
3638 @@ -2545,8 +2555,8 @@
3639    const Projections& rProj = GetDocument()->getProjections();
3640    std::ostringstream os;
3641    rProj.printScanInfo(os);
3642 -  *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
3643 -  wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), "Projection File Properties", wxOK | wxICON_INFORMATION);
3644 +  *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<\n");
3645 +  wxMessageDialog dialogMsg (getFrameForChild(), wxConvUTF8.cMB2WX(os.str().c_str()), _T("Projection File Properties"), wxOK | wxICON_INFORMATION);
3646    dialogMsg.ShowModal();
3647    GetDocument()->Activate();
3648  }
3649 @@ -2576,8 +2586,8 @@
3650    pRectDoc->setImageFile (pIF);
3651    pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime());
3652    std::ostringstream os;
3653 -  os << "Convert projection file " << GetFrame()->GetTitle().c_str() << " to rectangular image";
3654 -  *theApp->getLog() << os.str().c_str() << "\n";
3655 +  os << "Convert projection file " << getFrame()->GetTitle().c_str() << " to rectangular image";
3656 +  *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3657    pIF->labelAdd (os.str().c_str());
3658    if (theApp->getAskDeleteNewDocs())
3659      pRectDoc->Modify (true);
3660 @@ -2590,19 +2600,19 @@
3661  ProjectionFileView::OnConvertPolar (wxCommandEvent& event)
3662  {
3663    Projections& rProj = GetDocument()->getProjections();
3664 -  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Convert Polar", m_iDefaultPolarNX, m_iDefaultPolarNY,
3665 +  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), _T("Convert Polar"), m_iDefaultPolarNX, m_iDefaultPolarNY,
3666      m_iDefaultPolarInterpolation, -1, IDH_DLG_POLAR);
3667    if (dialogPolar.ShowModal() == wxID_OK) {
3668 -    wxProgressDialog dlgProgress (wxString("Convert Polar"), wxString("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
3669 -    wxString strInterpolation (dialogPolar.getInterpolationName());
3670 +    wxProgressDialog dlgProgress (_T("Convert Polar"), _T("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
3671 +    wxString strInterpolation (dialogPolar.getInterpolationName(), wxConvUTF8);
3672      m_iDefaultPolarNX = dialogPolar.getXSize();
3673      m_iDefaultPolarNY = dialogPolar.getYSize();
3674      ImageFile* pIF = new ImageFile (m_iDefaultPolarNX, m_iDefaultPolarNY);
3675 -    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str());
3676 +    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.mb_str(wxConvUTF8));
3677  
3678      if (! rProj.convertPolar (*pIF, m_iDefaultPolarInterpolation)) {
3679        delete pIF;
3680 -      *theApp->getLog() << "Error converting to Polar\n";
3681 +      *theApp->getLog() << _T("Error converting to Polar\n");
3682        return;
3683      }
3684  
3685 @@ -2614,10 +2624,10 @@
3686      pPolarDoc->setImageFile (pIF);
3687      pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime());
3688      std::ostringstream os;
3689 -    os << "Convert projection file " << GetFrame()->GetTitle().c_str() << " to polar image: xSize="
3690 +    os << "Convert projection file " << getFrame()->GetTitle().c_str() << " to polar image: xSize="
3691        << m_iDefaultPolarNX << ", ySize=" << m_iDefaultPolarNY << ", interpolation="
3692        << strInterpolation.c_str();
3693 -    *theApp->getLog() << os.str().c_str() << "\n";
3694 +    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3695      pIF->labelAdd (os.str().c_str());
3696      if (theApp->getAskDeleteNewDocs())
3697        pPolarDoc->Modify (true);
3698 @@ -2631,20 +2641,20 @@
3699  ProjectionFileView::OnConvertFFTPolar (wxCommandEvent& event)
3700  {
3701    Projections& rProj = GetDocument()->getProjections();
3702 -  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Convert to FFT Polar", m_iDefaultPolarNX, m_iDefaultPolarNY,
3703 +  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), _T("Convert to FFT Polar"), m_iDefaultPolarNX, m_iDefaultPolarNY,
3704      m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad, IDH_DLG_FFT_POLAR);
3705    if (dialogPolar.ShowModal() == wxID_OK) {
3706 -    wxProgressDialog dlgProgress (wxString("Convert FFT Polar"), wxString("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
3707 -    wxString strInterpolation (dialogPolar.getInterpolationName());
3708 +    wxProgressDialog dlgProgress (_T("Convert FFT Polar"), _T("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
3709 +    wxString strInterpolation (dialogPolar.getInterpolationName(), wxConvUTF8);
3710      m_iDefaultPolarNX = dialogPolar.getXSize();
3711      m_iDefaultPolarNY = dialogPolar.getYSize();
3712      m_iDefaultPolarZeropad = dialogPolar.getZeropad();
3713      ImageFile* pIF = new ImageFile (m_iDefaultPolarNX, m_iDefaultPolarNY);
3714  
3715 -    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str());
3716 +    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.mb_str(wxConvUTF8));
3717      if (! rProj.convertFFTPolar (*pIF, m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad)) {
3718        delete pIF;
3719 -      *theApp->getLog() << "Error converting to polar\n";
3720 +      *theApp->getLog() << _T("Error converting to polar\n");
3721        return;
3722      }
3723      ImageFileDocument* pPolarDoc = theApp->newImageDoc();
3724 @@ -2655,10 +2665,10 @@
3725      pPolarDoc->setImageFile (pIF);
3726      pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime());
3727      std::ostringstream os;
3728 -    os << "Convert projection file " << GetFrame()->GetTitle().c_str() << " to FFT polar image: xSize="
3729 +    os << "Convert projection file " << getFrame()->GetTitle().c_str() << " to FFT polar image: xSize="
3730        << m_iDefaultPolarNX << ", ySize=" << m_iDefaultPolarNY << ", interpolation="
3731        << strInterpolation.c_str() << ", zeropad=" << m_iDefaultPolarZeropad;
3732 -    *theApp->getLog() << os.str().c_str() << "\n";
3733 +    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3734      pIF->labelAdd (os.str().c_str());
3735      if (theApp->getAskDeleteNewDocs())
3736        pPolarDoc->Modify (true);
3737 @@ -2771,8 +2781,8 @@
3738    rPlotFile.addColumn (0, pX);
3739    rPlotFile.addColumn (1, pY);
3740    rPlotFile.addDescription (rProj.remark());
3741 -  os << " plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
3742 -  *theApp->getLog() << os.str().c_str() << "\n";
3743 +  os << " plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
3744 +  *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3745    rPlotFile.addDescription (os.str().c_str());
3746    delete pX;
3747    delete pY;
3748 @@ -2789,10 +2799,10 @@
3749  {
3750    Projections& rProj = GetDocument()->getProjections();
3751    if (rProj.geometry() == Scanner::GEOMETRY_PARALLEL) {
3752 -    wxMessageBox ("Projections are already parallel", "Error");
3753 +    wxMessageBox (_T("Projections are already parallel"), _T("Error"));
3754      return;
3755    }
3756 -  wxProgressDialog dlgProgress (wxString("Convert to Parallel"), wxString("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
3757 +  wxProgressDialog dlgProgress (_T("Convert to Parallel"), _T("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
3758    Projections* pProjNew = rProj.interpolateToParallel();
3759    ProjectionFileDocument* pProjDocNew = theApp->newProjectionDoc();
3760    pProjDocNew->setProjections (pProjNew);
3761 @@ -2806,7 +2816,7 @@
3762        pFrame->SetFocus();
3763        pFrame->Raise();
3764      }
3765 -    GetDocumentManager()->ActivateView (projView, true, false);
3766 +    GetDocumentManager()->ActivateView (projView, true);
3767    }
3768    if (theApp->getAskDeleteNewDocs())
3769      pProjDocNew-> Modify(true);
3770 @@ -2819,20 +2829,20 @@
3771  ProjectionFileView::OnReconstructFourier (wxCommandEvent& event)
3772  {
3773    Projections& rProj = GetDocument()->getProjections();
3774 -  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Fourier Reconstruction", m_iDefaultPolarNX, m_iDefaultPolarNY,
3775 +  DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), _T("Fourier Reconstruction"), m_iDefaultPolarNX, m_iDefaultPolarNY,
3776      m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad, IDH_DLG_RECON_FOURIER);
3777    if (dialogPolar.ShowModal() == wxID_OK) {
3778 -    wxProgressDialog dlgProgress (wxString("Reconstruction Fourier"), wxString("Reconstruction Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
3779 -    wxString strInterpolation (dialogPolar.getInterpolationName());
3780 +    wxProgressDialog dlgProgress (_T("Reconstruction Fourier"), _T("Reconstruction Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
3781 +    wxString strInterpolation (dialogPolar.getInterpolationName(), wxConvUTF8);
3782      m_iDefaultPolarNX = dialogPolar.getXSize();
3783      m_iDefaultPolarNY = dialogPolar.getYSize();
3784      m_iDefaultPolarZeropad = dialogPolar.getZeropad();
3785      ImageFile* pIF = new ImageFile (m_iDefaultPolarNX, m_iDefaultPolarNY);
3786  
3787 -    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str());
3788 +    m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.mb_str(wxConvUTF8));
3789      if (! rProj.convertFFTPolar (*pIF, m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad)) {
3790        delete pIF;
3791 -      *theApp->getLog() << "Error converting to polar\n";
3792 +      *theApp->getLog() << _T("Error converting to polar\n");
3793        return;
3794      }
3795  #ifdef HAVE_FFT
3796 @@ -2849,10 +2859,10 @@
3797      pPolarDoc->setImageFile (pIF);
3798      pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime());
3799      std::ostringstream os;
3800 -    os << "Reconstruct Fourier " << GetFrame()->GetTitle().c_str() << ": xSize="
3801 +    os << "Reconstruct Fourier " << getFrame()->GetTitle().mb_str(wxConvUTF8) << ": xSize="
3802        << m_iDefaultPolarNX << ", ySize=" << m_iDefaultPolarNY << ", interpolation="
3803 -      << strInterpolation.c_str() << ", zeropad=" << m_iDefaultPolarZeropad;
3804 -    *theApp->getLog() << os.str().c_str() << "\n";
3805 +      << strInterpolation.mb_str(wxConvUTF8) << ", zeropad=" << m_iDefaultPolarZeropad;
3806 +    *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3807      pIF->labelAdd (os.str().c_str());
3808      if (theApp->getAskDeleteNewDocs())
3809        pPolarDoc->Modify (true);
3810 @@ -2896,19 +2906,19 @@
3811  
3812    m_iDefaultNX = dialogReconstruction.getXSize();
3813    m_iDefaultNY = dialogReconstruction.getYSize();
3814 -  wxString optFilterName = dialogReconstruction.getFilterName();
3815 -  m_iDefaultFilter = SignalFilter::convertFilterNameToID (optFilterName.c_str());
3816 +  wxString optFilterName (dialogReconstruction.getFilterName(), wxConvUTF8);
3817 +  m_iDefaultFilter = SignalFilter::convertFilterNameToID (optFilterName.mb_str(wxConvUTF8));
3818    m_dDefaultFilterParam = dialogReconstruction.getFilterParam();
3819 -  wxString optFilterMethodName = dialogReconstruction.getFilterMethodName();
3820 -  m_iDefaultFilterMethod = ProcessSignal::convertFilterMethodNameToID(optFilterMethodName.c_str());
3821 +  wxString optFilterMethodName (dialogReconstruction.getFilterMethodName(), wxConvUTF8);
3822 +  m_iDefaultFilterMethod = ProcessSignal::convertFilterMethodNameToID(optFilterMethodName.mb_str(wxConvUTF8));
3823    m_iDefaultZeropad = dialogReconstruction.getZeropad();
3824 -  wxString optFilterGenerationName = dialogReconstruction.getFilterGenerationName();
3825 -  m_iDefaultFilterGeneration = ProcessSignal::convertFilterGenerationNameToID (optFilterGenerationName.c_str());
3826 -  wxString optInterpName = dialogReconstruction.getInterpName();
3827 -  m_iDefaultInterpolation = Backprojector::convertInterpNameToID (optInterpName.c_str());
3828 +  wxString optFilterGenerationName (dialogReconstruction.getFilterGenerationName(), wxConvUTF8);
3829 +  m_iDefaultFilterGeneration = ProcessSignal::convertFilterGenerationNameToID (optFilterGenerationName.mb_str(wxConvUTF8));
3830 +  wxString optInterpName (dialogReconstruction.getInterpName(), wxConvUTF8);
3831 +  m_iDefaultInterpolation = Backprojector::convertInterpNameToID (optInterpName.mb_str(wxConvUTF8));
3832    m_iDefaultInterpParam = dialogReconstruction.getInterpParam();
3833 -  wxString optBackprojectName = dialogReconstruction.getBackprojectName();
3834 -  m_iDefaultBackprojector = Backprojector::convertBackprojectNameToID (optBackprojectName.c_str());
3835 +  wxString optBackprojectName (dialogReconstruction.getBackprojectName(), wxConvUTF8);
3836 +  m_iDefaultBackprojector = Backprojector::convertBackprojectNameToID (optBackprojectName.mb_str(wxConvUTF8));
3837    m_iDefaultTrace = dialogReconstruction.getTrace();
3838    dialogReconstruction.getROI (&defaultROI);
3839  
3840 @@ -2916,7 +2926,7 @@
3841      return;
3842  
3843    std::ostringstream os;
3844 -  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();
3845 +  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);
3846    if (bRebinToParallel)
3847      os << "; Interpolate to Parallel";
3848  
3849 @@ -2924,9 +2934,9 @@
3850    ImageFile* pImageFile = NULL;
3851    if (m_iDefaultTrace > Trace::TRACE_CONSOLE) {
3852      pImageFile = new ImageFile (m_iDefaultNX, m_iDefaultNY);
3853 -    Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(),
3854 -      m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),
3855 -      optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace,
3856 +    Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.mb_str(wxConvUTF8),
3857 +      m_dDefaultFilterParam, optFilterMethodName.mb_str(wxConvUTF8), m_iDefaultZeropad, optFilterGenerationName.mb_str(wxConvUTF8),
3858 +      optInterpName.mb_str(wxConvUTF8), m_iDefaultInterpParam, optBackprojectName.mb_str(wxConvUTF8), m_iDefaultTrace,
3859        &defaultROI, bRebinToParallel);
3860  
3861      ReconstructDialog* pDlgReconstruct = new ReconstructDialog (*pReconstructor, rProj, *pImageFile, m_iDefaultTrace, getFrameForChild());
3862 @@ -2941,7 +2951,7 @@
3863        ::wxYield();
3864        while (pDlgReconstruct->isPaused()) {
3865          ::wxYield();
3866 -        ::wxUsleep(50);
3867 +        ::wxMilliSleep(50);
3868        }
3869      }
3870      pReconstructor->postProcessing();
3871 @@ -2950,10 +2960,13 @@
3872    } else {
3873  #if HAVE_WXTHREADS
3874      if (theApp->getUseBackgroundTasks()) {
3875 -      ReconstructorSupervisorThread* pReconstructor = new ReconstructorSupervisorThread (this, m_iDefaultNX,
3876 -        m_iDefaultNY, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(),
3877 -        m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam,
3878 -        optBackprojectName.c_str(), os.str().c_str(), &defaultROI, bRebinToParallel);
3879 +      ReconstructorSupervisorThread* pReconstructor = new ReconstructorSupervisorThread
3880 +        (this, m_iDefaultNX, m_iDefaultNY, optFilterName.mb_str(wxConvUTF8), 
3881 +         m_dDefaultFilterParam, optFilterMethodName.mb_str(wxConvUTF8),
3882 +         m_iDefaultZeropad, optFilterGenerationName.mb_str(wxConvUTF8), 
3883 +         optInterpName.mb_str(wxConvUTF8), m_iDefaultInterpParam,
3884 +         optBackprojectName.mb_str(wxConvUTF8), 
3885 +         wxConvUTF8.cMB2WX(os.str().c_str()), &defaultROI, bRebinToParallel);
3886        if (pReconstructor->Create() != wxTHREAD_NO_ERROR) {
3887          sys_error (ERR_SEVERE, "Error creating reconstructor thread");
3888          delete pReconstructor;
3889 @@ -2966,10 +2979,10 @@
3890  #endif
3891      {
3892        pImageFile = new ImageFile (m_iDefaultNX, m_iDefaultNY);
3893 -      wxProgressDialog dlgProgress (wxString("Reconstruction"), wxString("Reconstruction Progress"), rProj.nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
3894 -      Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(),
3895 -        m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),
3896 -        optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace,
3897 +      wxProgressDialog dlgProgress (_T("Reconstruction"), _T("Reconstruction Progress"), rProj.nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
3898 +      Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.mb_str(wxConvUTF8),
3899 +        m_dDefaultFilterParam, optFilterMethodName.mb_str(wxConvUTF8), m_iDefaultZeropad, optFilterGenerationName.mb_str(wxConvUTF8),
3900 +        optInterpName.mb_str(wxConvUTF8), m_iDefaultInterpParam, optBackprojectName.mb_str(wxConvUTF8), m_iDefaultTrace,
3901          &defaultROI, bRebinToParallel);
3902  
3903        for (int iView = 0; iView < rProj.nView(); iView++) {
3904 @@ -2989,7 +3002,7 @@
3905      sys_error (ERR_SEVERE, "Unable to create image file");
3906      return;
3907    }
3908 -  *theApp->getLog() << os.str().c_str() << "\n";
3909 +  *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
3910    pImageFile->labelAdd (rProj.getLabel());
3911    pImageFile->labelAdd (os.str().c_str(), timerRecon.timerEnd());
3912  
3913 @@ -3019,7 +3032,7 @@
3914  
3915    pCanvas->SetScrollbars(20, 20, 50, 50);
3916    pCanvas->SetBackgroundColour(*wxWHITE);
3917 -  pCanvas->Clear();
3918 +  pCanvas->ClearBackground();
3919  
3920    return pCanvas;
3921  }
3922 @@ -3032,69 +3045,69 @@
3923  ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view)
3924  {
3925  #ifdef CTSIM_MDI
3926 -  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
3927 +  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Projection Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
3928  #else
3929 -  wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
3930 +  wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Projection Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
3931  #endif
3932    theApp->setIconForFrame (subframe);
3933  
3934    m_pFileMenu = new wxMenu;
3935  
3936 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
3937 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
3938 -  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
3939 -  m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
3940 -  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
3941 -  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
3942 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
3943 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
3944 +  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
3945 +  m_pFileMenu->Append(wxID_SAVE, _T("&Save\tCtrl-S"));
3946 +  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
3947 +  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
3948  
3949    m_pFileMenu->AppendSeparator();
3950 -  m_pFileMenu->Append(PJMENU_FILE_PROPERTIES, "P&roperties\tCtrl-I");
3951 +  m_pFileMenu->Append(PJMENU_FILE_PROPERTIES, _T("P&roperties\tCtrl-I"));
3952  
3953    m_pFileMenu->AppendSeparator();
3954 -  m_pFileMenu->Append(wxID_PRINT, "&Print...");
3955 -  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
3956 -  m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
3957 +  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
3958 +  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
3959 +  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Pre&view"));
3960    m_pFileMenu->AppendSeparator();
3961 -  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
3962 +  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
3963    m_pFileMenu->AppendSeparator();
3964 -  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
3965 -  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
3966 +  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
3967 +  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
3968    GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
3969    GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
3970  
3971    m_pConvertMenu = new wxMenu;
3972 -  m_pConvertMenu->Append (PJMENU_CONVERT_RECTANGULAR, "&Rectangular Image");
3973 -  m_pConvertMenu->Append (PJMENU_CONVERT_POLAR, "&Polar Image...\tCtrl-L");
3974 -  m_pConvertMenu->Append (PJMENU_CONVERT_FFT_POLAR, "FF&T->Polar Image...\tCtrl-T");
3975 +  m_pConvertMenu->Append (PJMENU_CONVERT_RECTANGULAR, _T("&Rectangular Image"));
3976 +  m_pConvertMenu->Append (PJMENU_CONVERT_POLAR, _T("&Polar Image...\tCtrl-L"));
3977 +  m_pConvertMenu->Append (PJMENU_CONVERT_FFT_POLAR, _T("FF&T->Polar Image...\tCtrl-T"));
3978    m_pConvertMenu->AppendSeparator();
3979 -  m_pConvertMenu->Append (PJMENU_CONVERT_PARALLEL, "&Interpolate to Parallel");
3980 +  m_pConvertMenu->Append (PJMENU_CONVERT_PARALLEL, _T("&Interpolate to Parallel"));
3981  
3982    //  wxMenu* filter_menu = new wxMenu;
3983 -  //  filter_menu->Append (PJMENU_ARTIFACT_REDUCTION, "&Artifact Reduction");
3984 +  //  filter_menu->Append (PJMENU_ARTIFACT_REDUCTION, _T("&Artifact Reduction"));
3985  
3986    wxMenu* analyze_menu = new wxMenu;
3987 -  analyze_menu->Append (PJMENU_PLOT_HISTOGRAM, "&Plot Histogram");
3988 -  analyze_menu->Append (PJMENU_PLOT_TTHETA_SAMPLING, "Plot T-T&heta Sampling...\tCtrl-H");
3989 +  analyze_menu->Append (PJMENU_PLOT_HISTOGRAM, _T("&Plot Histogram"));
3990 +  analyze_menu->Append (PJMENU_PLOT_TTHETA_SAMPLING, _T("Plot T-T&heta Sampling...\tCtrl-H"));
3991  
3992    m_pReconstructMenu = new wxMenu;
3993 -  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FBP, "&Filtered Backprojection...\tCtrl-R", "Reconstruct image using filtered backprojection");
3994 -  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FBP_REBIN, "Filtered &Backprojection (Rebin to Parallel)...\tCtrl-B", "Reconstruct image using filtered backprojection");
3995 -  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FOURIER, "&Inverse Fourier...\tCtrl-E", "Direct inverse Fourier");
3996 +  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FBP, _T("&Filtered Backprojection...\tCtrl-R"), _T("Reconstruct image using filtered backprojection"));
3997 +  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FBP_REBIN, _T("Filtered &Backprojection (Rebin to Parallel)...\tCtrl-B"), _T("Reconstruct image using filtered backprojection"));
3998 +  m_pReconstructMenu->Append (PJMENU_RECONSTRUCT_FOURIER, _T("&Inverse Fourier...\tCtrl-E"), _T("Direct inverse Fourier"));
3999  
4000    wxMenu *help_menu = new wxMenu;
4001 -  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
4002 -  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
4003 -  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
4004 -  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
4005 +  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
4006 +  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
4007 +  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
4008 +  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
4009  
4010    wxMenuBar *menu_bar = new wxMenuBar;
4011  
4012 -  menu_bar->Append (m_pFileMenu, "&File");
4013 -  menu_bar->Append (m_pConvertMenu, "&Convert");
4014 -  //  menu_bar->Append (filter_menu, "Fi&lter");
4015 -  menu_bar->Append (analyze_menu, "&Analyze");
4016 -  menu_bar->Append (m_pReconstructMenu, "&Reconstruct");
4017 -  menu_bar->Append (help_menu, "&Help");
4018 +  menu_bar->Append (m_pFileMenu, _T("&File"));
4019 +  menu_bar->Append (m_pConvertMenu, _T("&Convert"));
4020 +  //  menu_bar->Append (filter_menu, _T("Fi&lter"));
4021 +  menu_bar->Append (analyze_menu, _T("&Analyze"));
4022 +  menu_bar->Append (m_pReconstructMenu, _T("&Reconstruct"));
4023 +  menu_bar->Append (help_menu, _T("&Help"));
4024  
4025    subframe->SetMenuBar(menu_bar);
4026    subframe->Centre(wxBOTH);
4027 @@ -3122,7 +3135,7 @@
4028    m_pCanvas = CreateCanvas (m_pFrame);
4029    m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
4030    m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
4031 -  m_pFrame->SetTitle ("ProjectionFileView");
4032 +  m_pFrame->SetTitle (_T("ProjectionFileView"));
4033  
4034    m_pFrame->Show(true);
4035    Activate(true);
4036 @@ -3215,7 +3228,7 @@
4037  bool
4038  ProjectionFileView::OnClose (bool deleteWindow)
4039  {
4040 -  //GetDocumentManager()->ActivateView (this, false, true);
4041 +  //GetDocumentManager()->ActivateView (this, false);
4042    if (! GetDocument() || ! GetDocument()->Close())
4043      return false;
4044  
4045 @@ -3290,7 +3303,7 @@
4046      delete m_pEZPlot;
4047  
4048    GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
4049 -  GetDocumentManager()->ActivateView(this, FALSE, TRUE);
4050 +  GetDocumentManager()->ActivateView(this, FALSE);
4051  }
4052  
4053  void
4054 @@ -3300,8 +3313,9 @@
4055    std::ostringstream os;
4056    os << "Columns: " << rPlot.getNumColumns() << ", Records: " << rPlot.getNumRecords() << "\n";
4057    rPlot.printHeadersBrief (os);
4058 -  *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<<\n";
4059 -  wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), "Plot File Properties", wxOK | wxICON_INFORMATION);
4060 +  *theApp->getLog() << _T(">>>>\n") << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("<<<<<\n");
4061 +  wxMessageDialog dialogMsg (getFrameForChild(), wxConvUTF8.cMB2WX(os.str().c_str()), _T("Plot File Properties"), 
4062 +                             wxOK | wxICON_INFORMATION);
4063    dialogMsg.ShowModal();
4064    GetDocument()->Activate();
4065  }
4066 @@ -3338,7 +3352,7 @@
4067  
4068    if (! m_bMinSpecified || ! m_bMaxSpecified) {
4069      if (! rPlotFile.getMinMax (1, min, max)) {
4070 -      *theApp->getLog() << "Error: unable to find Min/Max\n";
4071 +      *theApp->getLog() << _T("Error: unable to find Min/Max\n");
4072        return;
4073      }
4074    }
4075 @@ -3348,7 +3362,7 @@
4076    if (m_bMaxSpecified)
4077      max = m_dMaxPixel;
4078  
4079 -  DialogGetMinMax dialogMinMax (getFrameForChild(), "Set Y-axis Minimum & Maximum", min, max);
4080 +  DialogGetMinMax dialogMinMax (getFrameForChild(), _T("Set Y-axis Minimum & Maximum"), min, max);
4081    int retVal = dialogMinMax.ShowModal();
4082    if (retVal == wxID_OK) {
4083      m_bMinSpecified = true;
4084 @@ -3379,7 +3393,7 @@
4085  
4086    pCanvas = new PlotFileCanvas (this, parent, wxPoint(-1,-1), wxSize(-1,-1), 0);
4087    pCanvas->SetBackgroundColour(*wxWHITE);
4088 -  pCanvas->Clear();
4089 +  pCanvas->ClearBackground();
4090  
4091    return pCanvas;
4092  }
4093 @@ -3392,52 +3406,52 @@
4094  PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view)
4095  {
4096  #ifdef CTSIM_MDI
4097 -  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
4098 +  wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Plot Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
4099  #else
4100 -  wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
4101 +  wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, _T("Plot Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
4102  #endif
4103    theApp->setIconForFrame (subframe);
4104  
4105    m_pFileMenu = new wxMenu;
4106  
4107 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
4108 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
4109 -  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
4110 -  m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
4111 -  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
4112 -  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
4113 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
4114 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
4115 +  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
4116 +  m_pFileMenu->Append(wxID_SAVE, _T("&Save\tCtrl-S"));
4117 +  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
4118 +  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
4119  
4120    m_pFileMenu->AppendSeparator();
4121 -  m_pFileMenu->Append(PLOTMENU_FILE_PROPERTIES, "P&roperties\tCtrl-I");
4122 +  m_pFileMenu->Append(PLOTMENU_FILE_PROPERTIES, _T("P&roperties\tCtrl-I"));
4123  
4124    m_pFileMenu->AppendSeparator();
4125 -  m_pFileMenu->Append(wxID_PRINT, "&Print...");
4126 -  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
4127 -  m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
4128 +  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
4129 +  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
4130 +  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Pre&view"));
4131    m_pFileMenu->AppendSeparator();
4132 -  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
4133 +  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
4134    m_pFileMenu->AppendSeparator();
4135 -  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
4136 -  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
4137 +  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
4138 +  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
4139    GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
4140    GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
4141  
4142    wxMenu *view_menu = new wxMenu;
4143 -  view_menu->Append(PLOTMENU_VIEW_SCALE_MINMAX, "Display Scale &Set...\tCtrl-E");
4144 -  view_menu->Append(PLOTMENU_VIEW_SCALE_AUTO, "Display Scale &Auto...\tCtrl-A");
4145 -  view_menu->Append(PLOTMENU_VIEW_SCALE_FULL, "Display &Full Scale\tCtrl-U");
4146 +  view_menu->Append(PLOTMENU_VIEW_SCALE_MINMAX, _T("Display Scale &Set...\tCtrl-E"));
4147 +  view_menu->Append(PLOTMENU_VIEW_SCALE_AUTO, _T("Display Scale &Auto...\tCtrl-A"));
4148 +  view_menu->Append(PLOTMENU_VIEW_SCALE_FULL, _T("Display &Full Scale\tCtrl-U"));
4149  
4150    wxMenu *help_menu = new wxMenu;
4151 -  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
4152 -  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
4153 -  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
4154 -  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
4155 +  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
4156 +  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
4157 +  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
4158 +  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
4159  
4160    wxMenuBar *menu_bar = new wxMenuBar;
4161  
4162 -  menu_bar->Append(m_pFileMenu, "&File");
4163 -  menu_bar->Append(view_menu, "&View");
4164 -  menu_bar->Append(help_menu, "&Help");
4165 +  menu_bar->Append(m_pFileMenu, _T("&File"));
4166 +  menu_bar->Append(view_menu, _T("&View"));
4167 +  menu_bar->Append(help_menu, _T("&Help"));
4168  
4169    subframe->SetMenuBar(menu_bar);
4170    subframe->Centre(wxBOTH);
4171 @@ -3466,7 +3480,7 @@
4172    m_pCanvas = CreateCanvas (m_pFrame);
4173    m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
4174    m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
4175 -  m_pFrame->SetTitle ("Plot File");
4176 +  m_pFrame->SetTitle (_T("Plot File"));
4177  
4178    m_pFrame->Show(true);
4179    Activate(true);
4180 @@ -3593,7 +3607,7 @@
4181  TextFileView::~TextFileView()
4182  {
4183    GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
4184 -  GetDocumentManager()->ActivateView(this, FALSE, TRUE);;
4185 +  GetDocumentManager()->ActivateView(this, FALSE);;
4186  }
4187  
4188  bool TextFileView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
4189 @@ -3603,9 +3617,9 @@
4190  
4191    int width, height;
4192    m_pFrame->GetClientSize(&width, &height);
4193 -  m_pFrame->SetTitle("TextFile");
4194 +  m_pFrame->SetTitle(_T("TextFile"));
4195    m_pCanvas = new TextFileCanvas (this, m_pFrame, wxPoint(-1,-1), wxSize(width, height), wxTE_MULTILINE | wxTE_READONLY);
4196 -  m_pFrame->SetTitle("Log");
4197 +  m_pFrame->SetTitle(_T("Log"));
4198  
4199    m_pFrame->Show (true);
4200    Activate (true);
4201 @@ -3629,7 +3643,7 @@
4202      return false;
4203  
4204    Activate(false);
4205 -  //GetDocumentManager()->ActivateView (this, false, true);
4206 +  //GetDocumentManager()->ActivateView (this, false);
4207    if (! GetDocument() || ! GetDocument()->Close())
4208      return false;
4209  
4210 @@ -3652,43 +3666,43 @@
4211  TextFileView::CreateChildFrame (wxDocument *doc, wxView *view)
4212  {
4213  #if CTSIM_MDI
4214 -  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "TextFile Frame", wxPoint(-1, -1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE, "Log");
4215 +  wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("TextFile Frame"), wxPoint(-1, -1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE, _T("Log"));
4216  #else
4217 -  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "TextFile Frame", wxPoint(-1, -1), wxSize(300, 150), wxDEFAULT_FRAME_STYLE, "Log");
4218 +  wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("TextFile Frame"), wxPoint(-1, -1), wxSize(300, 150), wxDEFAULT_FRAME_STYLE, _T("Log"));
4219  #endif
4220    theApp->setIconForFrame (subframe);
4221  
4222    m_pFileMenu = new wxMenu;
4223  
4224 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
4225 -  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
4226 -  m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
4227 -  m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
4228 -  m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
4229 -  //  m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
4230 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
4231 +  m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
4232 +  m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
4233 +  m_pFileMenu->Append(wxID_SAVE, _T("&Save\tCtrl-S"));
4234 +  m_pFileMenu->Append(wxID_SAVEAS, _T("Save &As..."));
4235 +  //  m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
4236  
4237    m_pFileMenu->AppendSeparator();
4238 -  m_pFileMenu->Append(wxID_PRINT, "&Print...");
4239 -  m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
4240 -  m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
4241 +  m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
4242 +  m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
4243 +  m_pFileMenu->Append(wxID_PREVIEW, _T("Print Pre&view"));
4244    m_pFileMenu->AppendSeparator();
4245 -  m_pFileMenu->Append(MAINMENU_IMPORT, "&Import...\tCtrl-M");
4246 +  m_pFileMenu->Append(MAINMENU_IMPORT, _T("&Import...\tCtrl-M"));
4247    m_pFileMenu->AppendSeparator();
4248 -  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
4249 -  m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
4250 +  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
4251 +  m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
4252    GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
4253    GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
4254  
4255    wxMenu *help_menu = new wxMenu;
4256 -  help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
4257 -  help_menu->Append (MAINMENU_HELP_TIPS, "&Tips");
4258 -  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
4259 -  help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
4260 +  help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
4261 +  help_menu->Append (MAINMENU_HELP_TIPS, _T("&Tips"));
4262 +  help_menu->Append (IDH_QUICKSTART, _T("&Quick Start"));
4263 +  help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
4264  
4265    wxMenuBar *menu_bar = new wxMenuBar;
4266  
4267 -  menu_bar->Append(m_pFileMenu, "&File");
4268 -  menu_bar->Append(help_menu, "&Help");
4269 +  menu_bar->Append(m_pFileMenu, _T("&File"));
4270 +  menu_bar->Append(help_menu, _T("&Help"));
4271  
4272    subframe->SetMenuBar(menu_bar);
4273    subframe->Centre(wxBOTH);
4274 @@ -3699,7 +3713,7 @@
4275  
4276  // Define a constructor for my text subwindow
4277  TextFileCanvas::TextFileCanvas (TextFileView* v, wxFrame* frame, const wxPoint& pos, const wxSize& size, long style)
4278 -: wxTextCtrl (frame, -1, "", pos, size, style), m_pView(v)
4279 +  : wxTextCtrl (frame, -1, _T(""), pos, size, style), m_pView(v)
4280  {
4281  }
4282  
4283 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
4284 --- ctsim/src/views.h   2007-09-04 00:40:08.000000000 -0600
4285 +++ ctsim-wx2.8/src/views.h     2008-07-29 20:22:04.805299915 -0600
4286 @@ -67,7 +67,7 @@
4287  
4288    int m_iDefaultExportFormatID;
4289  
4290 -  wxWindow* getFrameForChild()
4291 +  wxFrame* getFrameForChild()
4292  #if CTSIM_MDI
4293    { return theApp->getMainFrame(); }
4294  #else