CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    May 2005
    Posts
    399

    Writing graphics to a Printer Device context

    Hi all,

    My aim is to get the handle of a printer and then pass some data to it for printing. so far I have managed to get the handle of printer:
    hdcPrn = GetPrinterDC()
    and then just for testing i captured the desktop screen but getting the handle of the screen and copied this data to the printer using BitBlt:
    BitBlt(hdcPrn,0,0,1024,768,hdcScreen,0,0,SRCCOPY)
    where hdcScreen is the Device Context of the screen.

    Now what i want to do is read some data from a word document using Creatfile() and ReadFile() and then write whatever data I get into the Device DC of the printer. I am sure Writefile() or TextOut() will not work b'coz the .doc might contain images also. I want to know if there is any command or method to write a buffer data into a device DC.

    Thanks
    Last edited by leojose; May 12th, 2005 at 11:10 PM. Reason: changed title

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured