I am trying to enable general controls in an application. I followed the steps in this MSDN article , specifically the section Using ComCtl32. dll version 6 in an application that uses only standard extensions . But I canβt make it work.
The only thing I do, unlike the article, is that I add manifest information to the Project Properties Pages | Configuration Properties | Linker | Manifest file | Additional manifest dependencies . This is what I entered in the text box:
"type = 'Win32' name = 'Microsoft.Windows.Common-Controls' version =' 6.0.0.0 'processorArchitecture =' * 'publicKeyToken =' 6595b64144ccf1df 'language =' * 'xmlns =' http://schemas.microsoft. com / developer / msbuild / 2003 '";% (AdditionalManifestDependencies)
When I check the generated manifest (MyApp.exe.intermediate.manifest), it looks right.
I also add a link dependency to ComCtl32.lib in Project Properties | Configuration Properties | Linker | Login | Additional dependencies . I also call InitCommonControlsEx when starting with initializing the INITCOMMONCONTROLSEX structure as follows:
INITCOMMONCONTROLSEX icex; icex.dwSize = sizeof(INITCOMMONCONTROLSEX); icex.dwICC = ICC_STANDARD_CLASSES;
But calling InitCommonControlsEx always returns FALSE (which means that it did not work). After some investigation, it turned out that the error code returned from GetLastError was ERROR_FILE_NOT_FOUND. What could be the problem?
UPDATE: I noticed something that might be due to a "file not found" error. When I launch the application from the debugger, one of the lines in the Output window:
"MyApp.exe": loaded "C: \ Windows \ winsxs \ x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6002.18305_none_88f3a38569c2c436 \ comctl32.dll ', cannot find or open the PDB file
However, there are a few similar lines for some of the more standard libraries, such as kernel32.lib, user32.lib, etc.:
"MyApp.exe": loaded "C: \ Windows \ System32 \ ntdll.dll", cannot find or open PDB file
"MyApp.exe": loaded "C: \ Windows \ System32 \ kernel32.dll", cannot find or open the PDB file
"MyApp.exe": loaded "C: \ Windows \ System32 \ msvcrt.dll", cannot find or open PDB file
"MyApp.exe": loaded "C: \ Windows \ System32 \ user32.dll", cannot find or open the PDB file
These lines are always displayed for any application, and this does not cause problems. Could it be different for ComCtl32.dll?