HeaderPane
Main
Hide
Share Link
Print

SFTBOX_STATIC Preprocessor Symbol

The SFTBOX_STATIC preprocessor symbol selects static linking of SftBox/DLL to an application.

#define SFTBOX_STATIC

Comments

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

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

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

PlatformCharacter SetSFTBOX_STATIC definedSFTBOX_STATIC not defined
x64UnicodeSftBox_x64_U_60_Static.libSftBox_x64_U_60.lib
x64ANSISftBox_x64_A_60_Static.libSftBox_x64_A_60.lib
Win32 (x86)UnicodeSftBox_IX86_U_60_Static.libSftBox_IX86_U_60.lib
Win32 (x86)ANSISftBox_IX86_A_60_Static.libSftBox_IX86_A_60.lib
ARM64UnicodeNot availableSftBox_ARM64_U_60.lib
ARM64ANSINot availableSftBox_ARM64_A_60.lib

There is no static library for ARM64. Defining SFTBOX_STATIC in an ARM64 build causes a compile-time error, unless the automatic Lib file selection is suppressed using SFTBOX_NOAUTOLIB.

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 SFTBOX_NOAUTOLIB preprocessor symbol before including SftBox.h, which suppresses the automatic selection.

As for an application using the DLL, RegisterApp must be called before a combo box control is created and UnregisterApp when the application no longer uses combo box controls. In a statically linked application, RegisterApp registers the combo box window class (SFTBOX_CLASS) for the application instance passed to it, so the window class is only available to that application instance. The window class is removed once every RegisterApp call has been matched by an UnregisterApp call.

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

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


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