Click here to Skip to main content
16,012,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIs D: the CD-ROM? Pin
Rickard Andersson204-Jun-02 4:01
Rickard Andersson204-Jun-02 4:01 
AnswerRe: Is D: the CD-ROM? Pin
Mazdak4-Jun-02 4:07
Mazdak4-Jun-02 4:07 
GeneralRe: Is D: the CD-ROM? Pin
Jason Henderson4-Jun-02 4:41
Jason Henderson4-Jun-02 4:41 
GeneralRe: Is D: the CD-ROM? Pin
Mazdak4-Jun-02 5:00
Mazdak4-Jun-02 5:00 
GeneralRe: Is D: the CD-ROM? Pin
Rickard Andersson204-Jun-02 5:59
Rickard Andersson204-Jun-02 5:59 
AnswerRe: Is D: the CD-ROM? Pin
Alexandru Savescu4-Jun-02 6:18
Alexandru Savescu4-Jun-02 6:18 
Generallinked Multi dialog based MFC app Pin
edman4-Jun-02 3:45
edman4-Jun-02 3:45 
GeneralRe: linked Multi dialog based MFC app Pin
dazinith4-Jun-02 5:36
dazinith4-Jun-02 5:36 
you want to look at CPropertySheet and CPropertyPage..
basicly you use the resource editor to create dialogs, but instead of creating dialogs you create Property Pages (set to child instead of popup).. you create these for each of the pages you need.

then to put it all together you do:
CPropertySheet MySheet("This is my installer");
CMyPage1 page1;
CMyPage2 page2;
...
CMyPageN pageN;

MySheet.AddPage(&page1);
MySheet.AddPage(&page2);
...
MySheet.AddPage(&pageN);

MySheet.SetWizardMode();
MySheet.m_psh.dwFlags |= PSH_NOAPPLYNOW; // disables the 'apply' button
// display the form and wait for the finish button
if (MySheet.DoModal() == ID_WIZFINISH)
{ AfxMessageBox("woop!"); }


the CMyPage1,2,3 are the classes you created from your dialogs(proppages)

in your first page you need
BOOL CMyPage1::OnSetActive() 
{
   CPropertySheet* psheet = (CPropertySheet*) GetParent();   
   psheet->SetWizardButtons(PSWIZB_NEXT); // only have a next button on first page
   return CPropertyPage::OnSetActive();
}
in your middle pages you need
BOOL CMyPage2::OnSetActive() 
{
	CPropertySheet* psheet = (CPropertySheet*) GetParent();   
	psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); // have next and back on middle pages
	return CPropertyPage::OnSetActive();
}
in your last page you need
BOOL CMyPageN::OnSetActive() 
{
	CPropertySheet* psheet = (CPropertySheet*) GetParent();   
	psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH); // have back and finish on last page
	return CPropertyPage::OnSetActive();
}


theres enough code to get you started.. if you can't get there from this then you prolly need to read a book or somethin.. there are examples on this stuff in the articles on here..

-dz
GeneralWM_GETTEXT Pin
vikramlinux4-Jun-02 3:44
vikramlinux4-Jun-02 3:44 
GeneralRe: WM_GETTEXT Pin
Tomasz Sowinski4-Jun-02 3:49
Tomasz Sowinski4-Jun-02 3:49 
GeneralRe: WM_GETTEXT Pin
vikramlinux4-Jun-02 3:51
vikramlinux4-Jun-02 3:51 
GeneralRe: WM_GETTEXT Pin
Tomasz Sowinski4-Jun-02 3:57
Tomasz Sowinski4-Jun-02 3:57 
GeneralRe: WM_GETTEXT Pin
vikramlinux4-Jun-02 3:56
vikramlinux4-Jun-02 3:56 
GeneralRe: WM_GETTEXT Pin
User 66584-Jun-02 4:17
User 66584-Jun-02 4:17 
GeneralRe: WM_GETTEXT Pin
Tomasz Sowinski4-Jun-02 5:05
Tomasz Sowinski4-Jun-02 5:05 
GeneralRe: WM_GETTEXT Pin
vikramlinux4-Jun-02 18:15
vikramlinux4-Jun-02 18:15 
Generaledit box - with popup Pin
jimNLX4-Jun-02 3:36
jimNLX4-Jun-02 3:36 
GeneralRe: edit box - with popup Pin
Tomasz Sowinski4-Jun-02 3:44
Tomasz Sowinski4-Jun-02 3:44 
GeneralRe: edit box - with popup Pin
jimNLX4-Jun-02 4:37
jimNLX4-Jun-02 4:37 
GeneralRe: edit box - with popup Pin
dazinith4-Jun-02 5:42
dazinith4-Jun-02 5:42 
QuestionHow create a invisible modal dialog box ? Pin
Cris4-Jun-02 3:25
Cris4-Jun-02 3:25 
AnswerRe: How create a invisible modal dialog box ? Pin
Tomasz Sowinski4-Jun-02 3:40
Tomasz Sowinski4-Jun-02 3:40 
GeneralRe: How create a invisible modal dialog box ? Pin
Cris4-Jun-02 3:48
Cris4-Jun-02 3:48 
AnswerRe: How create a invisible modal dialog box ? Pin
Mazdak4-Jun-02 3:47
Mazdak4-Jun-02 3:47 
AnswerRe: How create a invisible modal dialog box ? Pin
Mazdak4-Jun-02 3:52
Mazdak4-Jun-02 3:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.