LineComboBox.h
资源名称:44757463.rar [点击查看]
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:2k
源码类别:
绘图程序
开发平台:
Visual C++
- //////////////////////////////////////////////////////////////////////
- // 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<LPBSCBITEM, LPBSCBITEM> 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