Hi,
I am trying to get a program that I wrote in MSVC to work in Dev-cpp (I don't have my MSVC with me at the mo).
I just can't get InitCommonControlsEx to work. I have:
Code:
#include <commctrl.h>
Code:
INITCOMMONCONTROLSEX iccx;
TBADDBITMAP tbab, tbabmove;
TBBUTTON tbb[5];
TBBUTTON tbbmove [6];
//first load in the common controls dll, specifying the toolbar control wnd class
iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);
iccx.dwICC = ICC_BAR_CLASSES;
InitCommonControlsEx(&iccx);
and
'-lcomctl32' written in the 'linker' box on the 'parameters' tab of the project option dialog box.
When I compile I just get :
2028 C:\Program Files\Apache Group\Apache2\Personal Organiser\Address Book.cpp
`INITCOMMONCONTROLSEX' undeclared (first use this
2033 C:\Program Files\Apache Group\Apache2\Personal Organiser\Address Book.cpp
`iccx' undeclared (first use this function)
2035 C:\Program Files\Apache Group\Apache2\Personal Organiser\Address Book.cpp
`InitCommonControlsEx' undeclared (first use this
I even went into commctrl.h and copy and pasted:
Code:
typedef struct tagINITCOMMONCONTROLSEX {
DWORD dwSize;
DWORD dwICC;
} INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
and
Code:
BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
into my .cpp file (I was desperate at this point). It then compiled but I just got a linker error (InitCommonControlsEx@0)
edit: also, my compile include paths are the correct ones i.e. c:\DEV-CPP\include etc. I didn't install it into a different directory.
Anyone got any suggestions? Thanks
Bring back MSVC