views:

287

answers:

1

Hey guys..I am designing a set-up wizard using CPropertySheet and CpropertyPage in MFC application...I have completed the design but the thing is..In normal CProperty Sheet there are four default buttons "BACK NEXT FINISH HELP"...but I want only NEXT and FINISH buttons ...I used the following code to do that but its giving me a run time error.stating.."stack overflow" I am not sure where exactly to include this code(i mean in which class)..nor how to utilize this function.. can any one help me..

BOOL CExtractorFinalUIDlg::OnSetActive() { CSelfExtractor setButtons = (CSelfExtractor)GetParent(); setButtons->SetWizardButtons(PSWIZB_NEXT | PSWIZB_FINISH | PSWIZB_CANCEL);

return CExtractorFinalUIDlg::OnSetActive();

}

A: 

In the constructor of your propertysheet, insert

m_psh.dwFlags |= PSH_NOAPPLYNOW;

The m_psh is of type PROPSHEETHEADER, you can set a lot of things.

dwo