Click to See Complete Forum and Search --> : Wizards
JoeGuru
August 19th, 1999, 01:16 PM
I'm writting a wizard for an installer program. When I display the software license agreement, how can I change the next/cancel buttons to yes/no? Or accept/decline?
Also, I used devstudio project addon (or something like that) wizard to add a wizard to my code. Now, when I compile it, it displays the Help button too. How can I hide that?
Thanks: Joe :)
Burlacu Ovidiu
August 20th, 1999, 01:37 AM
To change the text try this:
CWnd* pWndButton = GetDlgItem( ID_WIZBACK );
pWndButton->SetWindowText("No");
pWndButton = GetDlgItem( ID_WIZNEXT );
pWndButton->SetWindowText("Yes");
To hide Help button do this:
CWnd* pWndButton = GetDlgItem( IDHELP );
pWndButton->ShowWindow( SW_HIDE );
Let me know if this help u
Regards,
Ovidiu
August 20th, 1999, 10:08 AM
in case you hide help button ( pHelp->ShowWindow( SW_HIDE)) the button is hidden but the next/back buttons are on their previous locations - i.e. help button is in right corner of the wizard and when you hide it the space remain empty.
To solve this i use :
int num = GetPageCount();
for ( int i = 0; i < num; i++)
{
CPropertyPage * pPage = GetPage( i);
pPage->m_psp.dwFlags &= ~PSP_HASHELP;
}
m_psh.dwFlags &= ~PSH_HASHELP;
return CPropertySheet::DoModal();
in DoModal function of the wizard
Kelly
December 1st, 1999, 04:08 PM
out of appreciation, I respond.. anyone else interested in hiding the HELP button(s) on a wizard should check this out. worked great for me.
Thanks,
--Kelly
ALM
December 1st, 1999, 04:26 PM
One easy way to eliminate the Help button is to open your project's main CPP file and then comment or remove the line that says:
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
Cheers!
Alvaro
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.