Printer DC
-
Hi there . How can I get the printer DC ?
DMASTER
-
Hi there . How can I get the printer DC ?
DMASTER
See if you can use CPrintDialog::GetPrinterDC
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Hi there . How can I get the printer DC ?
DMASTER
-
See if you can use CPrintDialog::GetPrinterDC
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
Thanks to your reply. I don't want to use MFC, I need a solution with windows API.
DMASTER
-
Thanks to your reply. I don't want to use MFC, I need a solution with windows API.
DMASTER
-
Hi there . How can I get the printer DC ?
DMASTER
HDC hDC; CDC PrinterDC; hDC = CreateDC( NULL, "YOUR PRINTERNAME", NULL, NULL ); PrinterDC.Attach( hDC ); DOCINFO stDocInfo; memset( &stDocInfo, 0, sizeof( DOCINFO )); stDocInfo.cbSize = sizeof( DOCINFO ); stDocInfo.lpszDocName = _T( "TEST" ); // Document name StartDoc( hDC, &stDocInfo ); CPen DrawPen( PS_DASH, 5, RGB( 0, 0, 0 )); CBrush DrawBrush( HS_BDIAGONAL, RGB( 0, 0, 255 )); PrinterDC.SelectObject( &DrawPen ); //PrinterDC.SelectObject( &DrawBrush ) ; PrinterDC.SetBkMode( TRANSPARENT ); StartPage( hDC ); CRect Rect( 0, 0, 100, 100 ); PrinterDC.Rectangle( &Rect ); PrinterDC.MoveTo( 0, 0 ); PrinterDC.LineTo( 100, 100 ); CString csText( _T( "Orientation" )); TextOut( hDC, 50, 50, csText.operator LPCTSTR(), csText.GetLength()); EndPage( hDC ); EndDoc( hDC ); PrinterDC.Detach();
-
Hi there . How can I get the printer DC ?
DMASTER