size_t lenOld = GetValue().length();
wxUint32 code = event.GetRawKeyCode();
- ::keybd_event(code, 0, 0 /* key press */, NULL);
- ::keybd_event(code, 0, KEYEVENTF_KEYUP, NULL);
+ ::keybd_event(code, 0, 0 /* key press */, 0);
+ ::keybd_event(code, 0, KEYEVENTF_KEYUP, 0);
// assume that any alphanumeric key changes the total number of characters
// in the control - this should work in 99% of cases
long wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
+ long lRc = wxTextCtrlBase::MSWWindowProc(nMsg, wParam, lParam);
+
if ( nMsg == WM_GETDLGCODE )
{
// we always want the chars and the arrows
if ( HasFlag(wxTE_PROCESS_TAB) )
lDlgCode |= DLGC_WANTTAB;
- return lDlgCode;
+ lRc |= lDlgCode;
}
- return wxTextCtrlBase::MSWWindowProc(nMsg, wParam, lParam);
-}
-
-void wxTextCtrl::SetFocus()
-{
- wxTextCtrlBase::SetFocus();
-
- // to be consistent with the standard Windows behaviour we select all text
- // in the single line edit controls when the user TABs to them and also, to
- // be consistent with this behaviour in turn, do it whenever SetFocus() is
- // called as well
- if ( !HasFlag(wxTE_MULTILINE) )
- {
- SetSelection(-1, -1);
- }
+ return lRc;
}
// ----------------------------------------------------------------------------
// EN_LINK processing
// ----------------------------------------------------------------------------
-bool wxTextCtrl::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM *result)
+bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{
NMHDR *hdr = (NMHDR* )lParam;
if ( hdr->code == EN_LINK )
::SetCursor(GetHcursorOf(wxCursor(wxCURSOR_HAND)));
*result = TRUE;
break;
+
case WM_MOUSEMOVE:
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
return TRUE;
}
- // not processed
- return FALSE;
+ // not processed, leave it to the base class
+ return wxTextCtrlBase::MSWOnNotify(idCtrl, lParam, result);
}
// ----------------------------------------------------------------------------