Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

TransparentControls

The dialogs used as pages of a tab control call SftTabs_TransparentControls to pass messages on to SftTabs/DLL so they can be processed.

C

BOOL WINAPI SftTabs_TransparentControls(HWND hwnd,
 SFTTABS_DRAWBACKGROUNDPROC lpfnDrawBackground,
 UINT* lpmessage, WPARAM* lpwParam, LPARAM* lplParam, LRESULT* lplResult,
 DWORD flag, SFTTABS_DWORD_PTR UserData);

Parameters

hwnd

The window handle of the tab page (the message's destination window).

lpfnDrawBackground

The address of an application supplied drawing callback for special background handling. An application can define a background color for a tab page using the SFTTABS_TAB, colorClientArea member (see SetTabInfo) or define a background bitmap using the SFTTABS_CONTROL, hInsideBitmap member (see SetControlInfo). lpfnDrawBackground overrides other background definitions and allows an application to render the background.

lpmessage, wParam, lParam

Message parameters.

lplResult

The message result value. If SftTabs_TransparentControls returns TRUE, this result value should be returned from the dialog procedure.

flag

Defines processing options. Use one of the following values:

0lpfnDrawBackground is ignored if Windows themes are active.
SFTTABS_DRAWBG_OVERRIDETHEMElpfnDrawBackground is always honored, even if Windows themes are active.

UserData

An application defined value that is passed to the background drawing callback lpfnDrawBackground as the UserData parameter.

Returns

The return value is TRUE if the message was processed by SftTabs/DLL, otherwise FALSE.

Comments

The TransparentControls function is called by the dialogs used as pages of a tab control to pass messages on to SftTabs/DLL so they can be processed.

If this function is not called, certain features of SftTabs/DLL may not appear to be working correctly, such as background handling, control transparency and transition effects.

When using C, the SftTabs_TransparentControls function handles background painting. It is not used for C++ and MFC. CSftTabsPage::m_lpfnDrawBackground can be used to define special background handling.

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.

Calling SftTabs_TransparentControls is required even if special background handling is not needed, to insure upward compatibility with future releases of this product.

Examples

C

        // initialize page
        SftTabs_SetPageActive(hwndDlg, (HWND) lParam, NULL);
        return !SftTabs_IsRegisteredDialog(GetParent(hwndDlg));
    }

    if (SftTabs_HandleDialogMessage(hwndDlg, msg, wParam, lParam))
        return TRUE;
    if (SftTabs_TransparentControls(hwndDlg, NULL, &msg, &wParam, &lParam, &lResult, 0, 0))
        return (BOOL) lResult;

    return FALSE;
}

HWND CALLBACK Page1_Callback(BOOL fCreate, HWND hwndOwner, HWND hwndPage, HWND hwndTab)
{
    if (fCreate) {                      // creating a new page

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


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