⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mycpdlg.cpp

📁 visual c++ 实例编程
💻 CPP
字号:
// MyCPDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MyCtrlPanel.h"
#include "MyCPDlg.h"

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

IMPLEMENT_DYNCREATE(CMyCtrlPanelDlg, CDialog);
IMPLEMENT_DYNAMIC(CMyPropPage, CPropertyPage);
IMPLEMENT_DYNCREATE(CMyPropSheet, CPropertySheet);

/////////////////////////////////////////////////////////////////////////////
// CMyCtrlPanelDlg dialog

CMyCtrlPanelDlg::CMyCtrlPanelDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CMyCtrlPanelDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CMyCtrlPanelDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}

void CMyCtrlPanelDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyCtrlPanelDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMyCtrlPanelDlg, CDialog)
	//{{AFX_MSG_MAP(CMyCtrlPanelDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyCtrlPanelDlg message handlers

BOOL CMyCtrlPanelDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here

	// subclass static controls. URL is static text or 3rd arg
	m_wndLink1.SubclassDlgItem(IDC_VCKBASE, this);
	m_wndLink2.SubclassDlgItem(IDC_EMAIL,  this);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}


//////////////////
// Initialize: subclass web links if on this page.
//
BOOL CMyPropPage::OnInitDialog()
{
	if (GetDlgItem(IDC_VCKBASE)) {
		m_wndLink1.SubclassDlgItem(IDC_VCKBASE, this);
		m_wndLink2.SubclassDlgItem(IDC_EMAIL,  this);
	}
	return CPropertyPage::OnInitDialog();
}

//////////////////
// Construct: set icon and add all the pages.
//
CMyPropSheet::CMyPropSheet() : CPropertySheet(IDS_MYPROPSHEETCAPTION)
{
	m_psh.dwFlags |= PSH_NOAPPLYNOW | PSH_USEHICON;
	m_psh.hIcon = AfxGetApp()->LoadIcon(IDR_MYAPPLET3);
	for (int i=0; i<NPAGES; i++) {
		m_mypages[i].Construct(IDD_PAGE1+i);
		AddPage(&m_mypages[i]);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -