READ ME.txt

QTMLPrinting sample code version 1.0
9/1/03
 
 
 
1. ABOUT QTMLPRINTING
 
QTMLPrinting is a sample application that demonstrates how to use the QuickTime APIs to draw into a standard Win32 printing device context.
 
2. SPECIFICS
 
QTMLPrinting is based largely on sample code included in Ice Floe Note #16, which can be found on the QuickTime web site. The sample code to draw into a printing device context first creates a GWorld in a Win32 compatible pixel format (in our example code we use k32BGRAPixelFormat). Once created the GWorld's HDC and HBITMAP are retrieved using GetPortHDC and GetPortHBITMAP. The active port is selected by calling SetGWorld, and graphics rendered using the Quickdraw APIs RGBForeColor and PaintRect. Additionally, native Win32 GDI calls are used to render graphics into the same GWorld. Finally, the contents of the port is copied to a secondary HDC via ScaleBlt, using the GWorld's HDC as a source. Note that the HBITMAP and HDC are owned and managed by the GWorld, and are not disposed of.
 
 
3. BUILDING QTMLPRINTING
 
 
Windows 95/98/Me/NT/2000/XP
   - Included is a Microsoft Visual C++ 6 makefile. The application will run on any system with QuickTime 3.0 or better installed.
 
4. USING QTMLPRINTING
 
Simply launch the application and the program will automatically locate the default printer, create a standard Win32 printer device context, and draw into the device context using QuickTime Quickdraw functions. The resulting out is sent to the printer.
 
 
Enjoy,
 
Apple Worldwide Developer Technical Support