#if !defined(AFX_WKBUTTON_H__99FB32BE_6D54_4845_BD51_1BC64E774CC6__INCLUDED_) #define AFX_WKBUTTON_H__99FB32BE_6D54_4845_BD51_1BC64E774CC6__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // WKButton.h : header file /******************************< ÇÁ·Î±×·¥ Á¤º¸ >****************************/ /* Ŭ ·¡ ½º ¸í : WKButton */ /* ¹ö Àü : */ /* ÃÖÁ¾ ¼öÁ¤ÀÏ : 2006. 05. 28 */ /***************************************************************************/ /////////////////////////////////< Á¤ ÀÇ >////////////////////////////////// // ¹öư ÇüÅ #define WK_BUTTON_SHPAE_RECTANGLE 0x0001 #define WK_BUTTON_SHAPE_CIRCLE 0x0002 #define WK_BUTTON_SHAPE_ROUNDRECT 0x0004 // ¹öư »ö»ó #define WK_BUTTON_COLOR_ONE 0x0001 #define WK_BUTTON_COLOR_TWO 0x0002 #define WK_BUTTON_COLOR_GRADATION_UP 0x0011 #define WK_BUTTON_COLOR_GRADATION_RIGHT 0x0012 #define WK_BUTTON_COLOR_GRADATION_DOWN 0x0014 #define WK_BUTTON_COLOR_GRADATION_LEFT 0x0018 // ¹öư »óÅ #define WK_BUTTON_STATUS_MOUSEOVER 0x0001 #define WK_BUTTON_STATUS_MOUSELEAVE 0x0002 #define WK_BUTTON_STATUS_MOUSECLICK 0x0004 ///////////////////////////////< Ŭ·¡½º ±¸Á¶ >/////////////////////////////// class AFX_EXT_CLASS CWKButton : public CButton { public://<<<<<<<<<<<<<<<<<<<<<< ¿ÜºÎ Á¢±Ù ÇÔ¼ö >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CWKButton(); virtual ~CWKButton(); // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CWKButton) public: virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL); virtual BOOL Create(LPCTSTR lpszCaption, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID); virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); virtual BOOL PreTranslateMessage(MSG* pMsg); virtual BOOL DestroyWindow(); protected: virtual void PreSubclassWindow(); //}}AFX_VIRTUAL public: /*****************************< ¹öư ¼³Á¤ ÇÔ¼ö >****************************/ /* ÅØ½ºÆ® ¸ð¾ç ¹× ³»¿ë ÁöÁ¤ */ BOOL SetButtonText(CString strCaption); BOOL SetButtonText(CString strCaption, COLORREF rgbText); BOOL SetButtonText(CString strCaption, CFont *font, COLORREF rgbText); /* ¹öư ÇüÅ ¹× »ö»ó ÁöÁ¤ */ BOOL SetButtonStyle(DWORD dShape, COLORREF rgbColor1); BOOL SetButtonStyle(DWORD dShape, DWORD dStyle, COLORREF rgbColor1, COLORREF rgbColor2); /***************************************************************************/ protected://<<<<<<<<<<<<<<<< ³»ºÎ ó¸® ÇÔ¼ö ¹× º¯¼ö >>>>>>>>>>>>>>>>>>>>>>>>> /* »óź° ¹öư À̹ÌÁö */ CBitmap m_bmpImage1; //Æò»ó½Ã CBitmap m_bmpImage2; //¸¶¿ì½º ¿À¹ö CBitmap m_bmpImage3; //Ŭ¸¯ /* »óź° ¹öư À̹ÌÁö »ý¼º */ BOOL CreateButtonImage(); /* ¹öư ÇüÅ »ý¼º */ BOOL DrawFormRectangle(); // »ç°¢ BOOL DrawFormCircle(); // ¿ø BOOL DrawFormRoundRect(); // µÕ±Ù»ç°¢ /* À̹ÌÁö ó¸® */ COLORREF LightValueControl(COLORREF rgb, int nValue); // »ö»ó ¹à±â Á¶Àý void DrawGradation(CBitmap* bmpImage, COLORREF color1, COLORREF color2); // ±×¶óµ¥ÀÌ¼Ç À̹ÌÁö »ý¼º BOOL DrawBorder(CBitmap* pbmpImage, COLORREF color1, COLORREF color2, int nWidth = 2); // ¹öư Å׵θ® ±×¸®±â BOOL DrawText(CBitmap* pBitmap, int nStatus); // ¹öư¿¡ ±Û¾¾ ³Ö±â /* ¹öư À̹ÌÁö Á¤º¸ */ DWORD m_dShape; // ¹öư ÇüÅ DWORD m_dStyle; // Ä÷¯ ½ºÅ¸ÀÏ COLORREF m_rgbColor1; // ù¹øÂ° Ä÷¯ COLORREF m_rgbColor2; // µÎ¹øÂ° Ä÷¯ CRect m_rtButton; // ¹öưũ±â int m_nWidth; // ¹öư ³Êºñ int m_nHeight; // ¹öư ³ôÀÌ /* ÅØ½ºÆ® Á¤º¸ */ CString m_strCaption; // ĸ¼Ç ³»¿ë CFont m_Font; // ĸ¼Ç ±Û²Ã COLORREF m_rgbText; // ĸ¼Ç »ö»ó BOOL m_bValueChange; // ĸ¼Ç º¯°æ /* ¹öư »óÅ Á¤º¸ */ DWORD m_dButtonStatus; //{{AFX_MSG(CWKButton) afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct); afx_msg void OnPaint(); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_WKBUTTON_H__99FB32BE_6D54_4845_BD51_1BC64E774CC6__INCLUDED_)