www.pudn.com > 44757463.rar > LineComboBox.h


////////////////////////////////////////////////////////////////////// 
// CLASS    :  CLineComboBox 
// ABSTRACT :  线条宽度选择组合框 
// NOTE     :  主要是用在图形的属性设置时的笔宽设置 
//          :   
// CREATE   :  FNST)handwolf  2004-4-21 
// UPDATE   :   
//          :  
////////////////////////////////////////////////////////////////////// 
 
#ifndef XGL_GRAPGSOFT_LINECOMBOX_HEADER_FILE_2004_4_21 
#define XGL_GRAPGSOFT_LINECOMBOX_HEADER_FILE_2004_4_21 
#include "afxtempl.h" 
 
 
typedef struct BSCBITEM 
{ 
	int			iIndex; 
	int         nLineWidth; 
	CString		lpCaption; 
}BSCBITEM, *LPBSCBITEM; 
class CLineComboBox : public CComboBox 
{ 
	DECLARE_DYNCREATE(CLineComboBox)		 
public: 
	CLineComboBox(); 
	virtual ~CLineComboBox(); 
	// 
	BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);	 
public: 
	//{{AFX_VIRTUAL(CLineComboBox) 
	public: 
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); 
	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); 
	//}}AFX_VIRTUAL 
//Operation 
public: 
    LPBSCBITEM GetItem(int iIndex = 0); 
	int GetCurLineWidth(); 
	void OnCBPaint(CDC* pDC); 
	void Init(); 
protected: 
	int m_nLineLength; 
	int m_nItemHeight; 
	int m_nMargin; 
	int m_nMouseState;		 
	CList m_LineWidthList;	 
protected: 
	//{{AFX_MSG(CLineComboBox) 
	afx_msg BOOL OnEraseBkgnd(CDC* pDC); 
	afx_msg void OnPaint(); 
	afx_msg void OnMouseMove(UINT nFlags, CPoint point); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
#endif // XGL_GRAPGSOFT_LINECOMBOX_HEADER_FILE_2004_4_21