Thread: [Dev-C++] version of commctrl.h
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Vlada D. <dj...@im...> - 2002-12-10 12:30:48
|
Hi. I #included commctrl.h in one of my projects trying to create a toolbar. I get error messages like "INITCOMMONCINTROLSEX not declared" and "BTNS_XXX not declared". After that, I used TBSTYLE_XXX for button styles and InitCommonControls() and it worked. I am running Win2000 and Dev-Cpp 4.9.6.0. Could it be that I have some older version of commctrl.h or libcomctl32 (also included in linker settings)? Or maybe I have some older version of comctl32.dll? How can I determine which versions I have? Regards, Vlada |
|
From: Yeoh H. <ye...@ye...> - 2002-12-11 01:22:07
|
Hi,
If you take a look at commctrl.h, here's what you'll find.
#if (_WIN32_IE >= 0x0300)
typedef struct tagINITCOMMONCONTROLSEX {
DWORD dwSize;
DWORD dwICC;
} INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
#endif
That's why you are getting undeclared error message for
INITCOMMONCONTROLSEX.
To solve this you need to define _WIN32_IE to be at least 0x0300.
One method is to add this define is in you code, before you include
commctrl.h
#define _WIN32_IE 0x0400
#include <commctrl.h>
Or, you can add the define to the compiler options.
Best Regards,
Yeoh
~`~`~`~`~`~`~`~`~`~`~
http://www.yeohhs.com
~`~`~`~`~`~`~`~`~`~`~
----- Original Message -----
From: "Vlada Djurovic" <dj...@im...>
To: "'DevC++ help'" <dev...@li...>
Sent: Tuesday, December 10, 2002 8:32 PM
Subject: [Dev-C++] version of commctrl.h
> Hi.
> I #included commctrl.h in one of my projects trying to create a toolbar. I
> get error messages like "INITCOMMONCINTROLSEX not declared" and "BTNS_XXX
> not declared". After that, I used TBSTYLE_XXX for button styles and
> InitCommonControls() and it worked. I am running Win2000 and Dev-Cpp
> 4.9.6.0. Could it be that I have some older version of commctrl.h or
> libcomctl32 (also included in linker settings)? Or maybe I have some older
> version of comctl32.dll? How can I determine which versions I have?
>
> Regards,
> Vlada
>
|
|
From: Vlada D. <dj...@im...> - 2002-12-11 07:51:44
|
----- Original Message -----
From: "Yeoh HS" <ye...@ye...>
To: "Vlada Djurovic" <dj...@im...>; "'DevC++ help'"
<dev...@li...>
Sent: Wednesday, December 11, 2002 2:20 AM
Subject: Re: [Dev-C++] version of commctrl.h
> Hi,
>
> If you take a look at commctrl.h, here's what you'll find.
> #if (_WIN32_IE >= 0x0300)
> typedef struct tagINITCOMMONCONTROLSEX {
> DWORD dwSize;
> DWORD dwICC;
> } INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
> #endif
>
> That's why you are getting undeclared error message for
> INITCOMMONCONTROLSEX.
>
> To solve this you need to define _WIN32_IE to be at least 0x0300.
>
> One method is to add this define is in you code, before you include
> commctrl.h
> #define _WIN32_IE 0x0400
> #include <commctrl.h>
>
> Or, you can add the define to the compiler options.
>
> Best Regards,
> Yeoh
> ~`~`~`~`~`~`~`~`~`~`~
> http://www.yeohhs.com
> ~`~`~`~`~`~`~`~`~`~`~
>
OK. Thanks. But can you explain what that directive does? I don't like using
something I don't understand.
> ----- Original Message -----
> From: "Vlada Djurovic" <dj...@im...>
> To: "'DevC++ help'" <dev...@li...>
> Sent: Tuesday, December 10, 2002 8:32 PM
> Subject: [Dev-C++] version of commctrl.h
>
>
> > Hi.
> > I #included commctrl.h in one of my projects trying to create a toolbar.
I
> > get error messages like "INITCOMMONCINTROLSEX not declared" and
"BTNS_XXX
> > not declared". After that, I used TBSTYLE_XXX for button styles and
> > InitCommonControls() and it worked. I am running Win2000 and Dev-Cpp
> > 4.9.6.0. Could it be that I have some older version of commctrl.h or
> > libcomctl32 (also included in linker settings)? Or maybe I have some
older
> > version of comctl32.dll? How can I determine which versions I have?
> >
> > Regards,
> > Vlada
> >
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> With Great Power, Comes Great Responsibility
> Learn to use your power at OSDN's High Performance Computing Channel
> http://hpc.devchannel.org/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Yeoh H. <ye...@ye...> - 2002-12-11 08:48:41
|
Hi,
#if and #endif are compiler directives. This means that the compiler can
conditionally compile certain sections of code.
#if (_WIN32_IE >=3D 0x0300)
typedef struct tagINITCOMMONCONTROLSEX {
DWORD dwSize;
DWORD dwICC;
} INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
#endif
What happens?
If _WIN32_IE is defined to be >=3D 0x0300 then compile the code within th=
e #if
and #endif block.
If _WIN32_IE is not defined, then the code within the #if and #endif bloc=
k
would not be included for compilation.
What is this _WIN32_IE >=3D 0x0300?
This means that if Windows 32 bit Internet Explorer version 3.0 or later =
is
installed, then the code within the #if and #end if is compiled.
Why this _WIN32_IE >=3D 0x0300? To explain why, you'll need more informat=
ion
from MSDN.
Here're some details about Common Controls from MSDN
<begin extract>
Because of ongoing enhancements, different versions of Comctl32.dll
implement different features. Throughout this document, programming eleme=
nts
are marked with a version number. This version number indicates that the
programming element is implemented in that version and later versions of
Comctl32.dll. If no version number is specified, the programming element =
is
implemented in all versions. The following table outlines the different
versions of Comctl32.dll and the distribution platform.
Version Distribution platform
4.00 Microsoft=AE Windows=AE 95/Windows NT=AE 4.0
4.70 Microsoft=AE Internet Explorer 3.x
4.71 Microsoft=AE Internet Explorer 4.0
4.72 Microsoft=AE Internet Explorer 4.01
To ensure that your application is compatible with different targeted
versions of the common control DLL (Comctl32.dll), a version macro was ad=
ded
to Commctrl.h. This version macro is used to define, exclude, or redefine
certain common control definitions for different versions of the DLL. The
macro name is _WIN32_IE and you, the developer, are responsible for defin=
ing
the macro as a hexadecimal number. This version number defines the target
version of the application that is using the DLL.
<end extract>
For details, please look up MSDN. It also has code to get the commctrl dl=
l
version.
Regards,
Yeoh
--
http://www.yeohhs.com
You wrote:
> OK. Thanks. But can you explain what that directive does? I don't like
using
> something I don't understand.
>
|
|
From: Vlada D. <dj...@im...> - 2002-12-11 10:46:36
|
----- Original Message -----
From: "Yeoh HS" <ye...@ye...>
To: "Vlada Djurovic" <dj...@im...>; "'DevC++ help'"
<dev...@li...>
Sent: Wednesday, December 11, 2002 9:30 AM
Subject: Re: [Dev-C++] version of commctrl.h
> Hi,
>
> #if and #endif are compiler directives. This means that the compiler can
> conditionally compile certain sections of code.
>
> #if (_WIN32_IE >= 0x0300)
> typedef struct tagINITCOMMONCONTROLSEX {
> DWORD dwSize;
> DWORD dwICC;
> } INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
> #endif
>
> What happens?
> If _WIN32_IE is defined to be >= 0x0300 then compile the code within the
#if
> and #endif block.
> If _WIN32_IE is not defined, then the code within the #if and #endif block
> would not be included for compilation.
>
> What is this _WIN32_IE >= 0x0300?
> This means that if Windows 32 bit Internet Explorer version 3.0 or later
is
> installed, then the code within the #if and #end if is compiled.
>
> Why this _WIN32_IE >= 0x0300? To explain why, you'll need more information
> from MSDN.
>
> Here're some details about Common Controls from MSDN
> <begin extract>
> Because of ongoing enhancements, different versions of Comctl32.dll
> implement different features. Throughout this document, programming
elements
> are marked with a version number. This version number indicates that the
> programming element is implemented in that version and later versions of
> Comctl32.dll. If no version number is specified, the programming element
is
> implemented in all versions. The following table outlines the different
> versions of Comctl32.dll and the distribution platform.
>
> Version Distribution platform
> 4.00 Microsoft® Windows® 95/Windows NT® 4.0
> 4.70 Microsoft® Internet Explorer 3.x
> 4.71 Microsoft® Internet Explorer 4.0
> 4.72 Microsoft® Internet Explorer 4.01
>
> To ensure that your application is compatible with different targeted
> versions of the common control DLL (Comctl32.dll), a version macro was
added
> to Commctrl.h. This version macro is used to define, exclude, or redefine
> certain common control definitions for different versions of the DLL. The
> macro name is _WIN32_IE and you, the developer, are responsible for
defining
> the macro as a hexadecimal number. This version number defines the target
> version of the application that is using the DLL.
> <end extract>
>
> For details, please look up MSDN. It also has code to get the commctrl dll
> version.
>
> Regards,
> Yeoh
> --
> http://www.yeohhs.com
>
Thanks a lot, Yeoh.
> You wrote:
> > OK. Thanks. But can you explain what that directive does? I don't like
> using
> > something I don't understand.
> >
>
>
>
|