You can use C++/CLI as explained in this thread : Create C++ Windows Forms application in Visual Studio 2017
(it was for 2017 but it works with 2022)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to make a RegisterClassEx() type from standard VB Controls (error control, progress bar, etc) suitable for use in C++ Applications?
When you drag a VB control into a form, really .NET framework does a CreateWindowExW call to create it because the Win32 API what is really can create a control, .NET framework only adds a hidden API call, which is defined in the control and in System.Windows.Forms.dll (The control defines the class while System.Windows.Forms.dll calls CreateWindowExW on the specified class name)
So, how to create a RegisterClassEx() type from standard VB controls suitable for use in Win32 C++ GUI Applications?
You can use C++/CLI as explained in this thread : Create C++ Windows Forms application in Visual Studio 2017
(it was for 2017 but it works with 2022)