Compartilhar via


CPropertySheet::SetWizardButtons

Ativa ou desativa o botão Voltar, Avançar ou concluir em uma folha de propriedades do assistente.

void SetWizardButtons(
   DWORD dwFlags 
);

Parâmetros

  • dwFlags
    Um conjunto de sinalizadores de personalizar a função e a aparência dos botões do assistente.Este parâmetro pode ser uma combinação dos seguintes valores:

    • PSWIZB_BACK   Botão Voltar

    • PSWIZB_NEXT   Botão próximo

    • PSWIZB_ Concluir Concluir botão

    • PSWIZB_DISABLEDFINISH   Botão Finalizar desabilitado

Comentários

De telefonarSetWizardButtons somente depois que a caixa de diálogo for aberta; não é possível chamar SetWizardButtons antes de chamar DoModal.Typitelefonary, você deve telefonar SetWizardButtons de CPropertyPage::OnSetActive.

Se você desejar alterar o texto no botão Concluir ou ocultar os botões Avançar e voltar depois que o usuário concluir o assistente, telefonar SetFinishText.Observe que o mesmo botão está compartilhado para concluir e em Avançar.Você pode exibir um Concluir ou um botão próximo ao mesmo time, mas não ambos.

Exemplo

A CPropertySheet tem três páginas de propriedade do assistente: CStylePage, CColorPage, e CShapePage. O fragmento de código a seguir mostra como habilitar e desabilitar o Fazer backup and Próximo botões na página de propriedades do assistente.

// 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

Cabeçalho: afxdlgs.h

Consulte também

Referência

Classe CPropertySheet

Gráfico de hierarquia

Outros recursos

CPropertySheet membros