Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - print with v 9.81
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

print with v 9.81

 Post Reply Post Reply
Author
Message
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Topic: print with v 9.81
    Posted: 08 January 2007 at 6:08pm
Hello,

I am attempting to print a calendar view using version 9.81. In the print preview and printer device contexts the image renders perfectly, but is the size of a postage stamp.  This is the code I'm using to print in the "OnDraw(CDC *pDC)" function:

    if ( pDC->IsPrinting() )
    {
        ((CMainFrame*)AfxGetMainWnd())->HideMDITabs();
        m_wndCalendar.GetActiveView()->Draw(pDC);
    }

The output appears to be scaled to the CRect returned by GetClientRect(&r) instead of the CRect returned by pDC->GetClipBox(&r).

I know this must be something glaringly simple that I'm overlooking, but if anyone has any ideas feel free to point me in the right direction.

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2007 at 4:05pm
Hi,

This is not a really good way for print.
 
Since version 10 Toolkit has its own view class CXTPCalendarControlView, which implements printing features, and some helper classes like print options (page header, page footer, calendar date header like in outlook).

I would suggest you upgrading to the latest version.

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.