C - add elements to struct by define
- by CodeStepper
I have a problem. I'm trying to add struct elements by previously defined constant.
This is sample code (OpenGL+WinAPI)
#define ENGINE_STRUCT \
HGLRC RenderingContext;\
HDC DeviceContext;
And then:
typedef struct SWINDOW {
ENGINE_STRUCT
HWND Handle;
HINSTANCE Instance;
CHAR* ClassName;
BOOL Fullscreen;
BOOL Active;
MSG Message;
} WINDOW;
Is this possible? Thanks in advance.