Demonstrates the use of RTD handles to represent objects in Excel
This add-in contains the code described in the User Guide topic Using object handles.
It contains four sets of add-in functions, each of which
consists of a creator function (e.g.
which creates an object and returns it to Excel as a handle, and
some "getter" functions, which return properties of the object
The three sets of functions demonstrate different handle techniques:
The simple case: a Thing object is created, and is returned as a handle.
The creator function
See Combining handles with other features in the User Guide for more details.
A custom formatter class
See Custom handles formats in the User Guide for more details.
The object created is a complex type,
You may encounter some warnings (warning C4503) when you compile the code. This is due to the length of the names of the templated types. As is normal with this warning, you can use a typdef to work around it; this also makes the code more readable.
To edit the functions in this add-in, you need to load the extension file
See Loading an extension file
You should also make sure that none of the following extension files is loaded, since the various types of handles are mutually exclusive.
Each sample project is located in a sub-directory of the Samples directory of the XLL+ installation. To use the sample project, open the solution file RtdHandleDemo.sln or the project file RtdHandleDemo.vcproj.
You can enable debugging under Excel by using the Setup Debugging command in the XLL+ ToolWindow.
When delivered, the help files are excluded from the build.
You can enable the help build by selecting the files
in the Solution Explorer,
and using the right-click menu to view Properties.
Select the page "Configuration Properties/General" and
set the "Excluded from build" property to "No".
See Generating help
in the User Guide for more information.