Closing SDI application
-
What code should I put in a handler for CButton in order to close SDI application? I tried with
PostMessage(WM_QUIT)
, butCDocument::OnCloseDocument()
doesn't get called in this case. CButton is created in a CFormView class.Don't use
WM_QUIT
, that makes the main message loop exit immediately.AfxGetMainWnd()-> PostMessage ( WM_CLOSE );
--Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- "Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer." -- Michael P. Butler in the Lounge
-
Don't use
WM_QUIT
, that makes the main message loop exit immediately.AfxGetMainWnd()-> PostMessage ( WM_CLOSE );
--Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- "Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer." -- Michael P. Butler in the Lounge