#if !defined(AFX_BEBECTL_H__94A0A076_BDAD_457B_866D_4BF74A1462F4__INCLUDED_) #define AFX_BEBECTL_H__94A0A076_BDAD_457B_866D_4BF74A1462F4__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include #include "./ImageClass/Image.h" #define GV_MEMUHEIGHT 96 #define GV_MEMUWIDTH 160 #define MT_NORMAL 0 #define MT_FILLCOLOR 1 #define COLOR_TABLE_SIZE 21 // »ö»óâ¿¡ »ö»óÀ» ¼±ÅÃÇϱâ À§ÇÑ ±¸Á¶Ã¼ typedef struct tagBoardColor { COLORREF crColor; CRect rcColor; } BCOLOR; typedef struct tagHistory { COLORREF crOld; COLORREF crNew; CPoint ptFill; } HISTORY; class CHistory { CArray m_undo; CArray m_redo; public: void Clear(); HISTORY Undo(); HISTORY Redo(); BOOL UndoState(); BOOL RedoState(); void NewFill(HISTORY history); }; // BeBeCtl.h : Declaration of the CBeBeCtrl ActiveX Control class. ///////////////////////////////////////////////////////////////////////////// // CBeBeCtrl : See BeBeCtl.cpp for implementation. class CBeBeCtrl : public COleControl { DECLARE_DYNCREATE(CBeBeCtrl) DECLARE_INTERFACE_MAP() BEGIN_INTERFACE_PART(ObjSafe, IObjectSafety) STDMETHOD_(HRESULT, GetInterfaceSafetyOptions) ( /* [in] */ REFIID riid, /* [out] */ DWORD __RPC_FAR *pdwSupportedOptions, /* [out] */ DWORD __RPC_FAR *pdwEnabledOptions ); STDMETHOD_(HRESULT, SetInterfaceSafetyOptions) ( /* [in] */ REFIID riid, /* [in] */ DWORD dwOptionSetMask, /* [in] */ DWORD dwEnabledOptions ); END_INTERFACE_PART(ObjSafe); //Han public: CArray m_imagePool; long m_nImageIndex; CRect m_rcPrev; CString m_szImageURL; CImage m_image; CImage m_imageHide; CImage m_imageMask; CImage m_prevMask; CBitmap m_bmColorBoard; BCOLOR m_colorTable[COLOR_TABLE_SIZE]; HDC m_hDC; CRect m_rcDraw; CRect m_rcImage; CRect m_rcPalette; CRect m_rcSelect; COLORREF m_crSelect; long m_nMouseCursor; CHistory m_history; public: void SetCursorType(); void DoLoadImage(); void DoDraw(HDC hDC, CRect rcDraw); // For print void DoPrint(); void DoRedo(); void DoUndo(); // Constructor public: CBeBeCtrl(); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CBeBeCtrl) public: virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid); virtual void DoPropExchange(CPropExchange* pPX); virtual void OnResetState(); protected: virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); //}}AFX_VIRTUAL // Implementation protected: CBitmapButton m_btnUndo; CBitmapButton m_btnRedo; CBitmapButton m_btnPrint; CBitmapButton m_btnExit; CBitmapButton m_btnPrev; CBitmapButton m_btnNext; ~CBeBeCtrl(); DECLARE_OLECREATE_EX(CBeBeCtrl) // Class factory and guid DECLARE_OLETYPELIB(CBeBeCtrl) // GetTypeInfo DECLARE_PROPPAGEIDS(CBeBeCtrl) // Property page IDs DECLARE_OLECTLTYPE(CBeBeCtrl) // Type name and misc status // Message maps //{{AFX_MSG(CBeBeCtrl) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); //}}AFX_MSG DECLARE_MESSAGE_MAP() // Dispatch maps //{{AFX_DISPATCH(CBeBeCtrl) afx_msg void SetImageURL(LPCTSTR szURL); //}}AFX_DISPATCH DECLARE_DISPATCH_MAP() afx_msg void AboutBox(); // Event maps //{{AFX_EVENT(CBeBeCtrl) void FireOnInitImage() {FireEvent(eventidOnInitImage,EVENT_PARAM(VTS_NONE));} //}}AFX_EVENT DECLARE_EVENT_MAP() // Dispatch and event IDs public: void DoImageNext(); void DoImagePrev(); void DoExit(); enum { //{{AFX_DISP_ID(CBeBeCtrl) dispidSetImageURL = 1L, eventidOnInitImage = 1L, //}}AFX_DISP_ID }; }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_BEBECTL_H__94A0A076_BDAD_457B_866D_4BF74A1462F4__INCLUDED)