HeaderPane
Main
Hide

SftMask/DLL 7.0 - Masked Edit Control

Share Link
Print

RegisterApp

Registers the SftMask window classes with a process (RegisterApp); unregisters them and performs cleanup (UnregisterApp).

C

BOOL SftMask_RegisterApp(HINSTANCE hInst);
void SftMask_UnregisterApp(HINSTANCE hInst);

C++

static BOOL CSftMask::RegisterApp();
static void CSftMask::UnregisterApp();

Parameters

hInst

The application's instance handle (the C++ class uses AfxGetInstanceHandle).

Returns

RegisterApp returns TRUE if the window classes were registered successfully.

Comments

RegisterApp must be called before any SftMask/DLL controls are created, normally during application initialization (in MFC applications, in InitInstance). UnregisterApp must be called after all SftMask/DLL controls have been destroyed, normally during application termination (in MFC applications, in ExitInstance).

In Debug builds, the DLL verifies the product activation; see the product license agreement for details. Release builds of your application can be distributed royalty-free.

Examples

C

/*                              WinMain                               */
/**********************************************************************/

int PASCAL WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpszCmdLine, int cmdShow)
{
    g_hInst = hinst;

    SftDarkMode_Init();                 /* Dark mode support */
    SftMask_RegisterApp(hinst);         /* Register with SftMask/DLL */

    DialogBox(g_hInst, MAKEINTRESOURCE(IDD_MAIN), NULL, MainDialogProc);

    SftMask_UnregisterApp(hinst);       /* Unregister from SftMask/DLL */

    return 0;
}

See Also Using C | Using C++/MFC | SFTMASK_CLASS


Last Updated 08/30/2026 - (email)
© 2026 Softel vdm, Inc.