Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have used property sheet concept and display 3 dialog box on the property sheet.

Now to access the each dialog i have to clicked on the tab of each dialog.

But my need is that i want to minimize the first dialog and show the second dialog without using tab. for that i have added one button using that button i minimized the first dialog but when i tried to call the second dialog i get assertion failed error. i have done like this...

In the 1st dialog (.cpp) file

void ClstdemoDlg::OnBnClickedMinimize()
{
// TODO: Add your control notification handler code here

ClstdemoDlg_1 dlg; // created 2nd dialog variable.



this->ShowWindow(SW_MINIMIZE); // minimize the 1st dialog

dlg.ShowWindow(SW_SHOW); //Tried to show 2nd dialog but Here get Assertion failed Error

}


Please let me know how to do this?

Thanks...
Posted

1 solution

Shouldn't you be using the Wizard Mode?

Take a look at http://msdn.microsoft.com/en-us/library/1sse9730.aspx[^].
And to http://msdn.microsoft.com/en-us/library/ex7e7b4s.aspx[^].

With this you should be able to go from one dialog to the other one using buttons and you should not add any home-made code to get it done.

I hope this will help. :thumbsup:

New links to extend the information:
CResizableSheet and CResizablePage[^]
Simple wizard property sheet class[^]
Hacking the CPropertySheet[^]
http://www.codeproject.com/KB/tabs/[^]

I hope any of those links will help you...
 
Share this answer
 
v2
Comments
Member 10474623 7-Feb-14 4:03am    
Hello sir,

Thanks for your guidance.But i think you can't get my requirement. i want to minimize the first page and open the second page without pressing the tab of the second page.means it should open the second page while minimizing the first page.
Joan M 7-Feb-14 4:12am    
And that is what this will do: you are adding a button right?
If you use the Wizard mode the button will automatically be there, each time you press the button the page will go forward or backwards... let's say you are in page #1 and you press NEXT, then page #1 disappears and page #2 appears like if you would have pressed the tab #2... you can adapt the NEXT, PREVIOUS, CANCEL, APPLY buttons to your needs: showing/hiding them, and handling the event in a specialized way you would like to...
I think this can definitely help you... see new links in the answer...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900