CMFCPropertySheet progrmmaticaly close

George Yaroshevsky 1 Reputation point

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.

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.
3,560 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. David Lowndes 4,711 Reputation points

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

    0 comments No comments

  2. George Yaroshevsky 1 Reputation point

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

    What works is SendMessage or PostMessage WM_CLOSE.

    0 comments No comments