#ifndef T2DLL_T2DLGITEM_H #define T2DLL_T2DLGITEM_H #include "../common.h" #include "LBroadcaster.h" class AFX_CLASS_EXPORT T2DlgItem : public CWnd, public LBroadcaster { protected: T2DlgItem(); public: T2DlgItem(T2TowerDoc* inDoc, T2ImageObj* inImageObj, CPalette* inPalette); virtual ~T2DlgItem(); virtual BOOL Create(const char* inWindowName, DWORD inStyle, const RECT& inRect, CWnd* inParentWnd, UINT inID); virtual void SetFont(HFONT font); virtual void CreateSubItem(void*); virtual void SetValue(int value); virtual int GetValue(); virtual void GetDescriptor(CString& outStr) const; virtual void SetDescriptor(const CString& str); protected: virtual void PostNcDestroy(); virtual void DestroySelf(); virtual T2BitImage* GetObjectImage(RECT& outRect, const char* inName, int inPattern = -1, int inGrade = 0, int inSpan = 0, int inOffset = 255) const; virtual BOOL OnT2DlgItemEraseBkgnd(CDC* pDC); virtual void OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt); virtual void OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt); virtual void OnT2DlgItemRButtonDown(UINT nFlags, CPoint pt); virtual void OnT2DlgItemRButtonUp(UINT nFlags, CPoint pt); virtual void OnT2DlgItemMouseMove(UINT nFlags, CPoint pt); virtual void OnT2DlgItemEnable(int); virtual int OnT2DlgItemCreate(CREATESTRUCT*); virtual void OnT2Size(UINT nType, int cx, int cy); virtual void OnT2SetFocus(CWnd* wnd); virtual void OnT2KillFocus(CWnd* wnd); virtual void OnT2Timer(UINT id); virtual void OnT2Close(); BOOL OnEraseBkgnd(CDC* pDC); void OnLButtonDown(UINT nFlags, CPoint pt); void OnLButtonUp(UINT nFlags, CPoint pt); void OnRButtonDown(UINT nFlags, CPoint pt); void OnRButtonUp(UINT nFlags, CPoint pt); void OnMouseMove(UINT nFlags, CPoint pt); void OnEnable(int); int OnCreate(CREATESTRUCT*); void Notify(unsigned short, void*); void Notify(unsigned short, unsigned short, void*); int GetPattern() const; void SetPattern(int pattern); void OnSize(UINT nType, int cx, int cy); void OnSetFocus(CWnd* wnd); void OnKillFocus(CWnd* wnd); void OnTimer(UINT id); void OnClose(); DECLARE_MESSAGE_MAP() protected: T2TowerDoc *mTowerDoc; T2ImageObj *mImageObj; CPalette *mPalette; int m74; HFONT mFont; int m7C; int mValue; int mPattern; }; #endif