I've tried to use an imagelist, to add icons to the treeview control I have on my dialog. To make a imagelist, one must use the ImageList_Create Win32 API call. I have added the library where this function is defined, "commctrl.h", but it still doesn't work.
Okay, I checked out another post on this forum called "undefined reference to InitCommonControls". There is mentioned that I would need to add the common control .lib file. I did some searching and I found the answer.
For those who have the same problem, you need to go to project options and add "-lcomctl32" (without the qoutes) to the linker options. I found this in the MDI example added with Dev-c++
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've tried to use an imagelist, to add icons to the treeview control I have on my dialog. To make a imagelist, one must use the ImageList_Create Win32 API call. I have added the library where this function is defined, "commctrl.h", but it still doesn't work.
The call I make to it is:
HIMAGELIST hImageList = Imagelist_Create (15, 15, ILC_COLOR, 3, 0);
I get a linker error like this:
[LINKER ERROR] undefined reference to 'ImageList_Create@20'
I would appreciate any help anyone could give me.
-GLENN-
Oh, and I am using Dev-C++ 4.9.6.0 and YES, I spelled it correctly. If I hadn't I would have got the IMPLICIT DECLARATION error instead.
-GLENN-
Okay, I checked out another post on this forum called "undefined reference to InitCommonControls". There is mentioned that I would need to add the common control .lib file. I did some searching and I found the answer.
For those who have the same problem, you need to go to project options and add "-lcomctl32" (without the qoutes) to the linker options. I found this in the MDI example added with Dev-c++
Thanks Glenn!
This bears out my observation that when you see the @ in the function name in the error message, its a hint that you have a link problem.
Wayne