If the STRICT macro is not defined, the types such HWND, HANDLE, etc. are
defined as void * (or so on), which allows easy mixup of HWND and HANDLE
(useful if you compile an old (very old) style program). If you do not have
STRICT defined, the following could compile:
HWND a;
HANDLE b;
a=b;
As you can imagine, the above is not correct, thou assigning a HANDLE
(general) to HWND is a little strange operation (and could cause serious
problem(s) and lots of headache).
If you have the STRICT defined, the compiler generates some empty
structures, like
__tagHWND { }, and makes the HWND type to look like __tagHWND * (for
example - you can take more detailed look at the .H files for more
detailes).
In general, the warning could not cause any serious problem (in this
particular case). But warnings like that mean that you have #define
re-#defined, which could case serious program malfunction (for example, if
somewhere you redefine an old #define with different value).
But in this case I think you do not have on what to worry about (maybe for
your confidence it's not a bad idea to find where you have STRICT already
#define-d). You can search either in the .H files, either in Project
Settings to see how many times you #define STRICT.
DonAngel
G Chen wrote in message ...
More...
STRICT type checking in WINDOWS.H enhances type safety for Windows programs by
using distinct types to represent all the different HANDLES in Windows. So for
example, STRICT prevents you from mistakenly passing an HPEN to a routine
expecting an HBITMAP.
Randy Charles Morin
Webmaster of KBCafe http://tips.kbcafe.com/tips/
Co-Author of The Waite Group's COM/DCOM Primer Plus
http://www.amazon.com/exec/obidos/ASIN/0672314924/kbcafe
Coming soon: COM/DCOM Unleashed
http://www.amazon.com/exec/obidos/ASIN/0672313529/kbcafe
In article <OAwMf2kZ#GA....@uppssnewspub04.moswest.msn.net>,
"G Chen" <gar...@unidial.com> wrote:
> I have EXE DCOM program developed with VC5.0. When recompile it under
> VC6.0, I got a warning message said " STRICT micro redefinition.
> ....windef.h:see previous definition. "
> What is this #define STRICT about? Will this warning cause any problem?
> Thanks!
>
>
////////////////////////////////////////
// He went out of his way to be good. //
////////////////////////////////////////
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
Ed Fultz
CGI
Andover, Ma
kbc...@my-dejanews.com wrote in message <7bmvrf$698$1...@nnrp1.dejanews.com>...
Randy Charles Morin
Webmaster of KBCafe http://tips.kbcafe.com/tips/
Co-Author of The Waite Group's COM/DCOM Primer Pus
http://www.amazon.com/exec/obidos/ASIN/0672314924/kbcafe
Coming soon: COM/DCOM Unleashed
http://www.amazon.com/exec/obidos/ASIN/0672313529/kbcafe
In article <uHd4wFAb#GA....@cppssbbsa02.microsoft.com>,