CPropertySheet::SetWizardButtons
Habilita o deshabilita el botón de reserva, el Siguiente, o end en una hoja de propiedades del asistente.
void SetWizardButtons(
DWORD dwFlags
);
Parámetros
dwFlags
Un conjunto de indicadores que personalizan la función y el aspecto de los botones del asistente. Este parámetro puede ser una combinación de los siguientes valores:Botón de reserva dePSWIZB_BACK
Botón siguiente dePSWIZB_NEXT
Botón de final dePSWIZB_FINISH
Botón end disabled dePSWIZB_DISABLEDFINISH
Comentarios
La llamada SetWizardButtons sólo después del diálogo está abierto; no puede llamar a SetWizardButtons antes de llamar a DoModal. Normalmente, se debe llamar a SetWizardButtons de CPropertyPage:: OnSetActive.
Si desea cambiar el texto del botón end u ocultar los botones Siguiente y vuelve al usuario ha completado una vez el asistente, llame a SetFinishText. Observe que el mismo botón está compartido para el final y el Siguiente. Puede mostrar un final o un botón siguiente al mismo tiempo, pero no ambos.
Ejemplo
CPropertySheet tiene tres páginas de propiedades del asistente: CStylePage, CColorPage, y CShapePage. El fragmento de código siguiente muestra cómo habilitar y deshabilitar los botones de Atrás y de Siguiente en la página de propiedades del asistente.
// CStylePage is the first wizard property page. Disable the Back
// button but enable the Next button.
BOOL CStylePage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_NEXT);
return CPropertyPage::OnSetActive();
}
// CColorPage is the second wizard property page. Enable both the
// Back button and the Next button.
BOOL CColorPage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
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();
}
Requisitos
encabezado: afxdlgs.h