]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/dialoged/src/reseditr.cpp
Changed to use new wxWindow->Reparent call to allow build with current cvs
[wxWidgets.git] / utils / dialoged / src / reseditr.cpp
index a6a17293a530c31b0ae5dd3d6116f07330daa68c..55a60b962cabc2ce7b57fc6df0a13a6638c67c07 100644 (file)
 #include <strstream>
 #endif
 
-#ifdef __WXMSW__
-#include <windows.h>
-#endif
-
 #ifdef __WXMSW__
 #include "wx/help.h"
 #endif
@@ -152,12 +148,13 @@ wxResourceManager::~wxResourceManager()
 bool wxResourceManager::Initialize()
 {
   // Set up the resource filename for each platform.
+  // TODO: This shold be replaced by wxConfig usage.
 #ifdef __WXMSW__
   // dialoged.ini in the Windows directory
-  char buf[256];
-  GetWindowsDirectory(buf, 256);
-  strcat(buf, "\\dialoged.ini");
-  m_optionsResourceFilename = buf;
+  wxString windowsDir = wxGetOSDirectory();
+  windowsDir += "\\dialoged.ini" ;
+
+  m_optionsResourceFilename = windowsDir;
 #elif defined(__WXGTK__) || defined(__WXMOTIF__)
   wxGetHomeDir( &m_optionsResourceFilename );
   m_optionsResourceFilename += "/.dialogedrc";
@@ -2191,7 +2188,6 @@ void wxResourceEditorFrame::OnCloseWindow(wxCloseEvent& event)
  */
 
 BEGIN_EVENT_TABLE(wxResourceEditorScrolledWindow, wxScrolledWindow)
-    EVT_SCROLL(wxResourceEditorScrolledWindow::OnScroll)
     EVT_PAINT(wxResourceEditorScrolledWindow::OnPaint)
 END_EVENT_TABLE()
 
@@ -2210,17 +2206,6 @@ wxResourceEditorScrolledWindow::~wxResourceEditorScrolledWindow()
 {
 }
 
-void wxResourceEditorScrolledWindow::OnScroll(wxScrollEvent& event)
-{
-    wxScrolledWindow::OnScroll(event);
-
-    int x, y;
-    ViewStart(& x, & y);
-
-    if (m_childWindow)
-        m_childWindow->Move(m_marginX + (- x * 10), m_marginY + (- y * 10));
-}
-
 void wxResourceEditorScrolledWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);