Excel-DNA / Excel-DNA/ExcelDna

Excel-DNA does does not enable Visual Styles (loads old version of COMCTL32)

Open
#257 3 comments 0 reactions 0 assignees View on GitHub
confirmed-bug
Dominant language
C#
Stars
1.5k
Forks
292
Avg merge
20d 12h
Merged PRs (30d)
1

Description

Hi,

I'm having a problem with common controls (e.g. ListView) when created from within the Excel add-in - they appear to be using an older version of the common controls libraries. This is annoying as I'd like to use some of the newer features like the sort indicators in the list view etc.

It looks like there is a workaround if I can create a resource of type RT_RESOURCE with value ISOLATIONAWARE_MANIFEST_RESOURCE_ID as described here:
https://stackoverflow.com/questions/46176073/ms-excel-sdk-issue-cant-use-tooltip-in-tree-view-control-in-xll-add-in

There's an example of suitable manifests to solve the common controls issue here:
https://docs.microsoft.com/en-us/windows/win32/controls/cookbook-overview#using-comctl32-version-6-in-control-panel-or-a-dll-that-is-run-by-rundll32exe

The problem I'm having is that I don't seem to get the manifest embedded in the resulting add-in - I see a NULL context when I call GetCurrentActCtx (with a success code). I'm following the instructions on MSDN (https://blogs.msdn.microsoft.com/cheller/2006/08/24/how-to-embed-a-manifest-in-an-assembly-let-me-count-the-ways/)

Has anyone else found a way of using the latest version of the common controls in their ExcelDNA add-in, or a way around this manifest issue? If I look at the generated DLL with ildasm I can see there's a manifest, but it doesn't seem to include the XML specifying the latest version of the common controls DLL.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.