Quantcast
Channel: VBForums - COM and ActiveX
Viewing all articles
Browse latest Browse all 62

[RESOLVED] VB6 ActiveX DLL - visual styles

$
0
0
Hello,

I'm searching for a Methode to enable visual styles on a dialogs which are created by an ActiveX - DLL.

Microsoft highlight that Visual Styles are not possible for ActiveX DLL's .. once compiled with VB6.
As far i know they mentioned this as well for executables in the beginning but we all know that this is possible.

The project type is ActiveX DLL -> Type=OleDll
Custom controls can use api's to draw theme parts .. but i have found no possibility to enable themes for Common Controls (like a listview)
I tried the CommonControls replacement project from Krol - which is likewise not able to display themed controls.

For testing purpose i changed the project type to ActiveX EXE -> type=OleExe
Yes - Visual Styles work properly .. however with some negative side effects
a) in some cases very slow
b) several logic's require a complete redesign (like clean unload, multi instance handling, "file lock")

I tried the most technique's to init common controls (including resource ID 123 and other techniques for snap-in's msdn) .. but nothing worked.

Splitting into 2 parts (Satelite EXE in order to "handle" the dialog's and the core DLL as add-in) is likewise a solution - however there must be a "one-file" solution.

Maybe you can share your idea's / experiences.
i hope there is a way ..

Thank you

*** update
obviously I totally underestimated the vbRichClient and the widget engine.
I spend some time with the documentation / build some dialogs .. and yes the overhead of ~ 4MB is it worth.
Why the hell I have not looked at this project earlier. (i wasted a lot of time in creating owner drawn user controls and DEP aware subclassing)

Viewing all articles
Browse latest Browse all 62

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>