Loading two versions of Common Controls
-
Using VS2008 Professional (v 9.02) in Debug mode on Windows 8 to write a Win32 program I have two versions of Windows Common Controls ComCtl32.dll loading. On a call to:
CreateDialogParam
one: Product Version 6.2.92.../File Version 5.82.92... loads then on a call toSetupDiGetClassImageList
another one loads having Product Version 6.2.92.../File Version 6.10.92. I only noticed when having problems trying to use a feature of ListView header (up/down sort arrows) that various Googled sources attribute to needing a later version of ComCtl32.dll. I had a look at the Manifest but see nothing seems relevant there. Switching to Release mode had no effect. Is it possible to just load one version, preferably the later version loading? The above with slightly more detail from the VS Output window is below for reference if needed. In Debug mode: Between:hSelectDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DIALOG_SELECT), 0, DialogProc, 0);
and entering
BOOL CALLBACK DialogProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Loaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\comctl32.dll' then on a call:
BOOL b = SetupDiGetClassImageList(&m_spImageData);
Loaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\comctl32.dll'
-
Using VS2008 Professional (v 9.02) in Debug mode on Windows 8 to write a Win32 program I have two versions of Windows Common Controls ComCtl32.dll loading. On a call to:
CreateDialogParam
one: Product Version 6.2.92.../File Version 5.82.92... loads then on a call toSetupDiGetClassImageList
another one loads having Product Version 6.2.92.../File Version 6.10.92. I only noticed when having problems trying to use a feature of ListView header (up/down sort arrows) that various Googled sources attribute to needing a later version of ComCtl32.dll. I had a look at the Manifest but see nothing seems relevant there. Switching to Release mode had no effect. Is it possible to just load one version, preferably the later version loading? The above with slightly more detail from the VS Output window is below for reference if needed. In Debug mode: Between:hSelectDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DIALOG_SELECT), 0, DialogProc, 0);
and entering
BOOL CALLBACK DialogProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Loaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\comctl32.dll' then on a call:
BOOL b = SetupDiGetClassImageList(&m_spImageData);
Loaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\comctl32.dll'
-
Hi, Have you tried adding a /MANIFESTDEPENDENCY entry for common controls specifying version six and above? Follow the instructions here: Enabling Visual Styles[^] Best Wishes, -David Delaune
David, No I hadn't tried anything in the manifest. I've had a quick scan of the link you set and (initially)took the quick option of pasting in the example #pragma just as it's given for a version
version= '6.0.0.0'
to set the version from a .h file. No obvious difference yet as its still loading a v5 and a v6. Of relevancet, I have a WTL/ATL version that I can step through side by side with the Win32 version and the WTL/ATL only loads one ComCtl32.dll, the v6. I'll have a look in more detail later. Thanks... controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\comctl32.dll
...
... controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\comctl32.dll -
Hi, Have you tried adding a /MANIFESTDEPENDENCY entry for common controls specifying version six and above? Follow the instructions here: Enabling Visual Styles[^] Best Wishes, -David Delaune
Adding manifest as recommended prevents v5 ComCtl32.dll loading, just the v6 but as soon as I open the my dialog with my ListView control on it's gone. Just flickers on the screen and disappears. Calling
InitCtrls.dwICC = ICC_LISTVIEW_CLASSES;
BOOL bInit = InitCommonControlsEx(&InitCtrls);or not doesn't affect it.Stripped out a most of the functionality but it still happens ...
-
Hi, Have you tried adding a /MANIFESTDEPENDENCY entry for common controls specifying version six and above? Follow the instructions here: Enabling Visual Styles[^] Best Wishes, -David Delaune
The dialog with listbox using one ComCtl32 6 and not loading a v5 at well that flicked out of existence didn't bode too well for debug success so I started from scratch putting in a manifest line at the beginning and it displays. Only one ComCtl32 6.0.9200.16579 is loaded so that looks like success (apart from having to cut'n past stuff stuff). Thanks