x64 and comctl32.lib

Per 41 Reputation points
2021-03-07T21:07:55.293+00:00

I have C++ code that includes calling InitCommonControls() or InitCommonControlsEx(&InitCtrls). This compiles and links with x86 build, but not with x64. I get "Unresloved external symbol __imp_InitControlsEx referenced in function WinMain..." I use #include <commctrl.h>. the name comctrl32.lib sort of hints at a problem here. Is there some other include to use? What should I do?

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,430 questions
{count} votes

Accepted answer
  1. Castorix31 81,831 Reputation points
    2021-03-07T21:18:10.643+00:00

    Do you link with comctl32.lib in x64 ?

    Like :

    #pragma comment (lib, "comctl32")
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful