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 SftBox/DLL.

Updating Project Settings

Include Files

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

The default include directory name is \Program Files (x86)\Softelvdm\SftBox DLL 6.0\Include unless changed during installation. This directory contains SftBox.h, the MFC support files SftBoxM.h and SftBoxM.cpp and the header files SftPicture2.h, SftDarkSysColor.h and SftDarkMode.h. SftBox.h includes SftPicture2.h and SftDarkSysColor.h, so they 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, SftBox.h selects the matching Lib file automatically (using #pragma comment(lib)), based on the target processor, the UNICODE/_UNICODE preprocessor symbols and SFTBOX_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 SFTBOX_NOAUTOLIB before including SftBox.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\SftBox DLL 6.0\Lib and \Program Files (x86)\Softelvdm\SftBox DLL 6.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
SftBox_x64_A_60.libSftBox_x64_A_60.dll64-bit Applications using ANSI character representation
SftBox_x64_A_60_Static.libnone - see section "Linking Statically" below64-bit Applications using ANSI character representation
SftBox_x64_U_60.libSftBox_x64_U_60.dll64-bit Applications using UNICODE character representation
SftBox_x64_U_60_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
SftBox_IX86_A_60.libSftBox_IX86_A_60.dll32-bit Applications using ANSI character representation
SftBox_IX86_A_60_Static.libnone - see section "Linking Statically" below32-bit Applications using ANSI character representation
SftBox_IX86_U_60.libSftBox_IX86_U_60.dll32-bit Applications using UNICODE character representation
SftBox_IX86_U_60_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
SftBox_ARM64_A_60.libSftBox_ARM64_A_60.dllARM64 Applications using ANSI character representation
SftBox_ARM64_U_60.libSftBox_ARM64_U_60.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 SFTBOX_STATIC preprocessor symbol defined. In addition, the application's resource script must include the resources of the combo box control (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.

SFTBOX_STATIC

Resource Script

When linking statically, your application must provide the resources used by SftBox/DLL combo box controls. This is accomplished by including the provided resource include file SftBoxResources.rci into the application's resource script. Without these resources, the mouse cursors, the font type pictures added by Fonts, the built-in expand/collapse buttons, the sort indicators and the default style names used by FontStyles are missing.

SftBoxResources.rci is located in the directory \Program Files (x86)\Softelvdm\SftBox DLL 6.0\Source, together with the files it includes (BoxResources.h, SftButtonResources.rci, ButtonResources.h, SftTreeResources.rci, SftTreeResources.h, SftPictureResources.rci and SftPictureResources.h) and the Res directory, which contains the cursors and pictures. 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 "SftBoxResources.rci"

Resource Includes

The resources use predefined ID values which cannot be changed (27000 to 27003, 29500, 29600 to 29623 and 32620 to 32625, see the header files listed above). The application's own resources must not use these values.

Additional Lib Files

When linking statically, it may also be necessary to add additional Lib files to the application. Typically, the following Lib files are required to allow successful linking.

gdiplus.lib
imm32.lib
msimg32.lib
shell32.lib
version.lib

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

Certain features of the control require GDI+ support. 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/22/2026 - (email)
© 2026 Softel vdm, Inc.