MultiColumnComboBox.h
上传用户:hzw123hzw
上传日期:2007-01-01
资源大小:18k
文件大小:2k
- // By Xiao Wu Guang
- // MultiColumnComboBox.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CMultiColumnComboBox window
- #ifndef _MULTICOLUMNCOMBOBOX_H_
- #define _MULTICOLUMNCOMBOBOX_H_
-
- #define LEFTMARGIN_OF_DROPDOWNLIST 2
- #define LEFTMARGIN_OF_CONTROL 1
- #define RIGHTMARGIN_OF_DROPDOWNLIST 4
- #define SPACE_BETWEEN_COLUMN 1
- class CMultiColumnComboBox : public CComboBox
- {
- // Construction
- public:
- CMultiColumnComboBox();
-
- // Attributes
- public:
- void FormatComboBox(UINT TotalColumn = 2, UINT BoundColumn = 0);
- void SetColumnWidth(UINT ColumnWidth0, ...);
- void SetColumnAlignStyle(UINT ColumnAlignStyle0, ...);
- // Operations
- public:
- void ResetContent();
- int AddRow(LPCTSTR lpszString0, ...);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMultiColumnComboBox)
- public:
- virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
- virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CMultiColumnComboBox();
- // Generated message map functions
- protected:
- private:
- UINT m_TotalColumn;
- UINT m_BoundColumn;
- UINT m_TextItemHeight;
- CPen m_LightGrayPen;
- UINT* m_ColumnWidth;
- UINT* m_ColumnAlignStyle;
- CStringList* m_ColumnItemList;
- //{{AFX_MSG(CMultiColumnComboBox)
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- #endif