Re: 1.21 lib compile errs MS VC++ 6.0
These messages are typecast problems generated when using the #define STRICT. This generates type-safety msgs from the MS Windows #includes.
The best way to handle this is to modify the library source to use static_cast in each of these instances. E.g.
HBRUSH brush = static_cast<HBRUSH>(blah blah);
If you want to ignore the strict type checking, try using
#undef STRICT
(at least that works for the Borland compiler.)
----- Original Message -----
From: Beman Dawes <beman@esva.net>
To: V-GUI Mailing List <vgui-discuss@other.debian.org>
Sent: Wednesday, June 09, 1999 7:16 AM
Subject: 1.21 lib compile errs MS VC++ 6.0
<snip>
| ---- compiler messages -----
|
| Vbtncmd.cpp
| C:\V\Srcwin\Vbtncmd.cpp(338) : error C2440: '=' : cannot convert from
| 'struct HBRUSH__ *' to 'struct HPEN__ *'
| Types pointed to are unrelated; conversion requires
| reinterpret_cast, C-style cast or function-style cast
| C:\V\Srcwin\Vbtncmd.cpp(340) : error C2440: '=' : cannot convert from
| 'struct HBRUSH__ *' to 'struct HPEN__ *'
| Types pointed to are unrelated; conversion requires
| reinterpret_cast, C-style cast or function-style cast
| C:\V\Srcwin\Vbtncmd.cpp(439) : error C2440: 'initializing' : cannot
| convert from 'void *' to 'struct HBITMAP__ *'
| Conversion from 'void*' to pointer to non-'void' requires an
| explicit cast
|
<snip>
Reply to: