http://technet.microsoft.com/zh-cn/subscriptions/a59dff1e(v=vs.71).aspx CView::OnPreparePrinting Called by the framework before a document is printed or previewed. virtual BOOL OnPreparePrinting( CPrintInfo* pInfo ); Parameters pInfo Points to a CPri…
(1) 在CYournameView(就是你的视图类,以下以CDrawLineView为例)添加了一个背景颜色变量 COLORREF m_bgcolor; (2)修改这个函数: BOOL CDrawLineView::PreCreateWindow(CREATESTRUCT& cs){// TODO: Modify the Window class or styles here by modifying// the CREATESTRUCT cs cs.lpszClass=AfxRegis…
附件下载:http://files.cnblogs.com/mengdejun/print.zip void CPrintView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) { // TODO: Add your specialized code here and/or call the base class //设置打印环境坐标转换 pDC->SetMapMode(MM_ANISOTROPIC); int screenwidth_real=GetSys…