How to hide a modal dialogbox in MFC application?
I have a hard time hiding a modal dialog box. What I am doing is - I am trying to design a UI for my own application in MFC, kind of a setup assistant.
In the 1st dialog box I have NEXT
button, so when I click that it has to hide the 1st dialog box and move on to the 2nd dialog box, where I have some contro开发者_Go百科ls in 2nd dialog box.
How can I achieve that?
I have never tried to hide a Modal dialog...not sure how it can be done.
Anyway, it seems to me you don't need to hide the dialog but destroy the first one and create the second one. You can use EndDialog to terminate a modal dialog.
But MFC has its own mechanism to create your own wizard, have a look at this class CPropertySheet. I am sure you can find thousand of examples, this is one.
Hope it helps.
You can use ShowWindow()
function to hide modal
Its default patametet is SW_SHOW
which is equal true value 1 and
To hide modal use SW_HIDE
value when you click next button
You just use ShowWindow(SW_HIDE)
If you make prev button you should use modal pointer
Or next modal should child modal because you cannot have prev modal variable.
I wish you understand me for my english
精彩评论