X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f1af9204f1813a10e2c59a5f9b28a7eec630861..5b077d483bcd47bcd1c3e89a9adc1d6b1a44e046:/include/wx/msw/window.h diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 21d27e908b..27d739947d 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -454,13 +454,15 @@ public: void OnEraseBackground(wxEraseEvent& event); void OnChar(wxKeyEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnKeyUp(wxKeyEvent& event); void OnPaint(wxPaintEvent& event); void OnIdle(wxIdleEvent& event); // Does this window want to accept keyboard focus? virtual bool AcceptsFocus() const; - virtual void PrepareDC( wxDC &dc ) {}; + virtual void PrepareDC( wxDC& WXUNUSED(dc) ) {}; public: //////////////////////////////////////////////////////////////////////// //// IMPLEMENTATION @@ -612,6 +614,8 @@ public: virtual void MSWOnMouseLeave(int x, int y, WXUINT flags); virtual void MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE); + virtual void MSWOnKeyDown(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE); + virtual void MSWOnKeyUp(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE); virtual bool MSWOnActivate(int flag, bool minimized, WXHWND activate); virtual long MSWOnMDIActivate(long flag, WXHWND activate, WXHWND deactivate); @@ -761,7 +765,7 @@ inline int wxWindow::GetId() const { return m_windowId; } inline void wxWindow::SetId(int id) { m_windowId = id; } inline wxWindow *wxWindow::GetParent() const { return m_windowParent; } inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; } -inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); } +inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); } inline wxList& wxWindow::GetChildren() const { return (wxList&) *m_children; } inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; } inline wxString wxWindow::GetName() const { return m_windowName; }