SftTabs/DLL 6.0

m_flagDrawBackground

Softel vdm, Inc.

Defines background handling for the tab page.

C++

DWORD CSftTabsPage::m_flagDrawBackground;

Comments

The m_flagDrawBackground member defines background handling for the tab page.

m_flagDrawBackground defines background handling for the tab page, using one of the following values:

0

CSftTabsPage::m_lpfnDrawBackground is ignored if Windows themes are active.

SFTTABS_DRAWBG_OVERRIDETHEME

CSftTabsPage::m_lpfnDrawBackground is always honored, even if Windows themes are active.

When using C, the SftTabs_TransparentControls function handles background painting.

Backgrounds are only supported on Windows XP (using Common Controls version 6) and above. While it is possible to enable backgrounds for all environments, most Windows controls will not be rendered correctly. Background colors based on SFTTABS_TAB, colorClientArea are supported in all environments.

Windows Mobile Edition: m_flagDrawBackground is not supported.

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


Feedback / comments / error reports for this topic
© 2016 - Softel vdm, Inc. - www.softelvdm.com