X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6d94998fcbdb3ce60774e38c0d4b6ee20c6798..f855e630cc1f05707835d796f5338de1fe68bd2f:/include/wx/msw/window.h diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 8f151883fb..27d739947d 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -108,6 +108,15 @@ private: wxString m_data; }; +// Clash with Windows headers +#ifdef GetCharWidth +#undef GetCharWidth +#endif + +#ifdef FindWindow +#undef FindWindow +#endif + class WXDLLEXPORT wxWindow : public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxWindow) @@ -445,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 @@ -603,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); @@ -752,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; }