Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

m_UserDataBackground

Defines an application defined value that is passed to the background drawing callback CSftTabsPage::m_lpfnDrawBackground as the UserData parameter.

C++

SFTTABS_DWORD_PTR CSftTabsPage::m_UserDataBackground;

Comments

The m_UserDataBackground member defines an application defined value that is passed to the background drawing callback CSftTabsPage::m_lpfnDrawBackground as the UserData parameter.

When using C, the SftTabs_TransparentControls function handles background painting.

Example

This example paints a custom tab page background by filling the tab page with a tiled bitmap.

C++

CSamplePage::CSamplePage(CWnd* pParent /*=NULL*/) : CSftTabsPage(CSamplePage::IDD, pParent)
{
    m_lpfnDrawBackground = SamplePage_DrawBackground;
    m_flagDrawBackground = SFTTABS_DRAWBG_OVERRIDETHEME;
    m_UserDataBackground = (SFTTABS_DWORD_PTR)this;
    m_BackgroundBitmap.LoadBitmap(IDB_BACKGROUND);
}
void CALLBACK SamplePage_DrawBackground(HDC hDC, HWND hwndDlg, HWND hwndTab, SFTTABS_DWORD_PTR UserData)
{
    CSamplePage* pThis = (CSamplePage*)UserData;
    RECT rect;
    GetClientRect(hwndDlg, &rect);
    SftTabs_PaintTiledBitmap(hDC, pThis->m_BackgroundBitmap, 0, 0, &rect);
}

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


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