X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d4b632ba3c0e5e5c43412d2d7a2b485b8fcebf2..55cca86849db86abe32f10db475a1e3e9bf461bb:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index c9d836f4ea..3ca7f9177c 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -43,7 +43,6 @@ # include #endif -#if !USE_SHARED_LIBRARY // ---------------------------------------------------------------------------- // event tables and other macros @@ -68,7 +67,6 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo) END_EVENT_TABLE() -#endif // USE_SHARED_LIBRARY // ============================================================================ // implementation @@ -88,11 +86,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, const wxSize& size, long style, #if wxUSE_VALIDATORS -# if defined(__VISAGECPP__) - const wxValidator* validator, -# else const wxValidator& validator, -# endif #endif const wxString& name) { @@ -306,7 +300,8 @@ void wxTextCtrl::Paste() 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); } @@ -314,7 +309,8 @@ bool wxTextCtrl::CanCopy() const 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); } @@ -531,7 +527,7 @@ bool wxTextCtrl::PositionToXY(long pos, long *x, long *y) const 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 ) @@ -802,10 +798,10 @@ bool wxTextCtrl::AcceptsFocus() const 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;