Click here to Skip to main content
15,880,469 members
Articles / Desktop Programming / MFC

A Property Sheet in a Docking Toolbar

Rate me:
Please Sign up or sign in to vote.
4.06/5 (7 votes)
26 Nov 2004CPOL3 min read 69.1K   2.1K   34  
Explains how to put a CPropertySheet into a CControlBar.
// Page1.cpp : implementation file
//

#include "stdafx.h"
#include "tab_dlg_bar.h"
#include "Page1.h"
#include ".\page1.h"


// CPage1 dialog

IMPLEMENT_DYNAMIC(CPage1, CPropertyPage)
CPage1::CPage1()
	: CPropertyPage(CPage1::IDD)
	, int1(0)
{
}

CPage1::~CPage1()
{
}

void CPage1::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT1, int1);
	DDV_MinMaxInt(pDX, int1, 0, 100);
}


BEGIN_MESSAGE_MAP(CPage1, CPropertyPage)
//	ON_EN_CHANGE(IDC_EDIT1, OnEnChangeEdit1)
ON_EN_KILLFOCUS(IDC_EDIT1, OnEnKillfocusEdit1)
ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
END_MESSAGE_MAP()


// CPage1 message handlers



void CPage1::OnEnKillfocusEdit1()
{
	if (UpdateData()==FALSE)
		return;
	CString str;
	str.Format("page one value = %d",int1);
	m_pView->SetWindowText(str);
}

void CPage1::OnBnClickedButton1()
{
	AfxMessageBox("Doesn't do much");
}

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
Software Developer The University of St. Andrews
United Kingdom United Kingdom
I am a university academic specialising in Neuroscience. I write simulation and analysis software.

Comments and Discussions