SftTabs/DLL 6.0

HandleDialogMessage

Softel vdm, Inc.

The parent dialog window of a tab control and the dialogs used as pages of a tab control call SftTabs_HandleDialogMessage to pass messages on to SftTabs/DLL so they can be processed.

C

BOOL WINAPI SftTabs_HandleDialogMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);

Parameters

hwnd

The window handle of the destination window.

msg

Message ID.

wParam, lParam

Message parameters.

Returns

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

Comments

The HandleDialogMessage function is called by the parent dialog window of a tab control and 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 accelerator keys, tab switching, ESCAPE and TAB key handling, etc. For windows (as opposed to dialogs) with tab controls, use the SftTabs_HandleWindowMessage function instead.

Example

This C example shows a dialog procedure for a dialog page:

BOOL CALLBACK Page1_DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) 
{
    LRESULT lResult;
    switch (msg) { 
    case WM_INITDIALOG: 
        SetWindowText(GetDlgItem(hwndDlg, IDC_P1_EDIT1), TEXT("Click another tab")); 
        SendMessage(GetDlgItem(hwndDlg, IDC_P1_CHECK1), BM_SETCHECK, 1, 0); 
        // initialize page
        SftTabs_SetPageActive(hwndDlg, (HWND) lParam, NULL);
        return !SftTabs_IsRegisteredDialog(GetParent(hwndDlg));
    } 
    // Any message your dialog procedure doesn't handle, must come here 
    if (SftTabs_HandleDialogMessage(hwndDlg, msg, wParam, lParam)) 
        return TRUE; 
    if (SftTabs_TransparentControls(hwndDlg, NULL, &msg, &wParam, &lParam, &lResult, 0, 0))
        return lResult;
    return FALSE; 
}

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


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