CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Location
    Munich, Germany
    Posts
    8

    Print Preview Close Button

    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


  2. #2

    Re: Print Preview Close Button

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured