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
Printable View
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
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