I wonder what I am doing wrong here:

INITCOMMONCONTROLSEX InitCtrlEx;

InitCtrlEx.dwSize=sizeof(INITCOMMONCONTROLSEX)

InitCommonControlsEx(&InitCtrlEx);

And why I get this error:

error C2440: 'type cast' : cannot convert from 'int' to 'struct tagINITCOMMONCONTROLSEX'

Try something like this.

INITCOMMONCONTROLSEX InitCtrlEx;
InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
InitCtrlEx.dwICC  = ICC_PROGRESS_CLASS; // This depends on the control you are tryinn to initialize
InitCommonControlsEx(&InitCtrlEx);

Thanks.

I was missing a semi-colon.

How embarassing!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.