HeaderPane
Main
Hide
Share Link
Print

SFTDATE_STATIC Preprocessor Symbol

The SFTDATE_STATIC preprocessor symbol selects static linking of SftDate/DLL to an application.

#define SFTDATE_STATIC

Comments

The SFTDATE_STATIC preprocessor symbol selects static linking of SftDate/DLL to an application. An application that links statically includes the code of the controls in its executable and does not need the SftDate/DLL DLL files at run-time.

The symbol must be defined before the header file SftDate.h is included, preferably using the project's preprocessor definitions, so all source files use the same setting.

SftDate.h automatically adds the required Lib file to the application (Microsoft Visual C++). SFTDATE_STATIC determines which Lib file is used:

PlatformCharacter SetSFTDATE_STATIC definedSFTDATE_STATIC not defined
x64UnicodeSftDate_x64_U_20_Static.libSftDate_x64_U_20.lib
x64ANSISftDate_x64_A_20_Static.libSftDate_x64_A_20.lib
Win32 (x86)UnicodeSftDate_IX86_U_20_Static.libSftDate_IX86_U_20.lib
Win32 (x86)ANSISftDate_IX86_A_20_Static.libSftDate_IX86_A_20.lib
ARM64UnicodeNot availableSftDate_ARM64_U_20.lib
ARM64ANSINot availableSftDate_ARM64_A_20.lib

With SFTDATE_STATIC, SftDate.h also adds the system libraries the static library needs (uxtheme.lib, imm32.lib, gdiplus.lib). There is no static library for ARM64.

The Unicode Lib files are used if UNICODE or _UNICODE is defined, otherwise the ANSI Lib files are used. An application that prefers to add the Lib file to its linker settings can define the SFTDATE_NOAUTOLIB preprocessor symbol before including SftDate.h, which suppresses the automatic selection.

As for an application using the DLL, RegisterApp must be called before a control is created and UnregisterApp when the application no longer uses the controls. In a statically linked application, RegisterApp registers the window classes (SFTDATE_CLASS, SFTCALENDAR_CLASS) for the application instance passed to it.

A statically linked application must also include the resources of the controls in its resource script, using the resource include file SftDateResources.rci (see Building Applications).

See Also C/C++ API | Categories | Notifications


Last Updated 11/26/2026 - (email)
© 2026 Softel vdm, Inc.