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

📄 mydlgsetup.cpp

📁 从列表进行打印的源码,请大家下载参考对照,从中发表意见,加深修改.
💻 CPP
字号:
// MyDlgSetup.cpp : implementation file
//

#include "stdafx.h"
#include "myprinter.h"
#include "MyDlgSetup.h"
#include "MyClass.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyDlgSetup dialog


CMyDlgSetup::CMyDlgSetup(CWnd* pParent /*=NULL*/)
	: CDialog(CMyDlgSetup::IDD, pParent)
{
	EnableAutomation();

	//{{AFX_DATA_INIT(CMyDlgSetup)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CMyDlgSetup::OnFinalRelease()
{
	// When the last reference for an automation object is released
	// OnFinalRelease is called.  The base class will automatically
	// deletes the object.  Add additional cleanup required for your
	// object before calling the base class.

	CDialog::OnFinalRelease();
}

void CMyDlgSetup::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyDlgSetup)
	DDX_Control(pDX, IDC_CHECK_SHOUPAGE, m_Check_ShouPage);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMyDlgSetup, CDialog)
	//{{AFX_MSG_MAP(CMyDlgSetup)
	ON_BN_CLICKED(IDC_CHECK_SHOUPAGE, OnCheckShouPage)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

BEGIN_DISPATCH_MAP(CMyDlgSetup, CDialog)
	//{{AFX_DISPATCH_MAP(CMyDlgSetup)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()

// Note: we add support for IID_IMyDlgSetup to support typesafe binding
//  from VBA.  This IID must match the GUID that is attached to the 
//  dispinterface in the .ODL file.

// {E4739D9E-5433-4C50-9C89-A64CD911CE59}
static const IID IID_IMyDlgSetup =
{ 0xe4739d9e, 0x5433, 0x4c50, { 0x9c, 0x89, 0xa6, 0x4c, 0xd9, 0x11, 0xce, 0x59 } };

BEGIN_INTERFACE_MAP(CMyDlgSetup, CDialog)
	INTERFACE_PART(CMyDlgSetup, IID_IMyDlgSetup, Dispatch)
END_INTERFACE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyDlgSetup message handlers

void CMyDlgSetup::OnCheckShouPage() 
{
	// TODO: Add your control notification handler code here
	//this->GetDlgItem (IDC_CHECK_SHOUPAGE)->
//	if((CButton *)GetDlgItem(IDC_CHECK_SHOUPAGE).GetCheck()==TRUE;)
	if(this->m_Check_ShouPage.GetCheck ())
	{
		CMyClass::b_ShowPage =TRUE;
		//this->MessageBox ("^_^");
	}
	else
		CMyClass::b_ShowPage =FALSE;
	
}

BOOL CMyDlgSetup::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	if(CMyClass::b_ShowPage ==TRUE)
	{
		this->m_Check_ShouPage .SetCheck (1);
	}
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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