From a7e594b239c5750b4e12def2b9cbbef1179a1eca Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 26 Oct 1998 18:34:17 +0000 Subject: [PATCH] Added OnEraseBackground to wxNotebook on wxMSW to avoid black background; wxTreeCtrl mod for BC++ git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/generic.rsp | 11 +++++++++++ include/wx/msw/notebook.h | 1 + include/wx/msw/treectrl.h | 2 +- src/msw/notebook.cpp | 7 +++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index 0cd8544c3f..05d9001f46 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -634,6 +634,17 @@ samples/tab/*.xpm samples/tab/*.ico samples/tab/*.txt +samples/notebook/*.cpp +samples/notebook/*.h +samples/notebook/makefile* +samples/notebook/*.rc +samples/notebook/*.def +samples/notebook/*.bmp +samples/notebook/*.xbm +samples/notebook/*.xpm +samples/notebook/*.ico +samples/notebook/*.txt + samples/png/*.cpp samples/png/*.h samples/png/makefile* diff --git a/include/wx/msw/notebook.h b/include/wx/msw/notebook.h index 82d90dcffe..7ce1bd4274 100644 --- a/include/wx/msw/notebook.h +++ b/include/wx/msw/notebook.h @@ -159,6 +159,7 @@ public: void OnSelChange(wxNotebookEvent& event); void OnSetFocus(wxFocusEvent& event); void OnNavigationKey(wxNavigationKeyEvent& event); + void OnEraseBackground(wxEraseEvent& event); // base class virtuals // ------------------- diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index ce4523f1e2..021c68d66a 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -143,7 +143,7 @@ public: // accessors: set/get the item associated with this node void SetId(const wxTreeItemId& id) { m_itemId = id; } - const wxTreeItemId& GetId() const { return m_itemId; } + const wxTreeItemId& GetId() const { return (wxTreeItemId&) m_itemId; } }; // ---------------------------------------------------------------------------- diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 742d04e8b9..04278992fb 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -63,6 +63,7 @@ EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) EVT_SIZE(wxNotebook::OnSize) + EVT_ERASE_BACKGROUND(wxNotebook::OnEraseBackground) EVT_SET_FOCUS(wxNotebook::OnSetFocus) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) END_EVENT_TABLE() @@ -476,3 +477,9 @@ void wxNotebook::ChangePage(int nOldSel, int nSel) m_nSelection = nSel; } + +void wxNotebook::OnEraseBackground(wxEraseEvent& event) +{ + Default(); +} + -- 2.45.2