X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ce7af354a12de8cf0d80d27f6958c6ccd95f766..53ae92099f3b4226bfcfaff2aa8f304c38183c9d:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 7c3ceddae1..fda283e496 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -519,6 +519,25 @@ bool wxNotebook::InsertPage(int nPage, return TRUE; } +// Hit test +int wxNotebook::HitTest(const wxPoint& pt, long& flags) +{ + TC_HITTESTINFO hitTestInfo; + hitTestInfo.pt.x = pt.x; + hitTestInfo.pt.y = pt.y; + int item = TabCtrl_HitTest( (HWND) GetHWND(), & hitTestInfo ) ; + flags = 0; + + if ((hitTestInfo.flags & TCHT_NOWHERE) == TCHT_NOWHERE) + flags |= wxNB_HITTEST_NOWHERE; + if ((hitTestInfo.flags & TCHT_ONITEMICON) == TCHT_ONITEMICON) + flags |= wxNB_HITTEST_ONICON; + if ((hitTestInfo.flags & TCHT_ONITEMLABEL) == TCHT_ONITEMLABEL) + flags |= wxNB_HITTEST_ONLABEL; + + return item; +} + // ---------------------------------------------------------------------------- // wxNotebook callbacks // ----------------------------------------------------------------------------