CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Wizards

  1. #1

    Wizards

    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


  2. #2
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    Re: Wizards

    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


  3. #3
    Guest

    Re: Wizards

    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:oModal();


    in DoModal function of the wizard


  4. #4
    Join Date
    Sep 1999
    Location
    Santa Clara, California
    Posts
    145

    Re: Wizards

    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



  5. #5
    Join Date
    Jun 1999
    Location
    Miami, FL
    Posts
    972

    Re: Wizards

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured