Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Another Report List Control

, 31 Dec 2003
A report style CListCtrl supporting sorting, sub-item editing, sub-item image, sub-item color etc.
creportctrl_demo.zip
CReportCtrl_Demo
RCSeparator
RCSeparator.clw
RCSeparator.dsw
RCSeparator.dsp
Release
RCSeparator.exe
res
RCSeparator.ico
ListView
ReportCtrlDemo.clw
ReportCtrlDemo.dsw
ReportCtrlDemo.dsp
Release
ReportCtrlDemo.exe
res
ReportCtrlDemoDoc.ico
ReportCtrlDemo.ico
Toolbar.bmp
bitmap1.bmp
bitmap2.bmp
Dialog_Based
ReportCtrlDemo.dsw
ReportCtrlDemo.clw
ReportCtrlDemo.dsp
Release
ReportCtrlDemo.exe
res
ReportCtrlDemo.ico
bitmap1.bmp
bitmap2.bmp
creportctrl_src.zip
CReportCtrl_Src
// SepDlg.cpp : implementation file
//

#include "stdafx.h"
#include "RCSeparator.h"
#include "SepDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSepDlg dialog


CSepDlg::CSepDlg(BOOL bNoSep, LPCTSTR lpSep, CWnd* pParent /*=NULL*/)
	: CDialog(CSepDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSepDlg)
	m_bNoSep = FALSE;
	m_sSep = _T("");
	//}}AFX_DATA_INIT
	m_bNoSep = bNoSep;
	if (!m_bNoSep)
		m_sSep = lpSep;
}


void CSepDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSepDlg)
	DDX_Control(pDX, IDC_EDIT1, m_wndSep);
	DDX_Check(pDX, IDC_CHECK1, m_bNoSep);
	DDX_Text(pDX, IDC_EDIT1, m_sSep);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSepDlg, CDialog)
	//{{AFX_MSG_MAP(CSepDlg)
	ON_BN_CLICKED(IDC_CHECK1, OnCheck1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSepDlg message handlers

BOOL CSepDlg::UseSep() const
{
	return !m_bNoSep;
}

CString CSepDlg::GetSep() const
{
	return m_sSep;
}

BOOL CSepDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_wndSep.EnableWindow(!m_bNoSep);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CSepDlg::OnCheck1() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
	m_wndSep.EnableWindow(!m_bNoSep);
}

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Abin

China China
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 1 Jan 2004
Article Copyright 2003 by Abin
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid