【发布时间】:2014-07-21 00:40:27
【问题描述】:
我有问题。我正在尝试通过先前定义的常量添加结构元素。 这是示例代码(OpenGL+WinAPI)
#define ENGINE_STRUCT \
HGLRC RenderingContext;\
HDC DeviceContext;
然后:
typedef struct SWINDOW {
ENGINE_STRUCT
HWND Handle;
HINSTANCE Instance;
CHAR* ClassName;
BOOL Fullscreen;
BOOL Active;
MSG Message;
} WINDOW;
这可能吗?
【问题讨论】:
标签: c winapi opengl struct c-preprocessor