BOOL CIwResultPropertyPage::OnSetActive() { CPropertySheet* parent = (CPropertySheet*)GetParent(); parent->SetWizardButtons(PSWIZB_FINISH); return CPropertyPage::OnSetActive(); }
LRESULT CEasyPage1::OnWizardNext() { // TODO: Add your specialized code here and/or call the base class // return CPropertyPage::OnWizardNext(); CPropertySheet* pSheet = (CPropertySheet*)GetParent(); ASSERT_KINDOF(CPropertySheet, pSheet); // invalid m_nBackupContent m_nBackupContent=-1; UpdateData(TRUE); if( 0 == m_nBackupContent ) { g_EasyBackupInfo.nBackupContent = m_nBackupContent; return ( pSheet->SetActivePage(pSheet->GetPage(2)) ); } else if ( (1 == m_nBackupContent) || (2 == m_nBackupContent) ) { g_EasyBackupInfo.nBackupContent = m_nBackupContent; return CPropertyPage::OnWizardNext(); } else { TRACE(L"\nYou do not choose a number."); return -1; } // return CPropertyPage::OnWizardNext(); }
LRESULT CPageDesignerApp::OnSetTool(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { m_activeTool = wID; switch (wID) { case ID_TOOL_SELECT: case ID_TOOL_DIRECT: m_activeSelectionTool = wID; break; case ID_TOOL_TWIRL: case ID_TOOL_BULGE: { if (wNotifyCode == BN_DBLCLK) { CPropertySheet* sheet = new CPropertySheet("Tool", 0, GetMainHwnd()); CBrushDimensionsDlg brush; brush.m_brushSettings = this; sheet->AddPage(brush); sheet->DoModal(); } } break; } FireOnChanged(NOTIFY_MODIFY, GetUnknown(), DISPID_UNKNOWN); return 0; }
BOOL CDlgTeikei::OnInitDialog() { CPropertyPage::OnInitDialog(); // TODO: この位置に初期化の補足処理を追加してください if (m_nGroupNumber == 1) { // 無理矢理タブのタイトルを変更 CPropertySheet *poPropSheet = (CPropertySheet *)GetParent(); TC_ITEM tcItem; tcItem.mask = TCIF_TEXT; tcItem.pszText = (LPTSTR)((LPCTSTR)"グループ1"); poPropSheet->GetTabControl()->SetItem(0, &tcItem ); tcItem.pszText = (LPTSTR)((LPCTSTR)"グループ2"); poPropSheet->GetTabControl()->SetItem(1, &tcItem ); tcItem.pszText = (LPTSTR)((LPCTSTR)"グループ3"); poPropSheet->GetTabControl()->SetItem(2, &tcItem ); } m_strTeikei1 = m_teikeiInfo[0].strTeikei; m_strTeikei2 = m_teikeiInfo[1].strTeikei; m_strTeikei3 = m_teikeiInfo[2].strTeikei; m_strTeikei4 = m_teikeiInfo[3].strTeikei; m_strTeikei5 = m_teikeiInfo[4].strTeikei; m_strTeikei6 = m_teikeiInfo[5].strTeikei; m_strTeikei7 = m_teikeiInfo[6].strTeikei; m_strTeikei8 = m_teikeiInfo[7].strTeikei; m_strTeikei9 = m_teikeiInfo[8].strTeikei; m_strTeikei10 = m_teikeiInfo[9].strTeikei; UpdateData(FALSE); return TRUE; // コントロールにフォーカスを設定しないとき、戻り値は TRUE となります // 例外: OCX プロパティ ページの戻り値は FALSE となります }
BOOL CCompletionNew::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*)GetParent(); ASSERT_KINDOF(CPropertySheet, pSheet); pSheet->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT | PSWIZB_FINISH); return CResizablePageEx::OnSetActive(); }
BOOL CCWBkImgPage::OnSetActive() { CString s; switch (m_nBkImageType) { case Cover: s.LoadString (IDS_COVERBKIMAGE); break; case Back: s.LoadString (IDS_BACKBKIMAGE); break; case Label: s.LoadString (IDS_LABELBKIMAGE); break; case Inlay: s.LoadString (IDS_INLAYBKIMAGE); break; } GetParent ()->SetWindowText (s); if (m_pBackgroundInfo != NULL) if (!m_pBackgroundInfo->GetImageFilename ().IsEmpty ()) OnButtonPreview (); m_StaticTransparentCol.ShowWindow ((m_crTransparent == -1) ? SW_HIDE : SW_SHOW); m_StaticTransparentCol.SetStartColor (m_crTransparent); m_StaticTransparentCol.SetEndColor (m_crTransparent); CPropertySheet* pSheet = (CPropertySheet*) GetParent (); pSheet->SetWizardButtons (PSWIZB_NEXT | PSWIZB_BACK); return CPropertyPage::OnSetActive(); }
BOOL CGfxDriverUpdaterApp::InitInstance() { // InitCommonControlsEx() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinAppEx::InitInstance(); SetRegistryKey(_T("GraphicsDriverUpdater")); CPropertySheet dlg; CPage1 page1; dlg.AddPage(&page1); CPage2 page2; dlg.AddPage(&page2); dlg.SetWizardMode(); m_pMainWnd = &dlg; dlg.DoModal(); // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
BOOL CIwProgressPropertyPage::OnSetActive() { CPropertySheet* parent = (CPropertySheet*)GetParent(); parent->SetWizardButtons(PSWIZB_DISABLEDFINISH); return CPropertyPage::OnSetActive(); }
BOOL CInterior2::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*)GetParent(); ASSERT_KINDOF(CPropertySheet, pSheet); pSheet->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT); return CResizablePageEx::OnSetActive(); }
bool CSequence::DoProperties() { bool dirty = false; if (IsGLA()) { InfoBox("You can't edit the properties of a GLA file"); } else { CPropertySheet* propSheet = new CPropertySheet(m_name); CSequencePropPage* propPage = new CSequencePropPage(); propPage->m_sequence = this; propPage->m_soilFlag = &dirty; propSheet->AddPage(propPage); propSheet->DoModal(); delete propPage; delete propSheet; } return dirty; }
// @pymethod |PyCPropertySheet|RemovePage|Removes the specified page from the sheet. PyObject *ui_propsheet_remove_page( PyObject *self, PyObject *args ) { CPropertySheet *pPS; if (!(pPS=GetPropSheet(self))) return NULL; PyObject *ob; // @pyparm int|offset||The page number to remove // @pyparmalt1 <o PyCPropertyPage>|page||The page to remove if (!PyArg_ParseTuple( args, "O", &ob)) return NULL; if (PyInt_Check(ob)) { int id = (int)PyInt_AsLong(ob); GUI_BGN_SAVE; pPS->RemovePage(id); GUI_END_SAVE; } else if (ui_base_class::is_uiobject(ob, &PyCPropertyPage::type)) { CPythonPropertyPage * pPage = GetPropPage(ob); if (!pPage) return NULL; GUI_BGN_SAVE; pPS->RemovePage(pPage); GUI_END_SAVE; } else RETURN_TYPE_ERR("passed object must be an integer or PyCPropertyPage object"); RETURN_NONE; }
BOOL CGuide2::OnSetActive() { CPropertySheet * psheet = (CPropertySheet*) GetParent(); psheet->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT); // psheet->SetWizardButtons(PSWIZB_NEXT); return CPropertyPage::OnSetActive(); }
bool CModel::DoProperties() { bool dirty = false; { CPropertySheet* propSheet = new CPropertySheet(m_name); CModelPropPage* propPage = new CModelPropPage(); propPage->m_model = this; propPage->m_soilFlag = &dirty; propSheet->AddPage(propPage); propPage->SetRefGLAPath(GetRefGLAPath()); for (int i=0; i<PCJList_GetEntries(); i++) { propPage->AddPCJEntry(PCJList_GetEntry(i)); } propSheet->DoModal(); delete propPage; delete propSheet; } return dirty; }
BOOL CCWArrangePage::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*) GetParent (); pSheet->SetWizardButtons (PSWIZB_NEXT); return CPropertyPage::OnSetActive(); }
///////////////////////////////////////////////////////////////////////////// // CNewProjectEndPage message handlers BOOL CNewProjectEndPage::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*)GetParent(); ASSERT_KINDOF(CPropertySheet, pSheet); pSheet->SetWizardButtons(PSWIZB_FINISH); return CPropertyPageEx::OnSetActive(); }
// Inform users regarding the selections they have made by // navigating the pages in propertysheet. BOOL CShapePage::OnWizardFinish() { CString report = _T("You have selected the following options:\n"); // Get the number of property pages from CPropertySheet. CPropertySheet* sheet = (CPropertySheet*) GetParent(); int count = sheet->GetPageCount(); // Get the formatted string from each page. This formatted string // will be shown in a message box. Each page knows about the // string to be displayed. For simplicity, we derive a class // from CPropertyPage called CMyPropertyPage. CMyPropertyPage // has a pure virtual member function called GetPageSelections(). // All pages in the property sheet must be derived from // CMyPropertyPage so we loop through each page to get the // formatted string by calling the GetPageSelections() function. for (int i = 0; i < count; i++) { CMyPropertyPage* page = (CMyPropertyPage*) sheet->GetPage(i); CString str; page->GetPageSelections(str); report += _T("\n") + str; } AfxMessageBox(report); return CPropertyPage::OnWizardFinish(); }
void CXTPSyntaxEditPropertiesPageColor::OnDblClickSchema() { int iIndex = m_lboxName.GetCurSel(); if (iIndex == LB_ERR) return; XTP_EDIT_SCHEMAFILEINFO* pSchemaInfo = (XTP_EDIT_SCHEMAFILEINFO*)m_lboxName.GetItemData(iIndex); if (pSchemaInfo == NULL) return; if (!FILEEXISTS_S(pSchemaInfo->csValue)) return; TCHAR szDrive[_MAX_DRIVE], szDir[_MAX_DIR], szFileName[_MAX_FNAME], szEx[_MAX_EXT]; SPLITPATH_S(pSchemaInfo->csValue, szDrive, szDir, szFileName, szEx); CString csBuffer; XTPResourceManager()->LoadString( &csBuffer, XTP_IDS_EDIT_OPENSCHEMAMSG); CString csMessage; csMessage.Format(csBuffer, szFileName, szEx); if (AfxMessageBox(csMessage, MB_ICONQUESTION | MB_YESNO) == IDYES) { // close the options dialog. CPropertySheet* pWndParent = DYNAMIC_DOWNCAST(CPropertySheet, GetParent()); if (pWndParent) pWndParent->EndDialog(IDCANCEL); // open the document. CWinApp* pWinApp = AfxGetApp(); if (pWinApp) pWinApp->OpenDocumentFile(pSchemaInfo->csValue); } }
void CXTPSyntaxEditPropertiesPageColor::UpdateFont() { CPropertySheet* pParentDlg = DYNAMIC_DOWNCAST( CPropertySheet, GetParent()); if (!pParentDlg) return; CXTPSyntaxEditPropertiesPageFont* pPage2 = DYNAMIC_DOWNCAST( CXTPSyntaxEditPropertiesPageFont, pParentDlg->GetPage(1)); if (!pPage2) return; LOGFONT lf = {0}; if (!pPage2->GetSafeLogFont(lf)) return; lf.lfStrikeOut = 0; lf.lfItalic = (BYTE)m_bItalic; lf.lfUnderline = (BYTE)m_bUnderline; lf.lfWeight = m_bBold? FW_BOLD: FW_NORMAL; if (pPage2->CreateSafeFontIndirect(m_editFont, lf)) { m_txtSample.SetFont(&m_editFont); m_txtSampleSel.SetFont(&m_editFont); } }
BOOL CLicenseDlg::OnSetActive() { if (!CheckWindowsVersion()) { CPropertyPage::EndDialog(IDCANCEL); } CPropertySheet* pSheet = (CPropertySheet*)GetParent(); ASSERT_KINDOF(CPropertySheet, pSheet); if (m_FirstTime) { m_FirstTime = FALSE; // Disable everything until the user scrolls the license text CButton *radio_all = (CButton *) GetDlgItem(IDC_DISAGREE); radio_all->SetCheck(1); CButton *understand = (CButton *) GetDlgItem(IDC_UNDERSTAND); understand->SetCheck(BST_UNCHECKED); OnUnderstand(); understand->EnableWindow(FALSE); pSheet->SetWizardButtons(0); UpdateData(FALSE); // write to screen } else { pSheet->SetWizardButtons(PSWIZB_NEXT); } return CPropertyPage::OnSetActive(); }
BOOL CInfomationPage::OnSetActive() { // TODO: Add your specialized code here and/or call the base class CPropertySheet* pSheet = (CPropertySheet*) GetParent(); pSheet->SetWizardButtons(PSWIZB_NEXT); return CPropertyPage::OnSetActive(); }
BOOL CSTWTrackFontsPage::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*) GetParent (); pSheet->SetWizardButtons (PSWIZB_NEXT | PSWIZB_BACK); CStyleTemplate* pTmp = ((CStyleTemplateWizard*) GetParent ())->m_pTemplate; if (pTmp != NULL) { m_TrackNumFont.SetPreviewFont (pTmp->GetTrackNumFont ()); m_TrackNumFont.SetColor (pTmp->GetTrackNumColor ()); m_TrackLengthFont.SetPreviewFont (pTmp->GetTrackLengthFont ()); m_TrackLengthFont.SetColor (pTmp->GetTrackLengthColor ()); m_TrackTitleFont.SetPreviewFont (pTmp->GetTrackTitleFont ()); m_TrackTitleFont.SetColor (pTmp->GetTrackTitleColor ()); m_TrackRemarksFont.SetPreviewFont (pTmp->GetTrackRemarksFont ()); m_TrackRemarksFont.SetColor (pTmp->GetTrackRemarksColor ()); m_TrackGroupingTitleFont.SetPreviewFont (pTmp->GetTrackGroupingTitleFont ()); m_TrackGroupingTitleFont.SetColor (pTmp->GetTrackGroupingTitleColor ()); m_TrackGroupingRemarksFont.SetPreviewFont (pTmp->GetTrackGroupingRemarksFont ()); m_TrackGroupingRemarksFont.SetColor (pTmp->GetTrackGroupingRemarksColor ()); } ((CStyleTemplateWizard*) GetParent ())->m_wndPreview.InvalidateRect (NULL); return CPropertyPage::OnSetActive(); }
BOOL CCWFormatPage::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*) GetParent (); pSheet->SetWizardButtons (PSWIZB_FINISH | PSWIZB_BACK); return CPropertyPage::OnSetActive(); }
// CShapePage is the last wizard property page. Enable the Back // button and change the Next button to Finish. The "Finish" button // will have "Done" as its caption. BOOL CShapePage::OnSetActive() { CPropertySheet* psheet = (CPropertySheet*) GetParent(); psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH); psheet->SetFinishText(_T("Done")); return CPropertyPage::OnSetActive(); }
BOOL CMergeWizardOptions::OnSetActive() { CPropertySheet* psheet = (CPropertySheet*) GetParent(); psheet->SetWizardButtons(PSWIZB_BACK|PSWIZB_FINISH); SetButtonTexts(); GetDlgItem(IDC_RECORDONLY)->EnableWindow(((CMergeWizard*)GetParent())->nRevRangeMerge != MERGEWIZARD_REINTEGRATE); return CMergeWizardBasePage::OnSetActive(); }
BOOL CMergeWizardRevRange::OnSetActive() { CPropertySheet* psheet = (CPropertySheet*) GetParent(); psheet->SetWizardButtons(PSWIZB_NEXT|PSWIZB_BACK); SetButtonTexts(); return CMergeWizardBasePage::OnSetActive(); }
BOOL DrvDeletePage::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*)GetParent(); ASSERT_KINDOF(CPropertySheet, pSheet); pSheet->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT); return CPropertyPageEx::OnSetActive(); }
LRESULT DrvDeletePage::OnWizardBack() { CPropertySheet* pSheet = (CPropertySheet*)GetParent(); ASSERT_KINDOF(CPropertySheet, pSheet); pSheet->SetActivePage(1); return CPropertyPage::OnWizardBack(); }
void CMainFrame::OnEditDensScales () { CDensProp pageDens; CPropertySheet sheetPref (theApp.LoadString (IDS_PREFERENCES)); sheetPref.AddPage (&pageDens); sheetPref.m_psh.dwFlags |= PSH_NOAPPLYNOW; sheetPref.DoModal (); }
BOOL CCopyDlg::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*)GetParent(); ASSERT_KINDOF(CPropertySheet, pSheet); // our installer doesn't support Back! // pSheet->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT); pSheet->SetWizardButtons( PSWIZB_NEXT); return CPropertyPage::OnSetActive(); }
BOOL CDataTypePage::OnSetActive() { CPropertySheet* pSheet = (CPropertySheet*)GetParent (); ASSERT_VALID (pSheet); pSheet->SetWizardButtons (PSWIZB_NEXT); return CPropertyPage::OnSetActive(); }