,(int)(ratey*50));
pDC->DrawText(merchandise[i][y],itemrect,DT_LEFT);
}
temprect.DeflateRect(width,0,0,0);
temprect.InflateRect(0,0,width,0);
}
pDC->EndDoc();
}
titlefont.DeleteObject();
bodyfont.DeleteObject();
}
HBRUSH CDialogPrintDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
CBrush m_brush (RGB(255,255,255));
CRect m_rect;
GetClientRect(m_rect);
pDC->FillRect(m_rect,&m_brush);
// TODO: Return a different brush if the default is not desired
return m_brush;
}
void CDialogPrintDlg::OnButprint()
{
// TODO: Add your control notification handler code here
CPrintDialog m_printdlg(false);
if (m_printdlg.DoModal()==IDOK)
{
CDC dc1;
dc1.Attach(m_printdlg.GetPrinterDC());
int leftmargin;
leftmargin = dc1.GetDeviceCaps(PHYSICALOFFSETX);
CRect m_rect(-leftmargin,0,dc1.GetDeviceCaps(PHYSICALWIDTH)-leftmargin,dc1.GetDeviceCaps(PHYSICALHEIGHT)) ;
DrawReport(m_rect,&dc1,true);
}
}
上一篇:
DialogPrint.cpp
下一篇:
计算机仿真论文1