示例#1
0
void CG2XPreviewView::OnPreviewPrint()
{
	if (m_hDialog)
	{
		::PostMessage(m_hDialog, WM_COMMAND, ID_FILE_PRINT, 0);
	}
	else
	{
		// the view created for the dialog needs to set the m_pDialog pointer
		ASSERT(FALSE);
	}
	OnPreviewClose();               // force close of Preview
}
示例#2
0
void CPreviewViewEx::OnPreviewPrint() 
{
	// code taken from mfc's base class..
//	CPreviewView::OnPreviewPrint();

	OnPreviewClose(); // force close of Preview

	// set variable with view to print...
//	app.m_lngPrintViewID = ;

	// cause print (can be overridden by catching the command)
	CWnd* pMainWnd = AfxGetThread()->m_pMainWnd;
	ASSERT_VALID(pMainWnd);
	pMainWnd->SendMessage(WM_COMMAND, ID_FILE_PRINT_FROM_PREVIEW);

	// clear view variable
	app.m_lngPrintViewID = 0;
}
示例#3
0
void CG2XPreviewView::ClosePreview()
{
	OnPreviewClose();
}