Windows Common Controls in an x64 DLL

Michael_L 20 Reputation points
2023-11-09T11:17:55.2833333+00:00

Hello,

I'm developing a plugin for Digital Audio Workstations (DAW) using Visual Studio 2022. The plugin is a DLL file that is loaded by the DAW in order to add functionality. It supports the VST3 API (Virtual Studio Technology) by Steinberg.

The plugin has a user interface which I created using regular Windows (Common) Controls. As it is difficult to use the VST3 SDK with .NET or MFC, I developed my own C++ classes to encapsule Windows API routines for control creation.

The controls in the user interface are supposed to have the style of the Windows version my plugin is running on. To achieve this, I call InitCommonControlsEx() before creating any controls. Of course, my DLL has a manifest resource which is provided by the Visual Studio Manifest Tool.

On most DAWs I tested this works fine. The UI of my plugin looks like a regular Windows 10/Windows 11 application. There is one DAW, however, where the UI ignores Windows styles. I found out that InitCommonControlsEx() fails when called in this particular DAW (Bitwig) with GetLastError() returning 1410 (ERROR_CLASS_ALREADY_EXISTS), while it succeeds when called in any other DAW I tested. As a result, the UI of my plugin in Bitwig has the old Windows 98 style (while Bitwig itself hasn't!).

I suppose there is something that causes conflicts between the host DAW (Bitwig) and my plugin. As my plugin works as expected in any other DAW, I think there's nothing basically wrong with it, it is just some kind of incompatibility. However, I'd like to have my plugin working in any DAW including Bitwig. But I couldn't find out yet what's going wrong. The Bitwig technical support doesn't answer questions about plugin development. So I would greatly appreciate some advice on where to make changes to my code to avoid incompatibilities regarding Windows Common Controls. Many thanks in advance.

Regards, Michael

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,575 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 44,931 Reputation points
    2023-11-09T12:01:12.2466667+00:00
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.