SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Returns the dimensions of the column header dropdown/filter button.
C
BOOL WINAPI SftTree_GetDisplayHeaderDropDownRect(HWND hwndCtl, int realCol, LPRECT lpRect); BOOL WINAPI SftTreeSplit_GetDisplayHeaderDropDownRect(HWND hwndCtl, int realCol, LPRECT lpRect);
C++
BOOL CSftTree:GetDisplayHeaderDropDownRect(int dispCol, LPRECT lpRect) const; BOOL CSftTreeSplit:GetDisplayHeaderDropDownRect(int dispCol, LPRECT lpRect) const;
hwndCtl
The window handle of the tree control.
realCol
The zero-based column number whose location is to be retrieved.
lpRect
A pointer to a RECT structure where the location of the requested column header dropdown/filter button is returned.
The return value is TRUE if the function was successful, otherwise FALSE is returned.
The GetDisplayHeaderDropDownRect function returns the dimensions of the column header dropdown/filter button.
The coordinates returned in lpRect are coordinates relative to the tree control's client area (in pixels).
The dimensions of the entire header area can be retrieved using GetHeaderRect.
break; } case SFTTREEN_LBUTTONDOWN_COLUMN_HEADERDD: case SFTTREEN_LBUTTONDBLCLK_COLUMN_HEADERDD: { /* The user clicked/double-clicked the header dropdown/filter */ int col = SftTree_GetHeaderButton(g_hwndTree); if (col >= 0) { RECT rect; if (SftTree_GetDisplayHeaderDropDownRect(g_hwndTree, col, &rect)) { MapWindowPoints(g_hwndTree, GetDesktopWindow(), (LPPOINT)&rect, 2); ShowHeaderMenu(hwnd, g_hwndTree, rect.left, rect.bottom); } } break; } }
} /* Colummn Dropdown/Filter was clicked */ void CSampleView::OnColumnHeaderDDClick() { int col = m_Tree.GetHeaderButton(); if (col >= 0) { CRect rect; if (m_Tree.GetDisplayHeaderDropDownRect(col, &rect)) { m_Tree.MapWindowPoints(NULL, &rect); ShowHeaderMenu(CPoint(rect.left, rect.bottom)); } } } /*------------------------------------------------------------------------------*/
See Also C/C++ API | Categories | Notifications