X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fdf858b87878bb6c52c06547a199ce9d9ab2b87..e1720942b02fdf109d23a519bf21033483b4bdab:/src/msw/treectrl.cpp diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index d412e56ef7..5dcb0867c0 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -59,7 +59,7 @@ #include "wx/msw/gnuwin32/extra.h" #endif -#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) +#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)) #include #endif @@ -1921,6 +1921,13 @@ bool wxTreeCtrl::GetBoundingRect(const wxTreeItemId& item, bool textOnly) const { RECT rc; + + // Virtual root items have no bounding rectangle + if ( IS_VIRTUAL_ROOT(item) ) + { + return false; + } + if ( TreeView_GetItemRect(GetHwnd(), HITEM(item), &rc, textOnly) ) {