Click to See Complete Forum and Search --> : Print Preview Close Button


Stephan
April 29th, 1999, 11:24 AM
Good Morning

I want to close my app as soon as the user presses the CLOSE Button on the print Preview screen.

How do I achieve this?

Any Suggestions would be appreciated.

Stephan

LALeonard
April 29th, 1999, 05:05 PM
Use the ClassWizard to handle the ID_FILE_PRINT_PREVIEW message from your menu/toolbar item. Then, in your handler, do this:

// Respond to the menu item.
void CMyView::OnFilePrintPreview()
{
CFormView::OnFilePrintPreview();
AfxGetMainWnd()->PostMessage(WM_CLOSE);
}

HTH.

LA Leonard - http://www.DefinitiveSolutions.com