Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

INITCOMMONCONTROLSEX error

122 views
Skip to first unread message

Randy Poon

unread,
Jan 23, 2002, 5:09:28 PM1/23/02
to
when I declared:-

INITCOMMONCONTROLSEX iccx;
InitCommonControlsEx(&iccx);

in my WinMain(), I got compilation error "'INITCOMMONCONTROLSEX' :
undeclared identifier". What's wrong?


James Brown

unread,
Jan 23, 2002, 5:19:19 PM1/23/02
to
You need to #include <commctrl.h>

James.

--
www.catch22.uk.net
Free win32 software, sourcecode, and tutorials
------
Please remove "NOSPAM" when replying.

"Randy Poon" <randy...@yahoo.com> wrote in message
news:swG38.47915$e4.13...@news0.telusplanet.net...

Randy Poon

unread,
Jan 23, 2002, 11:01:07 PM1/23/02
to
I did, actually I can't find definition of INITCOMMONCONTROLSEX in my
<commctrl.h>, could it be that my C compiler is too old? I'm using MSVC++5.

Serve Laurijssen

unread,
Jan 24, 2002, 6:10:05 AM1/24/02
to

"Randy Poon" <randy...@yahoo.com> wrote in message
news:swG38.47915$e4.13...@news0.telusplanet.net...

#include <commctrl.h>

or

-----> #if (_WIN32_IE >= 0x0300) <-----

typedef struct tagINITCOMMONCONTROLSEX {
DWORD dwSize; // size of this structure
DWORD dwICC; // flags indicating which classes to be
initialized
} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
#endif


D. Keletsekis

unread,
Jan 24, 2002, 6:20:39 AM1/24/02
to
"Randy Poon" <randy...@yahoo.com>

> I did, actually I can't find definition of INITCOMMONCONTROLSEX in my
> <commctrl.h>, could it be that my C compiler is too old? I'm using MSVC++5.

From my (VC 6.0) commctrl.h :

#if (_WIN32_IE >= 0x0300)


typedef struct tagINITCOMMONCONTROLSEX {
DWORD dwSize; // size of this structure
DWORD dwICC; // flags indicating which classes to be
initialized
} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;

#define ICC_LISTVIEW_CLASSES 0x00000001 // listview, header
#define ICC_TREEVIEW_CLASSES 0x00000002 // treeview, tooltips
#define ICC_BAR_CLASSES 0x00000004 // toolbar, statusbar,
trackbar, tooltips
#define ICC_TAB_CLASSES 0x00000008 // tab, tooltips
#define ICC_UPDOWN_CLASS 0x00000010 // updown
#define ICC_PROGRESS_CLASS 0x00000020 // progress
#define ICC_HOTKEY_CLASS 0x00000040 // hotkey
#define ICC_ANIMATE_CLASS 0x00000080 // animate
#define ICC_WIN95_CLASSES 0x000000FF
#define ICC_DATE_CLASSES 0x00000100 // month picker, date picker,
time picker, updown
#define ICC_USEREX_CLASSES 0x00000200 // comboex
#define ICC_COOL_CLASSES 0x00000400 // rebar (coolbar) control
#if (_WIN32_IE >= 0x0400)
#define ICC_INTERNET_CLASSES 0x00000800
#define ICC_PAGESCROLLER_CLASS 0x00001000 // page scroller
#define ICC_NATIVEFNTCTL_CLASS 0x00002000 // native font control
#endif
WINCOMMCTRLAPI BOOL WINAPI
InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
#endif // _WIN32_IE >= 0x0300


Maybe you have parental lock..

As in "common control sex"... get it?..
Ah.. forget it.. SDK humour never works :)

Regards
D. Keletsekis
www.Gui4Cli.com

0 new messages