question

GeorgeYaroshevsky-9865 avatar image
0 Votes"
GeorgeYaroshevsky-9865 asked GeorgeYaroshevsky-9865 answered

CMFCPropertySheet progrmmaticaly close

If some processing in CMFCPropertySheet throws an exception, how to close the app from the catch block?
PropSheet has one button, Cancel, and OnCommand handler.

c++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DavidLowndes-6766 avatar image
0 Votes"
DavidLowndes-6766 answered DavidLowndes-6766 edited

If you want to close the property sheet, try using CPropertySheet::PressButton with PSBTN_CANCEL


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

GeorgeYaroshevsky-9865 avatar image
0 Votes"
GeorgeYaroshevsky-9865 answered

I tried, it does not work, i closes OnInitDialog and ores next default Property Page.

What works is SendMessage or PostMessage WM_CLOSE.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.