RE: RFC: w32api-2.4-20060330-konrad.schwarz-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org

"Schwarz, Konrad" <[email protected]> Tue, 4 Apr 2006 09:57:50 +0200
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <ECDC9C7BC7809340842C0E7FCF48C393EFCBB4@MCHP7IEA.ww002.siemens.net>
This message was originally rejected because I was not a member of the
mailing list,
so here it is again:=20

> -----Original Message-----
> From: Schwarz, Konrad=20
> Sent: Thursday, March 30, 2006 11:09 AM
> To: '[email protected]'
> Subject: RFC: w32api-2.4-20060330-konrad.schwarz-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org
>=20
> Hello,
>=20
> when including Windows as follows:
>=20
> #	define	_WIN32_WINNT	0x400
> #	define	WIN32_LEAN_AND_MEAN
> #	if	1
> #		define	NOGDI
> #	endif
> #	include	<Windows.h>
>=20
> I get a compilation error:
> [...]/msys/1.0/mingw/include/winuser.h:3411: parse error=20
> before "BLENDFUNCTION"
>=20
> I therefore submit the following patch:
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: RCS/winuser.h,v
> retrieving revision 1.1
> diff -u -r1.1 winuser.h
> --- 1.1 2006/03/30 08:39:36
> +++ winuser.h   2006/03/30 08:43:35
> @@ -3408,7 +3408,9 @@
>  #endif
>  #if(_WIN32_WINNT >=3D _NT5)
>  BOOL WINAPI SetLayeredWindowAttributes(HWND,COLORREF,BYTE,DWORD);
> +# ifndef       NOGDI
>  BOOL WINAPI=20
> UpdateLayeredWindow(HWND,HDC,POINT*,SIZE*,HDC,POINT*,COLORREF,
> BLENDFUNCTION*,DWORD);
> +# endif
>  #endif
>  #if(_WIN32_WINNT >=3D _WXP)
>  BOOL WINAPI GetLayeredWindowAttributes(HWND,COLORREF*,BYTE*,DWORD*);
>=20
>=20
> However, closer examination of this snippet shows up a second problem:
> winuser.h (and only winuser.h) uses the macros _NT5, _WXP,=20
> _WME, _W98, _W2K, but I cannot find a definition of these anywhere.
> I suspect they should be replaced with constants of the form=20
> 0x0500 etc.

Regards,

Konrad Schwarz


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642