Hide the back button on the initial wizard screen.
[people/sha0/mDNSResponder.git] / Clients / PrinterSetupWizard / SecondPage.cpp
index cfaa7bf..0499b5b 100644 (file)
@@ -131,6 +131,7 @@ CSecondPage::OnSetActive()
 {
        CPrinterSetupWizardSheet        *       psheet;
        Printer                                         *       printer;
+       CWnd                                            *       pWnd;
        Printers::iterator                              it;
        OSStatus                                                err = kNoErr;
        BOOL                                                    b;
@@ -172,6 +173,13 @@ CSecondPage::OnSetActive()
                ::SetFocus( m_browseList );
        }
 
+       // Hide the back button
+       pWnd = ((CPropertySheet*)GetParent())->GetDlgItem(ID_WIZBACK);\r
+       if ( pWnd != NULL )\r
+       {\r
+               pWnd->ShowWindow(SW_HIDE);\r
+       }
+
 exit:
 
        return b;
@@ -181,13 +189,21 @@ exit:
 BOOL
 CSecondPage::OnKillActive()
 {
-       CPrinterSetupWizardSheet * psheet;
+       CPrinterSetupWizardSheet        * psheet;
+       CWnd                                            * pWnd;
 
        psheet = reinterpret_cast<CPrinterSetupWizardSheet*>(GetParent());
        require_quiet( psheet, exit );   
    
        psheet->SetLastPage(this);
 
+       // Show the back button
+       pWnd = ((CPropertySheet*)GetParent())->GetDlgItem(ID_WIZBACK);\r
+       if ( pWnd != NULL )\r
+       {\r
+               pWnd->ShowWindow(SW_SHOW);\r
+       }
+
 exit:
 
        return CPropertyPage::OnKillActive();