Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

DrawSelectionOutline

Draws a selection outline.

C

void WINAPI SftTabs_DrawSelectionOutline(HWND hwndCtl, HDC hDC, LPCRECT lpRect,
 COLORREF OutlineBorder, COLORREF InnerBorder, COLORREF InnerFill1, COLORREF InnerFill2);

C++

void CSftTabs::DrawSelectionOutline(HDC hDC, LPCRECT lpRect, COLORREF OutlineBorder,
 COLORREF InnerBorder, COLORREF InnerFill1, COLORREF InnerFill2) const;

Parameters

hwndCtl

The window handle of the tab 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.

Comments

The DrawSelectionOutline function draws a rounded selection outline rectangle.

Examples

C++

                color = Tab.colorBg;
            // translate to real color (if using system colors) or use default
            // tab control color if no tab color defined
            color = TrColor(color, RGB(255,255,255)); // or lpDrawInfo->colorBg

            if (SftTabs_GetGDIPlusAvailable(m_Tab)) {
                // GDI+ is available
                if (lpDrawInfo->fHighlight)
                    SftTabs_DrawSelectionOutline(m_Tab, lpDrawInfo->hDC, &lpDrawInfo->DrawRect, 0xFFBF00L, 0xf3f3e4L, 0xFFFFFFL, 0xDAC583L);
                else
                    SftTabs_DrawSelectionOutline(m_Tab, lpDrawInfo->hDC, &lpDrawInfo->DrawRect, 0xFFBF00L, 0xF2F0C8L, 0xFFFFFFL, 0xE6D8ADL);
            } else {
                // GDI+ is not available
                // If the tab control has the input focus, use a solid background
                if (lpDrawInfo->fFocus)
                    brFill.CreateSolidBrush(color);

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.