#ifndef __RV_CHECK_BOX_H_INCLUDED_
#define __RV_CHECK_BOX_H_INCLUDED_

#include "reacx.h"
 

class REACX_API CCheckBox :	public CReacter
{
public:
	CCheckBox(void);
	virtual ~CCheckBox(void);

	virtual BOOL    Serialize(HANDLE device, BOOL bIn ) ;
	virtual CUCObj* Clone( CUCObj* twin) ;
	virtual void    Show(CDelegate* pDelegate, int mode,  BOOL bForced );

	void LoadImages(const TCHAR* strFileNormal, const TCHAR* strFileDown, const TCHAR* strFileNormalDisable, const TCHAR* strFileDownDisable);
	void SetImages(const RvImage imNor,  const RvImage imDown, const RvImage imNormalDis, const RvImage imDownDis);

public:
	RvColor m_backColorNor;
	RvColor m_backColorNorDis;
	RvColor m_backColorDown;
	RvColor m_backColorDownDis;
  
	CUtString  m_strCaption;
	BOOL       m_bButtonLike;

//window message
public:

	virtual void OnSetFocus();
	virtual void OnKillFocus();
	  
	virtual void OnLButtonDown(WPARAM wParam, LPARAM lParam);
	virtual void OnLButtonUp(WPARAM wParam, LPARAM lParam);

protected:
	 void DrawInRuntime(CDelegate* pDelegate, BOOL bForce  );
	 void DrawInEdition(CDelegate* pDelegate, BOOL bForce  ); 

	 void DestroyAllImages();

protected:
	RvImage m_imNormal;     
	RvImage m_imNormalDis;  
	RvImage m_imDown;      
	RvImage m_imDownDis;    

};
 




#endif //__RV_CHECK_BOX_H_INCLUDED_