Share via

CMFCPropertySheet progrmmaticaly close

George Yaroshevsky 1 Reputation point
2021-08-20T18:11:49.483+00:00

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.

Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

0 comments No comments

2 answers

Sort by: Most helpful
  1. George Yaroshevsky 1 Reputation point
    2021-08-20T21:58:46.407+00:00

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

    What works is SendMessage or PostMessage WM_CLOSE.

    Was this answer helpful?

    0 comments No comments

  2. David Lowndes 4,731 Reputation points
    2021-08-20T20:12:36.187+00:00

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

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.