HeaderPane
Main
Hide
Share Link
Print

Building Applications

This section describes how to prepare an application using the C or C++ programming language to successfully use SftDate/DLL.

Updating Project Settings

Include Files

In order for #include files to be located in the SftDate/DLL product directory, each project that uses SftDate/DLL must be updated to search the product directory.

The default include directory name is \Program Files (x86)\Softelvdm\SftDate DLL 2.0\Include unless changed during installation. This directory contains SftDate.h, the MFC support files SftDateM.h and SftDateM.cpp and the header files SftPicture2.h and SftDarkMode.h. SftDate.h includes SftPicture2.h, so it must remain in the same directory.

Make sure to update all configurations (both Debug and Release).

Using the Project, Properties... menu command, the project's Property Pages are accessed so the #include directory search path settings can be modified.

#include Directory

Lib Files

In addition, the correct Lib file must be linked.

The Lib file name depends on the current processor target and character representation, according to the tables below (see "Adding The Lib File").

When using Visual Studio, SftDate.h selects the matching Lib file automatically (using #pragma comment(lib)), based on the target processor, the UNICODE/_UNICODE preprocessor symbols and SFTDATE_STATIC. In this case only the Lib file directory has to be added to the project's Linker, General, Additional Library Directories property.

Library Directory

To select the Lib file explicitly, define the preprocessor symbol SFTDATE_NOAUTOLIB before including SftDate.h and add the Lib file to the project's Linker, Input, Additional Dependencies property. The file name must be enclosed in quotes (") if the path contains spaces.

Make sure to update all configurations (both Debug and Release).

Adding The Lib File

The application's executable (Exe or Dll) must be linked with the correct Lib file, depending on the target environment (see "Updating Project Settings" above). If a Dll is used, it must be available and accessible at run-time for proper execution. The Dll used at run-time depends on the Lib file used at link time. If static linking is selected, the Dll is not required.

All required Lib and Dll files are located in the product directories \Program Files (x86)\Softelvdm\SftDate DLL 2.0\Lib and \Program Files (x86)\Softelvdm\SftDate DLL 2.0\Dll.

Intel 64-Bit Operating Systems

When building applications for 64-bit processors running Windows 10 and above, one of the following Lib files is used:

Lib FileDll FileDescription
SftDate_x64_A_20.libSftDate_x64_A_20.dll64-bit Applications using ANSI character representation
SftDate_x64_A_20_Static.libnone - see section "Linking Statically" below64-bit Applications using ANSI character representation
SftDate_x64_U_20.libSftDate_x64_U_20.dll64-bit Applications using UNICODE character representation
SftDate_x64_U_20_Static.libnone - see section "Linking Statically" below64-bit Applications using UNICODE character representation

Depending on the Lib file used, the matching Dll must be distributed with your application. When using a statically linked library, the Dll is not required, but the application must be updated as described in section "Linking Statically" below.

Intel 32-Bit Operating Systems

When building 32-bit applications for Windows 10 and above, one of the following Lib files is used:

Lib FileDll FileDescription
SftDate_IX86_A_20.libSftDate_IX86_A_20.dll32-bit Applications using ANSI character representation
SftDate_IX86_A_20_Static.libnone - see section "Linking Statically" below32-bit Applications using ANSI character representation
SftDate_IX86_U_20.libSftDate_IX86_U_20.dll32-bit Applications using UNICODE character representation
SftDate_IX86_U_20_Static.libnone - see section "Linking Statically" below32-bit Applications using UNICODE character representation

Depending on the Lib file used, the matching Dll must be distributed with your application. When using a statically linked library, the Dll is not required, but the application must be updated as described in section "Linking Statically" below.

ARM64 Operating Systems

When building applications for ARM64 processors running Windows 11 and above, one of the following Lib files is used:

Lib FileDll FileDescription
SftDate_ARM64_A_20.libSftDate_ARM64_A_20.dllARM64 Applications using ANSI character representation
SftDate_ARM64_U_20.libSftDate_ARM64_U_20.dllARM64 Applications using UNICODE character representation

Depending on the Lib file used, the matching Dll must be distributed with your application. A static library is not available for ARM64 applications.

Linking Statically

This step is only required if a Lib file is selected above, that eliminates the Dll. If the Dll is distributed with your application and a suitable Lib file is chosen above, this step can be skipped.

The entire project must be compiled with the SFTDATE_STATIC preprocessor symbol defined. In addition, the application's resource script must include the resource include file of SftDate/DLL (see "Resource Script" below).

Make sure to update all configurations (both Debug and Release).

Using the Project, Properties... menu command, the project's C/C++, Preprocessor properties are accessed so Preprocessor Definitions can be modified.

SFTDATE_STATIC

Resource Script

When linking statically, your application must provide the resources used by SftDate/DLL controls. This is accomplished by including the provided resource include file SftDateResources.rci into the application's resource script. SftDate/DLL 2.0 uses no resources of its own yet, but including the file keeps the application's resource script ready for a version that does.

SftDateResources.rci is located in the directory \Program Files (x86)\Softelvdm\SftDate DLL 2.0\Source, together with the file it includes (DateResources.h). This directory must be added to the resource compiler's include path.

Make sure to update all configurations (both Debug and Release).

Using the Project, Properties... menu command, the project's Resources, General properties are accessed so Additional Include Directories can be modified.

Resource Path

Then add the following line to the application's resource script, for example using the Edit, Resource Includes menu command in Resource View (Compile-time directives):

#include "SftDateResources.rci"

Resource Includes

The resource ID values 31000 to 31099 are reserved for SftDate/DLL. The application's own resources must not use these values.

Additional Lib Files

When linking statically, additional Lib files are required. SftDate.h adds gdiplus.lib, imm32.lib and uxtheme.lib automatically when SFTDATE_STATIC is defined (Microsoft Visual C++). Typically, the following Lib files are also required to allow successful linking.

comctl32.lib
version.lib

Make sure to update all configurations (both Debug and Release).

Certain features of the controls require GDI+ support (pictures of special dates and formatted days). GDI+ is available on all supported Windows versions (Windows 10 and above).

Using the Project, Properties... menu command, the project's Linker, Input properties are accessed so Additional Dependencies can be modified.

Additional Lib Files


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