www.pudn.com > PhoneReaderSrc.rar > XListBox.h


#ifndef _XLISTBOX_H_ 
#define _XLISTBOX_H_ 
///////////////////////////////////////////////////////////// 
// 
//   CXListBox ---- a color ListBox control for color selector 
//           it is an ATL control for Pocket PC ,PPC2002,SMartphone2002 
//    Made by yanxinhai(yanxh@mic.com.tw) in 2002.10.17 
//    All Copyright reserved 2002-2003  
//    You can use it freely! 
//    ANY PROBLEM,PLEASE FEEL FREE TO CONTACT ME! 
 
#define LISTBOX_EXPAND (WM_USER + 118) 
 
class CXListBox : public CWindowImpl 
{ 
// Construction 
public: 
	CXListBox(){ m_bEnableBorder = TRUE; }; 
     
	BEGIN_MSG_MAP(CXListBox) 
		MESSAGE_HANDLER(WM_PAINT, OnPaint) 
	END_MSG_MAP() 
// Attributes 
public: 
 
// Operations 
public: 
	int AddItem(LPCTSTR lpszItem, COLORREF rgb = RGB(255,255,255));				 
	int InsertItem(int nIndex, LPCTSTR lpszItem, COLORREF rgb = RGB(255,255,255)); 
	void EnableRGBBorder(BOOL nEnabled = TRUE); 
 
// Implementation 
public: 
	virtual ~CXListBox(){}; 
 
	LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
 
private: 
	BOOL m_bEnableBorder; 
}; 
#endif // _XLISTBOX_H_