www.pudn.com > mir112347628.rar > Button.H


#ifndef _CTEXTBUTTON_H
#define _CTEXTBUTTON_H

class CTextButton
{
public:
VOID ClickFreeAllBtn(VOID);
INT GetButtonCount(VOID);
CMTxtBtn* GetButton(INT nIndex);
CTextButton(); // Constructor
virtual ~CTextButton(); // Destructor
BOOL AddButton(CHAR *pszTxt,RECT xRect,INT nLinePos,CHAR *pszParam,COLORREF nColor,COLORREF cColor); // Add Button to class
BOOL AddButton(CHAR *pszTxt,CHAR *pszTxt2,RECT xRect,INT nLinePos,CHAR *pszParam,COLORREF nColor,COLORREF cColor); // Add Button to class

CMTxtBtn* ClickCheck(POINT xWndPos,POINT xPos,INT CurrentTopLine); // xWndPos: ½ÇÁ¦ Text °¡ ÂïÈ÷´Â °¡Àå ³¡Á¡
CMTxtBtn* ButtonDownCheck(POINT xWndPos,POINT xPos,INT CurrentTopLine);
CMTxtBtn* ButtonUpCheck(POINT xWndPos,POINT xPos,INT CurrentTopLine);

BOOL IsCurrsorOnThisButton(CMTxtBtn* pBtn,POINT xWndPos,POINT xPos,INT CurrentTopLine);

BOOL InitTxtBtn(INT nMaxLine,POINT nStartPos,INT LineGap);
// BOOL InitTxtBtn(INT nMaxLine);
CPDLList<CMTxtBtn> m_pTxtBtn;
BOOL ReleaseButtons(VOID);
private:
BOOL m_bIsReady;
RECT m_rtWndRect; // À©µµ¿ìÀÇ Rect ´Ü, ±ÛÀÚ°¡ Ç¥½ÃµÇ´Â ºÎºÐ
INT m_nTxtHeight; // Textº° Height
INT m_nMaxLine; // À©µµ¿ì¿¡ Ç¥½ÃµÇ´Â ÃÖ´ë Line ¼ö
INT m_nLineGap;
POINT m_xStartPos;
BOOL m_IsUseSubTxt;
};

#endif _CTEXTBUTTON_H