Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

RegisterDialog

Registers a window or a dialog containing a tab control. Once registered, SftTabs/DLL will perform special tabbed dialog handling, such as accelerator key handling, ESCAPE and TAB key processing, etc.

C

BOOL WINAPI SftTabs_RegisterDialog(HWND hwndDialog);
BOOL WINAPI SftTabs_RegisterWindow(HWND hwndWnd);

Parameters

hwndDialog, hwndWnd

The window handle of the window or dialog to be registered.

Returns

The return value is TRUE if the window is successfully registered with SftTabs/DLL.

Comments

The RegisterDialog function registers a window or a dialog containing a tab control. Once registered, SftTabs/DLL will perform special tabbed dialog handling, such as accelerator key handling, ESCAPE and TAB key processing, etc.

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 key handling, etc.

A window or dialog registered using this function, must also be unregistered using SftTabs_UnregisterDialog or SftTabs_UnregisterWindow.

Example

This C example shows the end of a typical tabbed dialog WM_INITDIALOG message handler:


... additional initialization code ...

index = SftTabs_AddTab(hwndTab, TEXT("&Six"));
SftTabs_SetTabInfo(hwndTab, index, &Tab5);
SftTabs_SetControlInfo(hwndTab, &CtlInit);
SftTabs_SetCurrentTab(hwndTab, 0);

// Make sure to turn redraw back on
SendMessage(hwndTab, WM_SETREDRAW, (WPARAM)TRUE, 0);
InvalidateRect(hwndTab, NULL, TRUE);

// Activate current page.
SftTabs_ActivatePage(hwndParent, hwndTab, NULL, TRUE);

// Mark the window as a main, tabbed dialog (so accel. keys work) by registering it.
// Register the dialog AFTER activating the current page
SftTabs_RegisterDialog(hwndParent);

return FALSE; // WM_INITDIALOG, input focus already set

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


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