jpm Posted March 4, 2004 Share Posted March 4, 2004 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 Link to comment Share on other sites More sharing options...
Valik Posted March 4, 2004 Share Posted March 4, 2004 (edited) Are you linking against comctl32.lib? It's not automatically added, you have to add that dependency yourself. Edited March 4, 2004 by Valik Link to comment Share on other sites More sharing options...
jpm Posted March 4, 2004 Author Share Posted March 4, 2004 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 stillerror LNK2001: unresolved external symbol __imp__InitCommonControlsEx@4Can that come from a discrepency in the .h with the .lib? Link to comment Share on other sites More sharing options...
Valik Posted March 4, 2004 Share Posted March 4, 2004 Can't you just use InitCommonControls() and take the easy way out? InitCommonControlsEx() requires IE3 at least and this may be the problem... Link to comment Share on other sites More sharing options...
jpm Posted March 4, 2004 Author Share Posted March 4, 2004 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. Link to comment Share on other sites More sharing options...
jpm Posted March 4, 2004 Author Share Posted March 4, 2004 I did notice that the .h file is spelled slightly different...commctrl.hcomctl32.libbut, I know so friggin little about such things, you'd be amazed... ; 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" Link to comment Share on other sites More sharing options...
Valik Posted March 4, 2004 Share Posted March 4, 2004 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) Link to comment Share on other sites More sharing options...
jpm Posted March 5, 2004 Author Share Posted March 5, 2004 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.comSorry 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 Link to comment Share on other sites More sharing options...
Administrators Jon Posted March 5, 2004 Administrators Share Posted March 5, 2004 Aut2Exe uses InitCommonControlsEx. Have a look at the source and the libraries in that. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted March 5, 2004 Administrators Share Posted March 5, 2004 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...) Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jpm Posted March 5, 2004 Author Share Posted March 5, 2004 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 Link to comment Share on other sites More sharing options...
jpm Posted March 5, 2004 Author Share Posted March 5, 2004 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 Link to comment Share on other sites More sharing options...
Valik Posted March 5, 2004 Share Posted March 5, 2004 (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 March 5, 2004 by Valik Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now