X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f38374d0d7aa865e9bbe8ee61b75b94ffcdfb220..50494a55ae4f0ec07a15b811dbcce5a8ae9fc7bc:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index 20aeec6bb9..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 @@ -302,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); } @@ -310,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); } @@ -527,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 ) @@ -798,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;