On December 19, 2002 03:20 pm, Ove Kaaven wrote:
>     union {
>       struct {
>         short dmOrientation;
>         short dmPaperSize;
>         short dmPaperLength;
>         short dmPaperWidth;
>       };
>       POINTL dmPosition;
>     };

This is a problem, because it seems we don't have nameless structs
in g++, and I have no idea how to solve this. What about just doing
something like:

#ifdef __cplusplus
    short dmOrientation;
    short dmPaperSize;
    short dmPaperLength;
    short dmPaperWidth;
#else
    union {
      struct {
        SHORT  dmOrientation;
        SHORT  dmPaperSize;
        SHORT  dmPaperLength;
        SHORT  dmPaperWidth;
      } DUMMYSTRUCTNAME1;
      POINTL dmPosition;
    } DUMMYUNIONNAME1;
#endif

At least we get 4/5 (80%!:)) of the fields working...

-- 
Dimi.


Reply via email to