示例#1
0
void CIEDemoView::OnViewFontsSmallest()
{
	COleVariant vaZoomFactor(0l);

	ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
		   &vaZoomFactor, NULL);
}
示例#2
0
void CBCGPIE7DemoView::OnDocumentComplete(LPCTSTR lpszURL) 
{
	// make sure the main frame has the new URL.  This call also stops the animation
	((CMainFrame*)AfxGetMainWnd())->SetAddress(lpszURL);

	CBCGPIE7DemoDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	CHistoryObj* pObj = pDoc->AddURLToHistory (GetLocationName (), lpszURL);
	if (pObj != NULL)
	{
		theApp.m_History.Add (*pObj);
		// TODO: update history bar
	}

	((CMainFrame*)AfxGetMainWnd())->SetProgress (0, -1);

	COleVariant var(0l);
	ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
	   NULL, &var);

	m_nFontSize = max(min(var.lVal, 4l), 0l);

	CHtmlView::OnDocumentComplete(lpszURL);
}
示例#3
0
void CMfcieView::OnViewFontsSmall()
{
	COleVariant vaZoomFactor(1l);

	ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
		   &vaZoomFactor, NULL);
}
示例#4
0
BOOL CEnBrowserCtrl::SafeExecWB(long cmdID, long cmdexecopt, VARIANT* pvaIn, VARIANT* pvaOut) 
{
	try
	{
		ExecWB(cmdID, cmdexecopt, pvaIn, pvaOut);
	}
	catch (CException* /*e*/)
	{
		// fallback for unhandled options
		switch (cmdID)
		{
		case OLECMDID_PRINT2:
			return SafeExecWB(OLECMDID_PRINT, cmdexecopt, pvaIn, pvaOut);

		case OLECMDID_PRINTPREVIEW2:
			return SafeExecWB(OLECMDID_PRINTPREVIEW, cmdexecopt, pvaIn, pvaOut);

		default:;
			// fall thru
		}

		return FALSE;
	}

	return TRUE;
}
示例#5
0
void CBCGPIE7DemoView::OnViewFontSizeSmallest()
{
	if (m_nFontSize == 0l)
	{
		return;
	}

	m_nFontSize = 0l;
	COleVariant vaZoomFactor(m_nFontSize);

	ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,
		   &vaZoomFactor, NULL);
}
示例#6
0
BOOL CEnBrowserCtrl::SafeExecWB(long cmdID, long cmdexecopt, VARIANT* pvaIn, VARIANT* pvaOut)
{
	try
	{
		ExecWB(cmdID, cmdexecopt, pvaIn, pvaOut);
	}
	catch (CException* /*e*/)
	{
		return FALSE;
	}

	return TRUE;
}
示例#7
0
void CBCGPIE7DemoView::OnEditSelectAll()
{
	ExecWB(OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
}
示例#8
0
void CBCGPIE7DemoView::OnEditFind()
{
	ExecWB(OLECMDID_FIND, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
}
示例#9
0
void CBCGPIE7DemoView::OnFileProperties()
{
	ExecWB(OLECMDID_PROPERTIES, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
}
示例#10
0
void CBCGPIE7DemoView::OnFileSaveAs()
{
	ExecWB(OLECMDID_SAVEAS, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
}
示例#11
0
void CBCGPIE7DemoView::OnFilePageSetup()
{
	ExecWB(OLECMDID_PAGESETUP, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
}
示例#12
0
void CBCGPIE7DemoView::OnFilePrintPreview() 
{
	ExecWB(OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
}
示例#13
0
void CChatView::OnEditCopy() 
{
	ExecWB(OLECMDID_COPY, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL); 
}