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

📄 ekprintingdlg.cpp

📁 这是MFC经典问答书的光盘内容
💻 CPP
字号:
// EkPrintingDlg.cpp : implementation file
//

#include "stdafx.h"
#include "CustomPrintingDialog.h"
#include "EkPrintingDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEkPrintingDlg dialog


CEkPrintingDlg::CEkPrintingDlg(CWnd* pParent, CWnd* pStandardDialog)
	: CDialog(CEkPrintingDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CEkPrintingDlg)
	//}}AFX_DATA_INIT

	ASSERT_VALID( pStandardDialog );
	m_pStandardDialog = pStandardDialog;

	// Create modeless dialog box
	// (MFC automatically disables the application's
	// main window while printing)
	Create(CEkPrintingDlg::IDD, pParent);
}


void CEkPrintingDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CEkPrintingDlg)
	DDX_Control(pDX, AFX_IDC_PRINT_DOCNAME, m_DocName);
	DDX_Control(pDX, AFX_IDC_PRINT_PRINTERNAME, m_PrinterName);
	DDX_Control(pDX, AFX_IDC_PRINT_PORTNAME, m_PortName);
	DDX_Control(pDX, AFX_IDC_PRINT_PAGENUM, m_PageNum);
	DDX_Control(pDX, IDC_PROGRESS, m_Progress);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CEkPrintingDlg message handlers

BOOL CEkPrintingDlg::OnInitDialog() 
{
	SetWindowText( AfxGetAppName() );
	CenterWindow();
	
	return CDialog::OnInitDialog();
}

void CEkPrintingDlg::OnCancel() 
{
	ASSERT_VALID( m_pStandardDialog );
	ASSERT( ::IsWindow( m_pStandardDialog->GetSafeHwnd() ) );

	// Ask MFC's "Printing..." dialog to cancel
	// the printing process
	m_pStandardDialog->SendMessage( WM_COMMAND, IDCANCEL, 0 );

	// Dialog is destroyed in view's OnEndPrinting() function
}

⌨️ 快捷键说明

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