#   include <fstream>
 #endif
 
-#if !USE_SHARED_LIBRARY
 
 // ----------------------------------------------------------------------------
 // event tables and other macros
     EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo)
 END_EVENT_TABLE()
 
-#endif // USE_SHARED_LIBRARY
 
 // ============================================================================
 // implementation
                         const wxSize& size,
                         long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                        const wxValidator* validator,
-#  else
                         const wxValidator& validator,
-#  endif
 #endif
                         const wxString& name)
 {
 bool wxTextCtrl::CanCopy() const
 {
     // Can copy if there's a selection
-    long from, to;
+    long from = 0L;
+    long to = 0L;
 //    GetSelection(& from, & to);
     return (from != to);
 }
 bool wxTextCtrl::CanCut() const
 {
     // Can cut if there's a selection
-    long from, to;
+    long from = 0L;
+    long to = 0L;
 //    GetSelection(& from, & to);
     return (from != to);
 }
     HWND hWnd = GetHwnd();
 
     // This gets the line number containing the character
-    int lineNo;
+    int lineNo = -1;
 //    lineNo = (int)SendMessage(hWnd, EM_LINEFROMCHAR, (WPARAM)pos, 0);
 
     if ( lineNo == -1 )
     return IsEditable() && wxControl::AcceptsFocus();
 }
 
-wxSize wxTextCtrl::DoGetBestSize()
+wxSize wxTextCtrl::DoGetBestSize() const
 {
     int cx, cy;
-    wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, (wxFont*)&GetFont());
 
     int wText = DEFAULT_ITEM_WIDTH;