示例#1
0
BOOL CWizGeneralPage::OnSetActive()
{
    CPropertySheetEx* pSheet = (CPropertySheetEx*)GetParent();
    ASSERT_KINDOF(CPropertySheetEx, pSheet);
    pSheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);

    return CNGWizardPage::OnSetActive();
}
示例#2
0
BOOL CSetRate::OnSetActive() 
{
	// TODO: Add your specialized code here and/or call the base class
	CPropertySheetEx * pSheet = DYNAMIC_DOWNCAST( CPropertySheetEx, GetParent()	);
	if( pSheet )
	{
		pSheet->SetWizardButtons( m_dwButtonFlags );
	}
	
	return CPropertyPageEx::OnSetActive();
}
示例#3
0
BOOL CDlgPageWizard::OnSetActive() 
{
	CPropertySheetEx* pSheet = (CPropertySheetEx*)GetParent();
	if (pSheet->IsWizard())
	{
		int iPages = pSheet->GetPageCount();
		int iActPage = pSheet->GetActiveIndex();
		DWORD dwButtons = 0;
		if (iActPage > 0)
			dwButtons |= PSWIZB_BACK;
		if (iActPage < iPages)
			dwButtons |= PSWIZB_NEXT;
		if (iActPage == iPages-1)
		{
			if (pSheet->m_psh.dwFlags & PSH_WIZARDHASFINISH)
				dwButtons &= ~PSWIZB_NEXT;
			dwButtons |= PSWIZB_FINISH;
		}
		pSheet->SetWizardButtons(dwButtons);
	}
	return CPropertyPageEx::OnSetActive();
}
BOOL CInstallPacDlg::OnSetActive() 
{
	CPropertySheetEx * pSheet = DYNAMIC_DOWNCAST( CPropertySheetEx, GetParent()	);
	if( pSheet )
	{
		CString	strFinish, strClose;
		strFinish.LoadString( IDS_FINISHBUTTON );
		strClose.LoadString( IDS_CLOSEBUTTON );

		CWnd * pWnd = pSheet->GetDlgItem( IDOK );
		if( pWnd && ::IsWindow( pWnd->GetSafeHwnd() ) )
		{
			pWnd->SetWindowText( strFinish );
			pWnd->EnableWindow( FALSE );
		}

		pWnd = pSheet->GetDlgItem( IDCANCEL );
		if( pWnd && ::IsWindow( pWnd->GetSafeHwnd() ) )
			pWnd->SetWindowText( strClose );
	}
	
	return CPropertyPageEx::OnSetActive();
}