阅读背景:

C++MFC学习心得(四)——CListBox自绘控件碰到的一个小问题

来源:互联网 

老规矩,先贴代码

//.h
class CMyApp:public CWinApp{public:	virtual BOOL InitInstance();};class CIconListBox:public CListBox{public:	virtual BOOL PreCreateWindow(CREATESTRUCT &cs);	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpmis);	virtual void DrawItem(LPDRAWITEMSTRUCT lpdis);	int AddIcon(HICON hIcon);	void ProjectImage(CDC* pDC,LPRECT pRect,COLORREF clrBackColor);};class CMainWnd:public CWnd{protected:	int m_cxChar;	int m_cyChar;	CFont m_font;	CRect m_rcImage;	CButton m_wndGroupBox;	CIconListBox m_wndIconListBox;	CStatic m_wndLabel;public:	CMainWnd();protected:	virtual void PostNcDestroy();	afx_msg int OnCreate(LPCREATESTRUCT lpcs);	afx_msg void OnPaint();	afx_msg void OnSetFocus(CWnd* pWnd);	afx_msg void OnDropFiles(HDROP hDropInfo);	afx_msg void OnSelChange();	DECLARE_MESSAGE_MAP()};class CMyApp:public CWinApp{p



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: