コード例 #1
0
// 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();
}
コード例 #2
0
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);
	}
}
コード例 #3
0
ファイル: EasyPage1.cpp プロジェクト: xfxf123444/japan
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();
}
コード例 #4
0
BOOL CPageAffixes::OnSetActive()
{
	// turn off the "back" button if we're the first page
	CPropertySheet* p = (CPropertySheet*)GetParent();
	if(p->GetPage(0) == this)
		p->SetWizardButtons(PSWIZB_NEXT );//|PSWIZB_FINISH);
	else
		p->SetWizardButtons(PSWIZB_NEXT | PSWIZB_BACK);



	return CPropertyPage::OnSetActive();
}