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
Register or unregister the SftButton/DLL window classes with the current process. RegisterApp must be called before any SftButton control is created; UnregisterApp must be called after all SftButton controls have been destroyed.
C
BOOL SftButton_RegisterApp(HINSTANCE hInstance); void SftButton_UnregisterApp(HINSTANCE hInstance);
C++
static BOOL CSftButton::RegisterApp(); static void CSftButton::UnregisterApp();
hInstance
The instance handle of the calling application (typically the hInstance passed to WinMain or obtained from AfxGetInstanceHandle in MFC). The C++ variants read the instance handle from MFC automatically.
RegisterApp returns TRUE on success. UnregisterApp returns no value.
The typical call site for RegisterApp in a plain-Win32 application is immediately after the WinMain entry, before any dialog or window is created. In an MFC application, CSftButton::RegisterApp() goes in InitInstance and CSftButton::UnregisterApp() in ExitInstance.
Calling RegisterApp twice for the same process is a no-op. UnregisterApp is internally reference-counted against RegisterApp.
g_hInst = hinst;
icc.dwSize = sizeof(icc);
icc.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&icc);
// Register with SftButton/DLL
SftButton_RegisterApp(hinst);
// Initialize dark mode support
SftDarkMode_Init();
DialogBox(hinst, MAKEINTRESOURCE(IDD_MAIN), NULL, Main_DialogProc);
// Unregister from SftButton/DLL
SftButton_UnregisterApp(hinst);
{
}
CSimpleApp NEAR theApp;
BOOL CSimpleApp::InitInstance()
{
SftDarkMode_Init(); // Dark mode support
CSftButton::RegisterApp(); // Register with SftButton/DLL
CMainDlg dlg;
m_pMainWnd = &dlg;
dlg.DoModal();
return FALSE;
}See Also C/C++ API | Using C | Using C++/MFC
