- 753 名前:印刷が遅いのですが mailto:sage [2007/05/26(土) 12:51:16 ]
- 以下は、ネットで見つけたサンプルコードで、このままでパターンが印字されます。
〜View::OnFilePrint(){ CPrintDialog myPtDlg(FALSE); HDC myPtDC; CDC myDC; DOCINFO myDocInfo; if(myPtDlg.DoModal() == IDOK){ myPtDC = myPtDlg.GetPrinterDC(); myDC.Attach(myPtDC); myDocInfo.cbSize = sizeof(myDocInfo); myDocInfo.lpszDocName = NULL; myDocInfo.lpszOutput = NULL; myDocInfo.lpszDatatype = NULL; myDocInfo.fwType = 0; myDC.StartDoc(&myDocInfo); CDC* pDC=GetDC(); myDC.StartPage(); for(y=0;y<3000;y++){ for(x=0;x<3000;x1++){ myDC.FillSolidRect(x,y,1,1,RGB(x,y,+y)); } } myDC.EndPage(); myDC.EndDoc(); ReleaseDC(pDC); ::DeleteDC(myPtDC); } }
|

|