www.pudn.com > 密聊源程序.rar > ColorComboBox.h
#if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // ColorComboBox.h : header file // #include///////////////////////////////////////////////////////////////////////////// // CColorComboBox window /*必须在combo box properties中的style属性中正确的设置 Type(Drop List) Owner draw(Fixed) sort取消*/ class CColorComboBox : public CComboBox { // Construction public: CColorComboBox(); // Attributes private: CStringArray m_szaryItem; COLORREF m_clrText,m_clrBackGround; CArray m_aryColorText; CArray m_aryColorBackGround; // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CColorComboBox) public: virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); //}}AFX_VIRTUAL // Implementation public: void SetBckGndColor(COLORREF clrBckGnd); void SetTextColor(COLORREF clrText); int AddString(LPCTSTR lpszString); virtual ~CColorComboBox(); // Generated message map functions protected: //{{AFX_MSG(CColorComboBox) // NOTE - the ClassWizard will add and remove member functions here. //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line.