void CIEDemoView::OnViewFontsSmallest() { COleVariant vaZoomFactor(0l); ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, &vaZoomFactor, NULL); }
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); }
void CMfcieView::OnViewFontsSmall() { COleVariant vaZoomFactor(1l); ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, &vaZoomFactor, NULL); }
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; }
void CBCGPIE7DemoView::OnViewFontSizeSmallest() { if (m_nFontSize == 0l) { return; } m_nFontSize = 0l; COleVariant vaZoomFactor(m_nFontSize); ExecWB(OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, &vaZoomFactor, NULL); }
BOOL CEnBrowserCtrl::SafeExecWB(long cmdID, long cmdexecopt, VARIANT* pvaIn, VARIANT* pvaOut) { try { ExecWB(cmdID, cmdexecopt, pvaIn, pvaOut); } catch (CException* /*e*/) { return FALSE; } return TRUE; }
void CBCGPIE7DemoView::OnEditSelectAll() { ExecWB(OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT, NULL, NULL); }
void CBCGPIE7DemoView::OnEditFind() { ExecWB(OLECMDID_FIND, OLECMDEXECOPT_DODEFAULT, NULL, NULL); }
void CBCGPIE7DemoView::OnFileProperties() { ExecWB(OLECMDID_PROPERTIES, OLECMDEXECOPT_DODEFAULT, NULL, NULL); }
void CBCGPIE7DemoView::OnFileSaveAs() { ExecWB(OLECMDID_SAVEAS, OLECMDEXECOPT_DODEFAULT, NULL, NULL); }
void CBCGPIE7DemoView::OnFilePageSetup() { ExecWB(OLECMDID_PAGESETUP, OLECMDEXECOPT_DODEFAULT, NULL, NULL); }
void CBCGPIE7DemoView::OnFilePrintPreview() { ExecWB(OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT, NULL, NULL); }
void CChatView::OnEditCopy() { ExecWB(OLECMDID_COPY, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL); }