This compiles fine as a plain C file under VisualStudio v10.0.30319 and VAX v10.6.1833.0 but VAX does not see the members of the struct.
I know that typedef inside typedef is weird, but it does not seem to bother the VS compiler. Only VAX frowns upon it.
typedef union tagMYRGBQUAD {
typedef struct {
unsigned char rgbRed;
unsigned char rgbGreen;
unsigned char rgbBlue;
unsigned char rgbAlpha;
};
unsigned int AllChannels;
} MYRGBQUAD, *PMYRGBQUAD;
MYRGBQUAD MyPixel[2];
MyPixel[0].AllChannels = 0;
MyPixel[1].rgbRed = 0xAA;
MyPixel[1].rgbGreen = 0xCC;
MyPixel[1].rgbBlue = 0xBB;
MyPixel[1].rgbAlpha = 0x80;