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
Draws a selection outline.
C
void WINAPI SftTree_DrawSelectionOutline(HWND hwndCtl, HDC hDC, LPCRECT lpRect, COLORREF OutlineBorder, COLORREF InnerBorder, COLORREF InnerFill1, COLORREF InnerFill2); void WINAPI SftTreeSplit_DrawSelectionOutline(HWND hwndCtl, HDC hDC, LPCRECT lpRect, COLORREF OutlineBorder, COLORREF InnerBorder, COLORREF InnerFill1, COLORREF InnerFill2);
C++
void CSftTree::DrawSelectionOutline(HDC hDC, LPCRECT lpRect, COLORREF OutlineBorder, COLORREF InnerBorder, COLORREF InnerFill1, COLORREF InnerFill2) const; int CSftTreeSplit::DrawSelectionOutline(HDC hDC, LPCRECT lpRect, COLORREF OutlineBorder, COLORREF InnerBorder, COLORREF InnerFill1, COLORREF InnerFill2) const;
hwndCtl
The window handle of the tree control.
HDC
The device context handle, where the selection outline is to be rendered.
lpRect
The location and size of the selection outline.
OutlineBorder
The outermost border color used to render the rounded selection outline rectangle.
InnerBorder
The inner border color used to render the rounded selection outline rectangle.
InnerFill1
The starting color (top) used to gradient fill the inside of the rounded selection outline rectangle.
InnerFill2
The ending color (bottom) used to gradient fill the inside of the rounded selection outline rectangle.
The DrawSelectionOutline function draws a rounded selection outline rectangle.
This function is normally only used with ownerdraw cells (see OwnerDrawCallback).
DrawText(lpInfo->hDC, szText, -1, &r, DT_CALCRECT | DT_LEFT | DT_SINGLELINE); InflateRect(&r, lpInfo->gap/2, 0); lpInfo->DrawRect = r; } else { // we need to paint the cell RECT r; FillRect(lpInfo->hDC, &lpInfo->DrawRect, (HBRUSH) (COLOR_3DFACE+1)); if (lpInfo->fSelected) SftTree_DrawSelectionOutline(lpInfo->hwndCtl, lpInfo->hDC, &lpInfo->DrawRect, RGB(128,0,0), RGB(255,100,100), RGB(255,255,255), RGB(255,0,0)); r = lpInfo->DrawRect; InflateRect(&r, -lpInfo->gap/2, 0); DrawText(lpInfo->hDC, szText, -1, &r, DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS); } SelectObject(lpInfo->hDC, hOldFont); }
lpInfo->DrawRect = r; } else { // we need to paint the cell RECT r; CBrush br; br.CreateSysColorBrush(COLOR_3DFACE); pDC->FillRect(&lpInfo->DrawRect, &br); if (lpInfo->fSelected) pTree->DrawSelectionOutline(lpInfo->hDC, &lpInfo->DrawRect, RGB(128,0,0), RGB(255,100,100), RGB(255,255,255), RGB(255,0,0)); r = lpInfo->DrawRect; InflateRect(&r, -lpInfo->gap/2, 0); pDC->DrawText(strText, &r, DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS); } pDC->SelectObject(pOldFont); }
See Also C/C++ API | Categories | Notifications