Unregisters an application from SftDate/DLL.
C
void WINAPI SftDate_UnregisterApp(HINSTANCE hInst);
C++
static void CSftDate::UnregisterApp(); static void CSftCalendar::UnregisterApp();
hInst
The instance handle of the application that was registered using RegisterApp. CSftDate::UnregisterApp and CSftCalendar::UnregisterApp use the instance handle of the MFC application (AfxGetInstanceHandle).
The UnregisterApp function ends the use of SftDate/DLL by an application. It is called once the application no longer uses date field and month calendar controls, after all controls have been destroyed, typically just before the application ends.
UnregisterApp releases the GDI+ resources used to draw pictures. When the static library is used (SFTDATE_STATIC), it also unregisters the window classes that RegisterApp registered for the application instance.
g_hInst = hinst;
SftDarkMode_Init(); /* Dark mode support */
SftDate_RegisterApp(hinst); /* Register with SftDate/DLL */
// A Unicode dialog, so the selected dates show in every culture's script, also in ANSI builds
DialogBoxParamW(g_hInst, MAKEINTRESOURCEW(IDD_MAIN), NULL, MainDialogProc, 0);
SftDate_UnregisterApp(hinst); /* Unregister from SftDate/DLL */
return 0;
}See Also C/C++ API | Categories | Notifications