CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Printer Orientation

    Can anybody tell me how to change the printer orientation (landscape to portrait ) half way through a print job? ie the first page landscape and the
    second page portrain.

    I am using the MFC printing architecture.


  2. #2

    Re: Printer Orientation

    I've done this in OnPrepareDC( ), and it works fine. Try it at the point that you want to make the change, and let us know if it works...

    // Force landscape mode on.
    if (pDC && pDC->IsPrinting()) {
    LPDEVMODE pDM = pInfo->m_pPD->GetDevMode();
    ASSERT_POINTER(pDM, LPDEVMODE);

    if (pDM) {
    pDM->dmOrientation = DMORIENT_LANDSCAPE;
    pDC->ResetDC(pDM);
    }
    }



    <HR>LA Leonard - <A HREF="http://www.DefinitiveSolutions.com/">Definitive Solutions, Inc.</A>

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