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
Defines the type of a user-supplied drawing callback routine called by SftTabs/DLL, which paints the tab page background.
typedef void (CALLBACK* SFTTABS_DRAWBACKGROUNDPROC)(HDC hDC, HWND hwndDlg, HWND hwndTab, SFTTABS_DWORD_PTR UserData);
hDC
The device context used to paint the tab page background.
hwndDlg
The window handle of the dialog representing the tab page.
hwndTab
The window handle of the tab control containing the tab page.
UserData
An application specific value as supplied using SftTabs_TransparentControls or CSftTabsPage::m_lpfnDrawBackground.
SFTTABS_DRAWBACKGROUNDPROC defines the type of a user-supplied drawing callback routine called by SftTabs/DLL, which paints the tab page background.
The background drawing callback is defined using SftTabs_TransparentControls (C) or CSftTabsPage::m_lpfnDrawBackground (C++/MFC). It is called by SftTabs/DLL to allow the application to display a custom tab page background.
The callback function can retrieve tab control and tab settings, but no modifications should be made to the tab control in any way.
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.
This example paints a custom tab page background by filling the tab page with a tiled bitmap.
C
... tab page dialog procedure LRESULT lResult; if (SftTabs_HandleDialogMessage(hwndDlg, msg, wParam, lParam)) return TRUE; if (SftTabs_TransparentControls(hwndDlg, Page2_DrawBackground, &msg, &wParam, &lParam, &lResult, SFTTABS_DRAWBG_OVERRIDETHEME, 0)) return lResult; } void CALLBACK Page2_DrawBackground(HDC hDC, HWND hwndDlg, HWND hwndTab, SFTTABS_DWORD_PTR UserData) { RECT rect; GetClientRect(hwndDlg, &rect); SftTabs_PaintTiledBitmap(hDC, m_hBackgroundBitmap, 0, 0, &rect); }
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