X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7cf98a658a11f0ea3fb723ea686a77b8adb39718..f60d0f944a6ce86bce59901e7ea3811f0992bce7:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index dc70319e75..0f5afa110a 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -200,9 +200,9 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, SubclassWin(GetHWND()); - if ( parent->GetFont() && parent->GetFont()->Ok() ) + if ( parent->GetFont().Ok() && parent->GetFont().Ok() ) { - SetFont(* parent->GetFont()); + SetFont(parent->GetFont()); } else { @@ -328,7 +328,7 @@ void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags) int cx; // button font dimensions int cy; - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); + wxGetCharSize(GetHWND(), &cx, &cy, & GetFont()); int control_width, control_height, control_x, control_y; @@ -937,6 +937,22 @@ WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, void wxTextCtrl::OnChar(wxKeyEvent& event) { + // Fix by Marcel Rasche to allow Alt-Ctrl insertion of special characters + switch(event.KeyCode()) + { + case '{': + case '}': + case '[': + case ']': + case '|': + case '~': + case '\\': + { + char c=(char)event.KeyCode(); + *this << c; + } + break; + } if ( (event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); @@ -1034,7 +1050,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) : wxEVT_SET_FOCUS, m_windowId); event.SetEventObject( this ); - ProcessEvent(event); + GetEventHandler()->ProcessEvent(event); } break; @@ -1083,7 +1099,7 @@ bool wxTextCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) event.SetEventObject( this ); event.SetEventType(eventType); - if ( !ProcessEvent(event) ) + if ( !GetEventHandler()->ProcessEvent(event) ) return FALSE; return TRUE;