Advertisement

A problem on Wizard-type dialog ...

Started by May 07, 2001 02:40 AM
0 comments, last by zhang_zhou 23 years, 9 months ago
Hi,all... Now,I''m creating a Wizard-type dialog with the CPropertySheet and CPropertyPage in MFC,and can anyone help me out from the following problem? In my Wizard-type dialog,when the user click "Next" into a special step,he/she cannot click "Next","Back" and "Cancel" to change the current page or close the dialog before a specific operation completed,so I will disable these 3 buttons at this time...but then,a so hated thing was appeared - the close button on the right uppear of the dialog(shown as a "X") still can use though I have disabled the "Cancel" button! So,can you tell me a way to Disable or Hide the close button on the right uppear of the dialog? Advanced thanks for any help!
============================= Hey,I just wanna know WHY! =============================
quote:
Original post by zhang_zhou
In my Wizard-type dialog,when the user click "Next" into a special step,he/she cannot click "Next","Back" and "Cancel" to change the current page or close the dialog before a specific operation completed,so I will disable these 3 buttons at this time...but then,a so hated thing was appeared - the close button on the right uppear of the dialog(shown as a "X") still can use though I have disabled the "Cancel" button!

So,can you tell me a way to Disable or Hide the close button on the right uppear of the dialog?



I''m not sure about removing the close button, but this may help:

As I understand it, you have to explicitly handle the ''close window'' gadget, allthough there may be a default of ''hide the window'' - this suggests that you need to listen for the ''close window'' event, and respond appropriately. If you''ve disabled ''cancel'' that code could make an appropriate beep, to indicate that it''s not an option at that time.

(My personal preference - not windows specific - has always been to make the ''close window'' and ''cancel'' buttons call the same function, which will of course close the window. Then you can disable the cancel button, but because the user''s intention (ie: to stop whatever was being done) can be communicated in several ways, the code checks if that is allowed before proceeding.)

I would like to say that it had better be a very special step if there''s no way to cancel it - I''ve never liked programs that demand I do something, and refuse to listen if I decide I really don''t want to - even more so if I didn''t know that I was going to get trapped.

This topic is closed to new replies.

Advertisement