From: JY on
Hi,

I have a Wizard application created from CPropertySheet. In the Wizard
property sheet, I override the OnClose() handler (and have ON_WM_CLOSE() in
the message map) but the handler does not get called. I want it to be called
when the user either cancels the wizard or closes it with the (x) button.
Not sure what could be going wrong.

TIA,
JY
From: John H. on
JY wrote:
> I have a Wizard application created from CPropertySheet. In the Wizard
> property sheet, I override the OnClose() handler (and have ON_WM_CLOSE() in
> the message map) but the handler does not get called. I want it to be called
> when the user either cancels the wizard or closes it with the (x) button.

I am not so sure that the WM_CLOSE is sent for that particular
scenario. You might be able to do what you want by overriding
OnCancel (at a property page level) or OnDestroy (at the property
sheet level).