]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
Rotated text patch from Hans-Joachim Baader (with some corrections)
[wxWidgets.git] / src / msw / treectrl.cpp
index aebe08ac3959d08b6d478bd7a7dd10abcd8f2bf9..96818dd14dc20d41f0dcfd20094cfccea1fb86f6 100644 (file)
@@ -723,6 +723,12 @@ bool wxTreeCtrl::IsVisible(const wxTreeItemId& item) const
 {
     // Bug in Gnu-Win32 headers, so don't use the macro TreeView_GetItemRect
     RECT rect;
+
+    // this ugliness comes directly from MSDN - it *is* the correct way to pass
+    // the HTREEITEM with TVM_GETITEMRECT
+    *(WXHTREEITEM *)&rect = (WXHTREEITEM)item;
+
+    // FALSE means get item rect for the whole item, not only text
     return SendMessage(GetHwnd(), TVM_GETITEMRECT, FALSE, (LPARAM)&rect) != 0;
 
 }