#ifndef T2DLL_T2DIALOG_H #define T2DLL_T2DIALOG_H #include "../common.h" #include "LListener.h" #include "T2DlgItemOK.h" #include "T2DlgItemCANCEL.h" #include "T2DlgItemTButton.h" #include "T2DlgItemCheck.h" #include "T2DlgItemHScr.h" #include "T2DlgItemVScr.h" #include "T2DlgItemBox.h" #include "T2DlgItemText.h" #include "T2DlgItemStressGage.h" #include "T2DlgItemPPLEvalGage.h" #include "T2DlgItemBelongGage.h" #include "T2DlgItemCustomerGage.h" #include "T2DlgItemProfitsGage.h" #include "T2DlgItemImageTable.h" #include "T2DlgItemImage.h" #include "CToggleButtonDisabled.h" #include "T2MovieTable.h" #include "T2GuestroomTable.h" #include "T2HallEventTable.h" #include "CTokenizer.h" struct T2DLGTEMPLATE { POINT pt; HINSTANCE moduleHandle; int resID; }; class AFX_CLASS_EXPORT T2Dialog : public CWnd, public LListener { DECLARE_DYNCREATE(T2Dialog) DECLARE_MESSAGE_MAP() public: T2Dialog(); virtual ~T2Dialog(); void Realize(void*, T2DLGTEMPLATE*, T2TowerDoc*, T2ImageObj*, CPalette*, BOOL isToolWindow, CWnd* parentWnd, UINT nID, BOOL autoShow); int DoModal(); void DoClose(int nResult); virtual BOOL PreTranslateMessage(MSG*); void MakeRadioGroup(int inBaseID, int inCount, int inSelected); void MakeTabPanel(int inBaseID1, int inBaseID2, int inCount, int inSelected); HFONT GetFont(); T2TowerDoc* GetDocument() const { return mTowerDoc; } T2DlgItem* GetT2DlgItem(int id) const { return (T2DlgItem *) GetDlgItem(id); } void SetUserCon(long uc) { mUserCon = uc; } long GetUserCon() { return mUserCon; } class AFX_CLASS_EXPORT T2DialogDef { public: T2DialogDef(); virtual ~T2DialogDef(); int width; int height; int modal; const char *title; int _14; int center; int flags; }; int mDeleteOnClose; T2DLGTEMPLATE mTemplate; long mUserCon; T2TowerDoc *mTowerDoc; T2ImageObj *mImageObj; CPalette *mPalette; int mModal; int mInModalLoop; CFont *mFonts[10]; int mFontNums[10]; int mFontCount; int mCurrentFont; void *mEC; CString mFontName; BOOL mAutoShow; protected: int OnCreate(CREATESTRUCT*); void OnLButtonDblClk(UINT nFlags, CPoint pt); void OnLButtonDown(UINT nFlags, CPoint pt); void OnLButtonUp(UINT nFlags, CPoint pt); void OnActivateApp(BOOL bActive, HTASK hTask); void OnDestroy(); BOOL OnQueryNewPalette(); BOOL OnEraseBkgnd(CDC* pDC); virtual BOOL PreCreateWindow(CREATESTRUCT&); virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); virtual void PostNcDestroy(); virtual void AfterBurner(T2DialogDef& def); virtual void DoOnCreate(char* data); void CreateDlgItemLoop(T2DialogDef& def, char* data); virtual void CreateDlgItem(CTokenizer& inTokenizer, T2DialogDef& inDef); virtual BOOL OnT2DialogCommand(WPARAM inWParam, LPARAM inLParam) { return true; } virtual BOOL OnT2EraseBkgnd(CDC* dc) { return true; } virtual BOOL OnT2PreEraseBkgnd(CDC* dc) { return false; } virtual void OnT2Create() {} virtual void OnT2Destroy() {} virtual void OnT2DlgLButtonDown(UINT nFlags, CPoint pt) {} virtual void OnT2DlgLButtonUp(UINT nFlags, CPoint pt) {} virtual void OnT2DlgLButtonDblClk(UINT nFlags, CPoint pt) {} virtual void OnT2OK() {} virtual void OnT2Cancel() {} }; #endif