|
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.
> >
>
>
>
|