mmainwnd.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _MGUI_CTRL_MNWND_H
00016 #define _MGUI_CTRL_MNWND_H
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00031 #define NCSCTRL_MAINWND NCSCLASSNAME("mainwnd")
00032
00033 typedef struct _mMainWnd mMainWnd;
00034 typedef struct _mMainWndClass mMainWndClass;
00035 typedef struct _mMainWndRenderer mMainWndRenderer;
00036
00037
00038 #define mMainWndRendererHeader(clsName, parentClass) \
00039 mPanelRendererHeader(clsName, parentClass)
00040
00048 struct _mMainWndRenderer
00049 {
00050 mMainWndRendererHeader(mMainWnd, mPanel)
00051 };
00052
00053
00054 #define mMainWndHeader(className) \
00055 mPanelHeader(className) \
00056 mComponent* parentCmp; \
00057 mComponent* nextCmp, *prevCmp;
00058
00065 struct _mMainWnd {
00066 mMainWndHeader(mMainWnd)
00067 };
00068
00069 #define MSG_MNWND_ENDDIALOG MSG_LASTUSERMSG + 4
00070
00071
00072
00073
00074 #define mMainWndClassHeader(clsName, parentClass) \
00075 mPanelClassHeader(clsName, parentClass) \
00076 DWORD (*doModal)(clsName*,BOOL AutoDestroy); \
00077 BOOL (*endDialog)(clsName*, DWORD code);
00078
00093 struct _mMainWndClass
00094 {
00095 mMainWndClassHeader(mMainWnd, mPanel)
00096 };
00097
00098 #define DECLARE_MAINWND_CLASS(clss, clssSuper) \
00099 typedef mMainWndRenderer clss##Renderer; \
00100 DECLARE_CLASS(clss, clssSuper)
00101
00102 #define NCS_MAINWND_ISMODE(obj) (INSTANCEOF(obj, mMainWnd) && (GetWindowStyle(obj->hwnd) & NCSS_MNWND_MODE))
00103
00107 MGNCS_EXPORT extern mMainWndClass g_stmMainWndCls;
00108
00109 enum enumMainWndProp {
00110 NCSP_MNWND_MAX = NCSP_PANEL_MAX + 1
00111 };
00112
00119 #define NCSS_MNWND_MODE (1<<NCSS_PANEL_SHIFT)
00120 #define NCSS_MNWND_SHIFT (NCSS_PANEL_SHIFT+1)
00121 enum enumMainWndNotify{
00122 NCSN_MNWND_MAX = NCSN_PANEL_MAX + 1
00123 };
00124
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130
00131 #endif
00132