Click here to Skip to main content
15,896,269 members
Articles / Desktop Programming / MFC

CWnd/WTL based HTML List Control with different row heights

Rate me:
Please Sign up or sign in to vote.
4.90/5 (65 votes)
2 May 2006CPOL3 min read 233.7K   4.3K   128  
This is a CWnd/WTL based list control; it supports basic HTML tags and multiple row heights.
// NewControlDlg.h : header file
//

#if !defined(AFX_NEWCONTROLDLG_H__50484475_B6C3_4AA9_AF9F_9F5E1097B5F0__INCLUDED_)
#define AFX_NEWCONTROLDLG_H__50484475_B6C3_4AA9_AF9F_9F5E1097B5F0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "HTMLListCtrl.h"
/////////////////////////////////////////////////////////////////////////////
// CNewControlDlg dialog

class CNewControlDlg : public CDialog
{
// Construction
public:
	void OnOK();
	CNewControlDlg(CWnd* pParent = NULL);	// standard constructor

	CImageList m_ImageList;
// Dialog Data
	//{{AFX_DATA(CNewControlDlg)
	enum { IDD = IDD_NEWCONTROL_DIALOG };
	BOOL	m_bCheckBoxes;
	BOOL	m_bGridLines;
	BOOL	m_bShowImages;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNewControlDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

	CHTMLListCtrl m_list;
// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CNewControlDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnCheckCheckboxes();
	afx_msg void OnCheckGridlines();
	afx_msg void OnCheckImages();
	afx_msg void OnDestroy();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	afx_msg void OnHTMLList_SelectionChanged(NMHDR* pNMHDR, LRESULT*);
	afx_msg void OnHTMLList_LButtonDown(NMHDR* pNMHDR, LRESULT*);
	afx_msg void OnHTMLList_LButtonDBLClick(NMHDR* pNMHDR, LRESULT*);
	afx_msg void OnHTMLList_RButtonDown(NMHDR* pNMHDR, LRESULT*);
	afx_msg void OnHTMLList_CheckStateChanged(NMHDR* pNMHDR, LRESULT*);
	
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NEWCONTROLDLG_H__50484475_B6C3_4AA9_AF9F_9F5E1097B5F0__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
India India
Programming Since the the Dreaded 286 Assembly Days

currently MFC and ATL NUT


Don't take life seriously because you can't come out of it alive.
-Warren Miller

Comments and Discussions