Jump to content

Recommended Posts

Posted

INITCOMMONCONTROLSEX    iccex;

    iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);
    iccex.dwICC = ICC_LISTVIEW_CLASSES |
  ICC_TREEVIEW_CLASSES |
  ICC_BAR_CLASSES |
  ICC_TAB_CLASSES |
  ICC_UPDOWN_CLASS |
  ICC_PROGRESS_CLASS |
  ICC_DATE_CLASSES;
    InitCommonControlsEx(&iccex);

How can I have this code link with AutoIt3 (VC6)?

I get the following error under XP/SP1 VC6 SP5

error LNK2001: unresolved external symbol __imp__InitCommonControlsEx@4

Thanks for the help

Posted (edited)

Are you linking against comctl32.lib? It's not automatically added, you have to add that dependency yourself.

Edited by Valik
Posted

Are you linking against comctl32.lib?  It's not automatically added, you have to add that dependency yourself.

I did,

I add comctl32.lib to the object/library modules of link tab still

error LNK2001: unresolved external symbol __imp__InitCommonControlsEx@4

Can that come from a discrepency in the .h with the .lib?

Posted

Can't you just use InitCommonControls() and take the easy way out? InitCommonControlsEx() requires IE3 at least and this may be the problem...

Posted

Can't you just use InitCommonControls() and take the easy way out?  InitCommonControlsEx() requires IE3 at least and this may be the problem...

THe answer is I don't know. I just want to be ready for the complete AU3GUI integration. Larry is using that in its code. :whistle:
Posted

I did notice that the .h file is spelled slightly different...

commctrl.h

comctl32.lib

but, I know so friggin little about such things, you'd be amazed... ; B)

I know that Larry but that does not work in my environment.

That's te reason I ask in case I need to include that in AutoIt3 for a complete/perfect inclusion of your AU3GUI stuff.

Certainly for the time being I need to drop "date" :whistle:

Posted

JP, just use InitCommonControls(). Instead of allowing the programmer to select which controls are available as with the Ex version, this one just initializes them all (I think thats the main difference between the two at any rate)

Posted

I have VC6 here... if you want to email me the problematic source and any instructions... I have some time tonight to mess with it...

Lar

Larrydalooza AT yahoo.com

Sorry not answering I have been to bed.

to reproduce is easy just pick the standard source tree add after the register class the following code( I am sure you recognize) in application.cpp

INITCOMMONCONTROLSEX    iccex;

    iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);
    iccex.dwICC = ICC_LISTVIEW_CLASSES |
  ICC_TREEVIEW_CLASSES |
  ICC_BAR_CLASSES |
  ICC_TAB_CLASSES |
  ICC_UPDOWN_CLASS |
  ICC_PROGRESS_CLASS |
  ICC_DATE_CLASSES;
    InitCommonControlsEx(&iccex);

modify whatever you want in link and for #include

compile you get the error i mention earlier

Thanks for the help

  • Administrators
Posted

Aut2Exe uses InitCommonControlsEx. Have a look at the source and the libraries in that.


 

  • Administrators
Posted

I seem to remember adding this line to get it to work:

#define WINVER 0x0400 // Make "windows.h" support 95 & NT4.0

#define _WIN32_IE 0x0400 // Set commctrl.h Compatability to IE4+

But that was for the controls I wanted to use in Aut2Exe (not really any use for autoit if it stops the exe running on lower system, but I think aut2exe runs on all systems just some controls are missing...)


 

Posted

I seem to remember adding this line to get it to work:

#define WINVER 0x0400      // Make "windows.h" support 95 & NT4.0

#define  _WIN32_IE 0x0400      // Set commctrl.h Compatability to IE4+

But that was for the controls I wanted to use in Aut2Exe (not really any use for autoit if it stops the exe running on lower system, but I think aut2exe runs on all systems just some controls are missing...)

Thanks Jon, I think I will need that when I really want to have the date control working.

I am more focus on the draft opf the doc of GUI Stuff.

You know as Larry like to write doc :whistle:B)

Posted

I am unable to have it working with the code delivered in 3.0.100.

Can somebody tell me it is working on their side?

Thanks for the help

Posted (edited)

JP, I have no problems getting AutoIt to compile (3.0.93, at least) with a call to InitCommonControlsEx. All I did was add "comctl32.lib" to the Input section of the linker (It can also be added in the command line section, too (VC7 has these, I don't remember what VC6 looks like)). Another thought, did you add "comctl32.lib" to both AutoIt and AutoItSC?

Edit: And did you add it to the Release build configurations? I'm notorious for forgetting to make these sorts of changes on all the configurations. I usually change Debug, then when I try to do Release, I get these stupid errors.

Edited by Valik

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...