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
Copies the window caption of a window to another window.
C
void WINAPI SftTabs_CopyWindowTitle(HWND hwndFrom, HWND hwndTo);
hwndFrom
The window handle of the window whose caption is to be copied to hwndTo.
hwndTo
The window handle of the window which is to receive the window caption copied from hwndFrom.
The CopyWindowTitle function copies the window caption of a window to another window.
SftTabs_CopyWindowTitle is typically used in a SFTTABS_TABCALLBACK function to copy a page's caption to the enclosing dialog.
If the window caption described by hwndFrom is an empty string, the caption of the window described by hwndTo is not changed.
C
HWND CALLBACK Page1_Callback(BOOL fCreate, HWND hwndOwner, HWND hwndPage, HWND hwndTab) { if (fCreate) { // creating a new page if (hwndPage) { // already created, we could do some initialization here. // this will be called every time the page becomes active. // The WM_SHOWWINDOW message is also sent to the page and could // be used to determine activation/deactivation of the page. // optional, set the main window's title to the window title defined for this page SftTabs_CopyWindowTitle(hwndPage, hwndOwner); return NULL; // return NULL, ignored } else { // Create the page. // You can create and initialize any type of window here, not just dialogs. // Use CreateWindow to create other windows. Don't specify WS_VISIBLE, but // make sure you use WS_TABSTOP. // When creating a non-dialog window, make sure to call SftTabs_SetPageActive // after the page has been created. HWND hwnd = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_PAGE1), hwndOwner, (DLGPROC)Page1_DialogProc, (LPARAM)hwndTab);// pass tab control as data // optional, set the main window's title to the window title defined for this page SftTabs_CopyWindowTitle(hwnd, hwndOwner); return hwnd; } } else { // destroying page if (hwndOwner) // - because we're switching away return hwndPage; // keep the window handle, don't destroy it else { // - because we're closing the main dialog DestroyWindow(hwndPage); return NULL; } } }
if (fCreate) { // creating a new page if (hwndPage) { // already created, we could do some initialization here. // this will be called every time the page becomes active. // The WM_SHOWWINDOW message is also sent to the page and could // be used to determine activation/deactivation of the page. // optional, set the main window's title to the window title defined for this page SftTabs_CopyWindowTitle(hwndPage, hwndOwner); return NULL; // return NULL, ignored } else { // Create the page. // You can create and initialize any type of window here, not just dialogs. // Use CreateWindow to create other windows. Don't specify WS_VISIBLE, but // make sure you use WS_TABSTOP. // When creating a non-dialog window, make sure to call SftTabs_SetPageActive
See Also C/C++ API | C++ Classes | Notifications