FONTSIZE
Boaz Harrosh
boaz at hishome.net
Tue Jan 6 02:21:00 CST 2004
Alexandre Julliard wrote:
>Boaz Harrosh <boaz at hishome.net> writes:
>
>
>
>>Some simple fix for C++ with the macro FONTSIZE
>>So ATL and MFC can compile.
>>
>>
>
>Why do you need that? It's not in the SDK header AFAICS.
>
>
>
Very good question: I'm not sure my self.
The fix I send is no good either.
In MFC I have simple declarations like this:
FONTDESC _afxFontDescDefault =
{ sizeof(FONTDESC), OLESTR("MS Sans Serif"), FONTSIZE(12) , FW_NORMAL,
DEFAULT_CHARSET, FALSE, FALSE, FALSE };
The VC++ will accept curly brackets fine.
..., {12000, 0},
but in GCC(++) it doesn't like that because of the CY union. It expects
a single long long scalar instead. as so:
..., { 12000 },
so my new patch is:
<Patch>
Index: include/olectl.h
===================================================================
RCS file: /home/wine/wine/include/olectl.h,v
retrieving revision 1.19
diff -u -r1.19 olectl.h
--- include/olectl.h 5 Sep 2003 23:15:44 -0000 1.19
+++ include/olectl.h 5 Jan 2004 08:24:39 -0000
@@ -97,7 +97,11 @@
BOOL fStrikethrough;
} FONTDESC, *LPFONTDESC;
-#define FONTSIZE(n) { n##0000, 0 }
+#ifdef __cplusplus
+# define FONTSIZE(n) { n##0000 } /*gcc expects one scalar for a long
long in CY union*/
+#else
+# define FONTSIZE(n) { n##0000, 0 }
+#endif /*__cplusplus*/
#define PICTYPE_UNINITIALIZED (-1)
#define PICTYPE_NONE 0
</Patch>
My be it should be the same for c but I was afraid to touch
More information about the wine-devel
mailing list