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
Retrieves the private message ID sent to a page of a tabbed dialog when the user chooses to switch to another page or to end the tabbed dialog.
C
UINT SftTabs_GetEndPageMessage();
The return value is the private message ID sent to a page of a tabbed dialog when the user chooses to switch to another page or to end the tabbed dialog.
The GetEndPageMessage function retrieves the private message ID sent to a page of a tabbed dialog when the user chooses to switch to another page or to end the tabbed dialog.
The returned value is typically used in a page's window procedure or dialog procedure to handle the specified message. This message allows an application to control whether the user can switch to another page. When a page receives the message defined by SftTabs_GetEndPageMessage, it can return TRUE to prevent the user from switching to another page or FALSE to allow the page switch.
This function is used to determine the private Windows message used by the tab control, instead of WM_QUERYENDSESSION. While WM_QUERYENDSESSION continues to be supported, an application can implement support for WM_QUERYENDSESSION or the private message defined by SftTabs_GetEndPageMessage. WM_QUERYENDSESSION is not supported on Windows Mobile platforms.
This example of a page's dialog procedure prevents switching to another tab if the input data is invalid.
C
BOOL CALLBACK Page2_DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { LRESULT lResult; if (msg == SftTabs_GetEndPageMessage()) { if (!InputFieldsValid()) { MessageBox(hwndDlg, TEXT("Invalid Input!"), TEXT("Sample"), MB_APPLMODAL|MB_ICONSTOP|MB_OK); SetWindowLong(hwndDlg, DWLP_MSGRESULT, TRUE); // cancel page switching // this is a dialog proc, so we can't simply return True/False // we have to use SetWindowLong instead. In a regular window proc // we could simply return True/False } return TRUE; // message handled } switch (msg) { case WM_INITDIALOG: .... } if (SftTabs_HandleDialogMessage(hwndDlg, msg, wParam, lParam)) return TRUE; if (SftTabs_TransparentControls(hwndDlg, Page2_DrawBackground, &msg, &wParam, &lParam, &lResult, SFTTABS_DRAWBG_OVERRIDETHEME, 0)) return (BOOL) lResult; return FALSE; }
See Also C/C++ API | C++ Classes | Notifications