OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TPrintDC Class Reference

A DC class that provides access to a printer. More...

#include <owl/dc.h>

Inheritance diagram for owl::TPrintDC:
owl::TCreatedDC owl::TDC owl::TGdiBase owl::TPreviewDCBase owl::TPrintPreviewDC

Public Member Functions

 TPrintDC (HDC handle, TAutoDelete autoDelete=NoAutoDelete)
 Creates a TPrintDC object for the DC given by handle.
 
 TPrintDC (const tstring &device, const DEVMODE *initData=nullptr)
 Creates a TPrintDC object for the given printer device name and initialization data.
 
int Escape (int escape, int count=0, const void *inData=nullptr, void *outData=nullptr)
 Allows applications to access the capabilities of a particular device that are not directly available through the GDI of this DC.
 
int SetAbortProc (ABORTPROC proc)
 Establishes the user-defined proc as the printer-abort function for this printer.
 
int StartDoc (LPCTSTR docName, LPCTSTR output=nullptr)
 Starts a print job for the named document on this printer DC.
 
int StartDoc (const tstring &docName, const tstring &output=tstring{})
 
int StartPage ()
 Prepares this device to accept data.
 
int BandInfo (TBandInfo &bandInfo)
 Retrieves information about the banding capabilities of this device, and copies it to the given bandInfo structure.
 
int NextBand (TRect &rect)
 Tells this printer's device driver that the application has finished writing to a band.
 
int EndPage ()
 Tells this printer's device driver that the application has finished writing to a page.
 
int EndDoc ()
 Ends the current print job on this printer.
 
int AbortDoc ()
 Aborts the current print job on this printer and erases everything drawn since the last call to StartDoc.
 
uint QueryEscSupport (int escapeNum)
 Returns true if the escape specified by escapeNum is implemented on this device; otherwise false.
 
int SetCopyCount (int reqestCount, int &actualCount)
 Sets requestCount to the number of uncollated copies of each page that this printer should print.
 
- Public Member Functions inherited from owl::TCreatedDC
 TCreatedDC (LPCTSTR driver, LPCTSTR device, const DEVMODE *initData=nullptr)
 Creates a device context (DC) object for the device specified by driver (driver name) and device (device name).
 
 TCreatedDC (const tstring &driver, const tstring &device=tstring{}, const DEVMODE *=nullptr)
 String-aware overload.
 
 TCreatedDC (HDC handle, TAutoDelete autoDelete)
 Creates a DC object using an existing DC.
 
 ~TCreatedDC ()
 Destructor Calls RestoreObjects clears any nonzero OrgXXX data members.
 
- Public Member Functions inherited from owl::TDC
 TDC (HDC handle)
 use an existing DC, doesn't auto delete it
 
 TDC ()
 for derived classes only
 
virtual ~TDC ()
 Default dtor does not delete Handle Calls RestoreObjects.
 
 operator HDC () const
 Must assume const is OK.
 
bool IsDC () const
 Validation routine - used mainly for diagnostic purposes.
 
void SetDC (HDC hdc)
 
bool GetDCOrg (TPoint &point) const
 Obtains the final translation origin for this device context and places the value in point.
 
virtual int SaveDC () const
 Saves the current state of this DC on a context stack.
 
virtual bool RestoreDC (int savedDC=-1)
 Restores the given savedDC.
 
virtual int GetDeviceCaps (int index) const
 Used under WIN3.1 or later, GetDeviceCaps returns capability information about this DC.
 
virtual bool ResetDC (const DEVMODE &devMode)
 Updates this DC using data in the given devMode structure.
 
void SelectObject (const TBrush &brush)
 Selects the given GDI brush object into this DC.
 
void SelectObject (const TPen &pen)
 Selects the given GDI pen object into this DC.
 
virtual void SelectObject (const TFont &font)
 Selects the given GDI font object into this DC.
 
void SelectObject (const TPalette &palette, bool forceBackground=false)
 Selects the given GDI palette object into this DC.
 
void SelectObject (const TBitmap &bitmap)
 Selects the given GDI bitmap object into this DC.
 
virtual void SelectStockObject (int index)
 Selects into the DC a predefined stock pen, brush, font, or palette.
 
void RestoreBrush ()
 Restores the original GDI brush object to this DC.
 
void RestorePen ()
 Restores the original GDI pen object to this DC.
 
virtual void RestoreFont ()
 Restores the original GDI font object to this DC.
 
void RestorePalette ()
 Restores the original GDI palette object to this DC.
 
void RestoreBitmap ()
 Restores the original GDI bitmap object into this DC.
 
void RestoreTextBrush ()
 Restores the original GDI text brush object to this DC.
 
void RestoreObjects ()
 Restores all the original GDI objects to this DC.
 
HANDLE GetCurrentObject (uint objectType) const
 Returns a handle to the currently selected object of the given objectType associated with this DC.
 
bool GetBrushOrg (TPoint &point) const
 Places in point the current brush origin of this DC.
 
bool SetBrushOrg (const TPoint &origin, TPoint *oldOrg=nullptr)
 Sets the origin of the currently selected brush of this DC with the given origin value.
 
int EnumObjects (uint objectType, GOBJENUMPROC proc, void *data) const
 Enumerates the pen or brush objects available for this DC.
 
TColor GetNearestColor (const TColor &color) const
 Returns the color nearest to the given Color argument for the current palette of this DC.
 
int RealizePalette ()
 Maps to the system palette the logical palette entries selected into this DC.
 
void UpdateColors ()
 Updates the client area of this DC by matching the current colors in the client area to the system palette on a pixel-by-pixel basis.
 
uint GetSystemPaletteEntries (int start, int num, PALETTEENTRY *entries) const
 Retrieves a range of up to num palette entries, starting at start, from the system palette to the entries array of PALETTEENTRY structures.
 
uint GetSystemPaletteUse () const
 Determines whether this DC has access to the full system palette.
 
int SetSystemPaletteUse (int usage)
 Changes the usage of this DC's system palette.
 
TColor GetBkColor () const
 Returns the current background color of this DC.
 
virtual TColor SetBkColor (const TColor &color)
 Sets the current background color of this DC to the given color value or the nearest available.
 
int GetBkMode () const
 Returns the background mode of this DC, either OPAQUE or TRANSPARENT.
 
int SetBkMode (int mode)
 Sets the background mode to the given mode argument, which can be either OPAQUE or TRANSPARENT.
 
int GetPolyFillMode () const
 Returns the current polygon-filling mode for this DC, either ALTERNATE or WINDING.
 
int SetPolyFillMode (int mode)
 Description Sets the polygon-filling mode for this DC to the given mode value, either ALTERNATE or WINDING.
 
int GetROP2 () const
 Returns the current drawing (raster operation) mode of this DC.
 
int SetROP2 (int mode)
 Sets the current foreground mix mode mode of this DC to the given mode value and returns the previous mode.
 
int GetStretchBltMode () const
 Returns the current stretching mode for this DC: BLACKONWHITE, COLORONCOLOR, or WHITEONBLACK.
 
int SetStretchBltMode (int mode)
 Sets the stretching mode of this DC to the given mode value and returns the previous mode.
 
TColor GetTextColor () const
 Returns the current text color of this DC.
 
virtual TColor SetTextColor (const TColor &color)
 Sets the current text color of this DC to the given color value.
 
bool SetMiterLimit (float newLimit, float *oldLimit=nullptr)
 Sets the limit of miter joins to newLimit and puts the previous value in oldLimit.
 
int GetMapMode () const
 If successful, returns the current window mapping mode of this DC; otherwise, returns 0.
 
virtual int SetMapMode (int mode)
 Sets the current window mapping mode of this DC to mode.
 
bool SetWorldTransform (XFORM &xform)
 Sets a two-dimensional linear transformation, given by the xform structure, between world space and page space for this DC.
 
bool ModifyWorldTransform (XFORM &xform, uint32 mode)
 Changes the current world transformation for this DC using the given xform and mode arguments.
 
bool GetViewportOrg (TPoint &point) const
 The first version sets in the point argument the x- and y-extents (in device-units) of this DC's viewport.
 
TPoint GetViewportOrg () const
 The first version sets in the point argument the x- and y-extents (in device-units) of this DC's viewport.
 
virtual bool SetViewportOrg (const TPoint &origin, TPoint *oldOrg=nullptr)
 Sets this DC's viewport origin to the given origin value, and saves the previous origin in oldOrg.
 
virtual bool OffsetViewportOrg (const TPoint &delta, TPoint *oldOrg=nullptr)
 Modifies this DC's viewport origin relative to the current values.
 
bool GetViewportExt (TSize &extent) const
 The first version retrieves this DC's current viewport's x- and y-extents (in device units) and places the values in extent.
 
TSize GetViewportExt () const
 The first version retrieves this DC's current viewport's x- and y-extents (in device units) and places the values in extent.
 
virtual bool SetViewportExt (const TSize &extent, TSize *oldExtent=nullptr)
 Sets this DC's viewport x- and y-extents to the given extent values.
 
virtual bool ScaleViewportExt (int xNum, int xDenom, int yNum, int yDenom, TSize *oldExtent=nullptr)
 Modifies this DC's viewport extents relative to the current values.
 
bool GetWindowOrg (TPoint &point) const
 Places in point the x- and y-coordinates of the origin of the window associated with this DC.
 
TPoint GetWindowOrg () const
 Places in point the x- and y-coordinates of the origin of the window associated with this DC.
 
bool SetWindowOrg (const TPoint &origin, TPoint *oldOrg=nullptr)
 Sets the origin of the window associated with this DC to the given origin value, and saves the previous origin in oldOrg.
 
bool OffsetWindowOrg (const TPoint &delta, TPoint *oldOrg=nullptr)
 Modifies this DC's window origin relative to the current values.
 
bool GetWindowExt (TSize &extent) const
 Retrieves this DC's window current x- and y-extents (in device units).
 
TSize GetWindowExt () const
 Retrieves this DC's window current x- and y-extents (in device units).
 
virtual bool SetWindowExt (const TSize &extent, TSize *oldExtent=nullptr)
 Sets this DC's window x- and y-extents to the given extent values.
 
virtual bool ScaleWindowExt (int xNum, int xDenom, int yNum, int yDenom, TSize *oldExtent=nullptr)
 Modifies this DC's window extents relative to the current values.
 
bool DPtoLP (TPoint *points, int count=1) const
 Converts each of the count points in the points array from device points to logical points.
 
bool DPtoLP (TRect &rect) const
 
bool LPtoDP (TPoint *points, int count=1) const
 Converts each of the count points in the points array from logical points to device points.
 
bool LPtoDP (TRect &rect) const
 Converts each of the count points in the points array from logical points to device points.
 
int GetClipBox (TRect &rect) const
 Places the current clip box size of this DC in rect.
 
TRect GetClipBox () const
 Places the current clip box size of this DC in rect.
 
int ExcludeClipRect (const TRect &rect)
 Creates a new clipping region for this DC.
 
int ExcludeUpdateRgn (HWND wnd)
 Prevents drawing within invalid areas of a window by excluding an updated region of this DC's window from its clipping region.
 
int IntersectClipRect (const TRect &rect)
 Creates a new clipping region for this DC's window by forming the intersection of the current region with the rectangle specified by rect.
 
int OffsetClipRgn (const TPoint &delta)
 Moves the clipping region of this DC by the x- and y-offsets specified in delta.
 
int SelectClipRgn (const TRegion &region)
 Selects the given region as the current clipping region for this DC.
 
int SelectClipRgn (HRGN r=0)
 Selects the given region as the current clipping region for the device context.
 
int RemoveClipRgn ()
 Removes the device context's clipping region.
 
bool PtVisible (const TPoint &point) const
 Returns true if the given point lies within the clipping region of this DC; otherwise, returns false.
 
bool RectVisible (const TRect &rect) const
 Returns true if any part of the given rectangle, rect, lies within the clipping region of this DC; otherwise, returns false.
 
bool GetBoundsRect (TRect &bounds, uint16 flags) const
 Reports in bounds the current accumulated bounding rectangle of this DC or of the Windows manager, depending on the value of flags.
 
uint SetBoundsRect (TRect &bounds, uint flags)
 Controls the accumulation of bounding rectangle information for this DC.
 
int GetClipRgn (TRegion &region) const
 Retrieves this DC's current clip-region and, if successful, places a copy of it in the region argument.
 
int EnumMetaFile (const TMetaFilePict &metaFile, MFENUMPROC callback, void *data) const
 Enumerates the GDI calls within the given metaFile.
 
bool PlayMetaFile (const TMetaFilePict &metaFile)
 Plays the contents of the given metaFile on this DC.
 
void PlayMetaFileRecord (HANDLETABLE &handletable, METARECORD &metaRecord, int count)
 Plays the metafile record given in metaRecord to this DC by executing the GDI function call contained in that record.
 
int EnumEnhMetaFile (const TEnhMetaFilePict &metaFile, ENHMFENUMPROC callback, void *data, const TRect *rect) const
 Enumerate through the enhanced metafile records.
 
bool PlayEnhMetaFile (const TEnhMetaFilePict &metaFile, const TRect *rect)
 Play the enhanced metafile onto this device context.
 
void PlayEnhMetaFileRecord (HANDLETABLE &handletable, ENHMETARECORD &metaRecord, uint count)
 Play one record from the enhanced metafile onto this DC.
 
bool GetCurrentPosition (TPoint &point) const
 Reports in point the logical coordinates of this DC's current position.
 
bool MoveTo (int x, int y)
 Moves the current position of this DC to the given x- and y-coordinates or to the given point.
 
bool MoveTo (const TPoint &point)
 Moves the current position of this DC to the given x- and y-coordinates or to the given point.
 
bool MoveTo (const TPoint &point, TPoint &oldPoint)
 Moves the current position of this DC to the given x- and y-coordinates or to the given point.
 
bool DrawIcon (int x, int y, const TIcon &icon)
 Draws the given icon on this DC.
 
bool DrawIcon (const TPoint &point, const TIcon &icon)
 Draws the given icon on this DC.
 
bool DrawCursor (int x, int y, const TCursor &cursor)
 
bool DrawCursor (const TPoint &point, const TCursor &cursor)
 
bool DrawIcon (int x, int y, const TIcon &icon, int w, int h, int aniStep=0, HBRUSH bkBr=0, uint flags=DI_NORMAL)
 
bool DrawIcon (const TPoint &point, const TIcon &icon, const TSize &size, int aniStep=0, HBRUSH bkBr=0, uint flags=DI_NORMAL)
 
bool DrawCursor (int x, int y, const TCursor &cursor, int w, int h, int aniStep=0, HBRUSH bkBr=0, uint flags=DI_NORMAL)
 
bool DrawCursor (const TPoint &point, const TCursor &cursor, const TSize &size, int aniStep=0, HBRUSH bkBr=0, uint flags=DI_NORMAL)
 
bool FrameRect (int x1, int y1, int x2, int y2, const TBrush &brush)
 Draws a border on this DC around the given rectangle, rect, using the given brush, brush.
 
bool FrameRect (const TRect &rect, const TBrush &brush)
 Draws a border on this DC around the given rectangle, rect, using the given brush, brush.
 
bool FillRect (int x1, int y1, int x2, int y2, const TBrush &brush)
 Fills the given rectangle on this DC using the specified brush.
 
bool FillRect (const TRect &rect, const TBrush &brush)
 Fills the given rectangle on this DC using the specified brush.
 
bool InvertRect (int x1, int y1, int x2, int y2)
 Inverts the given rectangle, rect, on this DC.
 
bool InvertRect (const TRect &rect)
 Inverts the given rectangle, rect, on this DC.
 
bool DrawFocusRect (int x1, int y1, int x2, int y2)
 Draws the given rectangle on this DC in the style used to indicate focus.
 
bool DrawFocusRect (const TRect &rect)
 Draws the given rectangle on this DC in the style used to indicate focus.
 
bool DrawEdge (const TRect &frame, uint edge, uint flags)
 
void PaintFrame (const TRect &fr, uint flags, const TColor &tlColor, const TColor &brColor)
 
bool TextRect (int x1, int y1, int x2, int y2)
 Fills the given rectangle, clipping any text to the rectangle.
 
bool TextRect (const TRect &rect)
 Fills the given rectangle, clipping any text to the rectangle.
 
bool TextRect (int x1, int y1, int x2, int y2, const TColor &color)
 Fills the given rectangle, clipping any text to the rectangle.
 
bool TextRect (const TRect &rect, const TColor &color)
 Fills the given rectangle, clipping any text to the rectangle.
 
bool FillSolidRect (const TRect &r, const TColor &color)
 
void OWLFastWindowFrame (TBrush &brush, TRect &r, int xWidth, int yWidth, uint32 rop=PATCOPY)
 Draws a frame of the specified size and thickness with the given brush.
 
bool FrameRgn (const TRegion &region, const TBrush &brush, const TSize &brushSize)
 Draws a border on this DC around the given region, region, using the given brush, brush.
 
bool FillRgn (const TRegion &region, const TBrush &brush)
 Fills the given region on this DC using the specified brush.
 
bool InvertRgn (const TRegion &region)
 Inverts the given region, on this DC.
 
bool PaintRgn (const TRegion &region)
 Paints the given rectangle using the currently selected brush for this DC.
 
bool AngleArc (int x, int y, uint32 radius, float startAngle, float sweepAngle)
 Draws a line segment and an arc on this DC using the currently selected pen object.
 
bool AngleArc (const TPoint &center, uint32 radius, float startAngle, float sweepAngle)
 Draws a line segment and an arc on this DC using the currently selected pen object.
 
bool Arc (int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
 Draws an elliptical arc on this DC using the currently selected pen object.
 
bool Arc (const TRect &r, const TPoint &start, const TPoint &end)
 Draws an elliptical arc on this DC using the currently selected pen object.
 
bool Chord (int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
 Draws and fills a chord (a region bounded by the intersection of an ellipse and a line segment) on this DC using the currently selected pen and brush objects.
 
bool Chord (const TRect &R, const TPoint &Start, const TPoint &End)
 Draws and fills a chord (a region bounded by the intersection of an ellipse and a line segment) on this DC using the currently selected pen and brush objects.
 
bool Pie (int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
 Using the currently selected pen and brush objects, draws and fills a pie-shaped wedge by drawing an elliptical arc whose center and end points are joined by lines.
 
bool Pie (const TRect &rect, const TPoint &start, const TPoint &end)
 Using the currently selected pen and brush objects, draws and fills a pie-shaped wedge by drawing an elliptical arc whose center and end points are joined by lines.
 
bool Ellipse (int x1, int y1, int x2, int y2)
 Draws and fills an ellipse on this DC using the currently selected pen and brush objects.
 
bool Ellipse (const TPoint &p1, const TPoint &p2)
 Draws and fills an ellipse on this DC using the currently selected pen and brush objects.
 
bool Ellipse (const TPoint &point, const TSize &size)
 Draws and fills an ellipse on this DC using the currently selected pen and brush objects.
 
bool Ellipse (const TRect &rect)
 Draws and fills an ellipse on this DC using the currently selected pen and brush objects.
 
bool LineTo (int x, int y)
 Draws a line on this DC using the current pen object.
 
bool LineTo (const TPoint &point)
 Draws a line on this DC using the current pen object.
 
bool Polyline (const TPoint *points, int count)
 Using the current pen object, draws on this DC a count of line segments (there must be at least 2).
 
bool Polygon (const TPoint *points, int count)
 
bool PolyPolygon (const TPoint *points, const int *PolyCounts, int count)
 Using the current pen and polygon-filling mode, draws and fills on this DC the number of closed polygons indicated in count (which must be >= 2).
 
bool PolyPolyline (const TPoint *points, const int *PolyCounts, int count)
 Using the currently selected pen object, draws on this DC the number of polylines (connected line segments) indicated in count.
 
bool PolyBezier (const TPoint *points, int count)
 Draws one or more connected cubic Bezier splines through the points specified in the points array using the currently selected pen object.
 
bool PolyBezierTo (const TPoint *points, int count)
 Draws one or more connected cubic Beziers splines through the points specified in the points array using the currently selected pen object.
 
bool PolyDraw (const TPoint *points, uint8 *types, int count)
 Using the currently selected pen object, draws one or more possibly disjoint sets of line segments or Bezier splines or both on this DC.
 
bool PolylineTo (const TPoint *points, int count)
 Draws one or more connected line segments on this DC using the currently selected pen object.
 
bool Rectangle (int x1, int y1, int x2, int y2)
 Draws and fills a rectangle of the given size on this DC with the current pen and brush objects.
 
bool Rectangle (const TPoint &p1, const TPoint &p2)
 Draws and fills a rectangle of the given size on this DC with the current pen and brush objects.
 
bool Rectangle (const TPoint &point, const TSize &s)
 Draws and fills a rectangle of the given size on this DC with the current pen and brush objects.
 
bool Rectangle (const TRect &rect)
 Draws and fills a rectangle of the given size on this DC with the current pen and brush objects.
 
bool RoundRect (int x1, int y1, int x2, int y2, int x3, int y3)
 Draws and fills a rounded rectangle of the given size on this DC with the current pen and brush objects.
 
bool RoundRect (const TPoint &p1, const TPoint &p2, const TPoint &rad)
 Draws and fills a rounded rectangle of the given size on this DC with the current pen and brush objects.
 
bool RoundRect (const TPoint &p, const TSize &s, const TPoint &rad)
 Draws and fills a rounded rectangle of the given size on this DC with the current pen and brush objects.
 
bool RoundRect (const TRect &rect, const TPoint &rad)
 Draws and fills a rounded rectangle of the given size on this DC with the current pen and brush objects.
 
TColor GetPixel (int x, int y) const
 Returns the color of the pixel at the given location.
 
TColor GetPixel (const TPoint &point) const
 Returns the color of the pixel at the given location.
 
TColor SetPixel (int x, int y, const TColor &color)
 Sets the color of the pixel at the given location to the given color and returns the pixel's previous color.
 
TColor SetPixel (const TPoint &p, const TColor &color)
 Sets the color of the pixel at the given location to the given color and returns the pixel's previous color.
 
bool BitBlt (int dstX, int dstY, int w, int h, const TDC &srcDC, int srcX, int srcY, uint32 rop=SRCCOPY)
 Performs a bit-block transfer from srcDc (the given source DC) to this DC (the destination DC).
 
bool BitBlt (const TRect &dst, const TDC &srcDC, const TPoint &src, uint32 rop=SRCCOPY)
 Performs a bit-block transfer from srcDc (the given source DC) to this DC (the destination DC).
 
bool PatBlt (int x, int y, int w, int h, uint32 rop=PATCOPY)
 
bool PatBlt (const TRect &dst, uint32 rop=PATCOPY)
 
bool ScrollDC (int x, int y, const TRect &scroll, const TRect &clip, TRegion &updateRgn, TRect &updateRect)
 Scrolls a rectangle of bits horizontally by x (or delta.x in the second version) device-units, and vertically by y (or delta.y) device-units on this DC.
 
bool ScrollDC (const TPoint &delta, const TRect &scroll, const TRect &clip, TRegion &updateRgn, TRect &updateRect)
 Scrolls a rectangle of bits horizontally by x (or delta.x in the second version) device-units, and vertically by y (or delta.y) device-units on this DC.
 
bool StretchBlt (int dstX, int dstY, int dstW, int dstH, const TDC &srcDC, int srcX, int srcY, int srcW, int srcH, uint32 rop=SRCCOPY)
 Copies a bitmap from the source DC to a destination rectangle on this DC specified either by upper left-corner coordinates (dstX, dstY), width dstW, and height dstH, or (in the second version) by a TRect object, dst.
 
bool StretchBlt (const TRect &dst, const TDC &srcDC, const TRect &src, uint32 rop=SRCCOPY)
 Copies a bitmap from the source DC to a destination rectangle on this DC specified either by upper left-corner coordinates (dstX, dstY), width dstW, and height dstH, or (in the second version) by a TRect object, dst.
 
bool MaskBlt (const TRect &dst, const TDC &srcDC, const TPoint &src, const TBitmap &maskBm, const TPoint &maskPos, uint32 rop=SRCCOPY)
 Copies a bitmap from the given source DC to this DC.
 
bool PlgBlt (const TPoint *points, const TDC &srcDC, const TRect &src, const TBitmap &maskBm, const TPoint &maskPos)
 Performs a bit-block transfer from the given source DC to this DC.
 
bool TransparentBlt (const TRect &dst, const TDC &srcDC, const TRect &src, const TColor &transparent)
 Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.
 
int GetDIBits (const TBitmap &bitmap, uint startScan, uint numScans, void *bits, const BITMAPINFO &info, uint16 usage)
 The first version retrieves some or all of the bits from the given bitmap on this DC and copies them to the bits buffer using the DIB (device-independent bitmap) format specified by the BITMAPINFO argument, info.
 
int GetDIBits (const TBitmap &bitmap, TDib &dib)
 The first version retrieves some or all of the bits from the given bitmap on this DC and copies them to the bits buffer using the DIB (device-independent bitmap) format specified by the BITMAPINFO argument, info.
 
int SetDIBits (TBitmap &bitmap, uint startScan, uint numScans, const void *bits, const BITMAPINFO &Info, uint16 usage)
 The first version sets the pixels in bitmap (the given destination bitmap on this DC) from the source DIB (device-independent bitmap) color data found in the byte array bits and the BITMAPINFO structure, Info.
 
int SetDIBits (TBitmap &bitmap, const TDib &dib)
 The first version sets the pixels in bitmap (the given destination bitmap on this DC) from the source DIB (device-independent bitmap) color data found in the byte array bits and the BITMAPINFO structure, Info.
 
int SetDIBitsToDevice (const TRect &dst, const TPoint &src, uint startScan, uint numScans, const void *bits, const BITMAPINFO &bitsInfo, uint16 usage)
 The first version sets the pixels in dst (the given destination rectangle on this DC) from the source DIB (device-independent bitmap) color data found in the byte array bits and the BITMAPINFO structure, bitsInfo.
 
int SetDIBitsToDevice (const TRect &dst, const TPoint &src, const TDib &dib)
 The first version sets the pixels in dst (the given destination rectangle on this DC) from the source DIB (device-independent bitmap) color data found in the byte array bits and the BITMAPINFO structure, bitsInfo.
 
int StretchDIBits (const TRect &dst, const TRect &src, const void *bits, const BITMAPINFO &bitsInfo, uint16 usage, uint32 rop=SRCCOPY)
 Copies the color data from src, the source rectangle of pixels in the given DIB (device-independent bitmap) on this DC, to dst, the destination rectangle.
 
int StretchDIBits (const TRect &dst, const TRect &src, const TDib &dib, uint32 rop=SRCCOPY)
 Copies the color data from src, the source rectangle of pixels in the given DIB (device-independent bitmap) on this DC, to dst, the destination rectangle.
 
HBITMAP CreateDIBSection (const BITMAPINFO &info, uint usage, void **bits, HANDLE section=0, uint32 offset=0)
 Create a fast DIB under Win32.
 
bool FloodFill (const TPoint &point, const TColor &color)
 Fills an area on this DC starting at point and using the currently selected brush object.
 
bool ExtFloodFill (const TPoint &point, const TColor &color, uint16 fillType)
 Fills an area on this DC starting at point and using the currently selected brush object.
 
virtual bool TextOut (int x, int y, const tstring &str, int count=-1)
 Draws up to count characters of the given null-terminated string in the current font on this DC.
 
bool TextOut (const TPoint &p, const tstring &str, int count=-1)
 Draws up to count characters of the given null-terminated string in the current font on this DC.
 
virtual bool ExtTextOut (int x, int y, uint16 options, const TRect *r, const tstring &str, int count=-1, const int *dx=nullptr)
 Draws up to count characters of the given null-terminated string in the current font on this DC.
 
bool ExtTextOut (const TPoint &p, uint16 options, const TRect *r, const tstring &str, int count=-1, const int *dx=nullptr)
 Draws up to count characters of the given null-terminated string in the current font on this DC.
 
virtual bool TabbedTextOut (const TPoint &p, const tstring &str, int count, int numPositions, const int *positions, int tabOrigin, TSize &size)
 Draws up to count characters of the given null-terminated string in the current font on this DC.
 
bool TabbedTextOut (const TPoint &p, const tstring &str, int count, int numPositions, const int *positions, int tabOrigin)
 Draws up to count characters of the given null-terminated string in the current font on this DC.
 
int DrawText (const tstring &str, int count, const TRect &, uint16 format=0)
 Overload for const TRect& For obvious reasons, this overload does not support the DT_CALCRECT format flag.
 
virtual int DrawText (const tstring &str, int count, TRect &, uint16 format=0)
 Formats and draws in the given rectangle, r, up to count characters of the null-terminated string using the current font for this DC.
 
virtual int DrawTextEx (TCHAR *str, int count, TRect *=nullptr, uint format=0, LPDRAWTEXTPARAMS=nullptr)
 Formats and draws in the given rectangle, r, up to count characters of the null-terminated string using the current font for this DC.
 
bool DrawFrameControl (TRect lpRect, UINT nType, UINT nState)
 
virtual bool GrayString (const TBrush &brush, GRAYSTRINGPROC outputFunc, const tstring &str, int count, const TRect &r)
 Draws in the given rectangle (r) up to count characters of gray text from string using the given brush, brush, and the current font for this DC.
 
bool GetTextExtent (const tstring &str, int stringLen, TSize &size) const
 Computes the extent (width and height) in logical units of the text line consisting of stringLen characters from the null-terminated string.
 
TSize GetTextExtent (const tstring &str, int stringLen) const
 Computes the extent (width and height) in logical units of the text line consisting of stringLen characters from the null-terminated string.
 
bool GetTabbedTextExtent (const tstring &str, int stringLen, int numPositions, const int *positions, TSize &size) const
 Computes the extent (width and height) in logical units of the text line consisting of stringLen characters from the null-terminated string.
 
TSize GetTabbedTextExtent (const tstring &str, int stringLen, int numPositions, const int *positions) const
 Computes the extent (width and height) in logical units of the text line consisting of stringLen characters from the null-terminated string.
 
uint GetTextAlign () const
 If successful, returns the current text-alignment flags for this DC; otherwise, returns the value GDI_ERROR.
 
uint SetTextAlign (uint flags)
 Sets the text-alignment flags for this DC.
 
int GetTextCharacterExtra () const
 If successful, returns the current intercharacter spacing, in logical units, for this DC; otherwise, returns INVALID_WIDTH.
 
int SetTextCharacterExtra (int extra)
 If successful, sets the current intercharacter spacing to extra, in logical units, for this DC, and returns the previous intercharacter spacing.
 
bool SetTextJustification (int breakExtra, int breakCount)
 When text strings are displayed using TDC::TextOut and TDC::ExtTextOut, sets the number of logical units specified in breakExtra as the total extra space to be added to the number of break characters specified in breakCount.
 
int GetTextFaceLength () const
 Retrieves the length of the typeface name for the current font on this DC.
 
int GetTextFace (int count, TCHAR *facename) const
 Retrieves the typeface name for the current font on this DC.
 
tstring GetTextFace () const
 
bool GetTextMetrics (TEXTMETRIC &metrics) const
 Fills the metrics structure with metrics data for the current font on this DC.
 
TEXTMETRIC GetTextMetrics () const
 Functional style overload.
 
uint32 GetGlyphOutline (uint chr, uint format, GLYPHMETRICS &gm, uint32 buffSize, void *buffer, const MAT2 &mat2)
 Retrieves TrueType metric and other data for the given character, chr, on this DC and places it in gm and buffer.
 
int GetKerningPairs (int pairs, KERNINGPAIR *krnPair)
 Retrieves kerning pairs for the current font of this DC up to the number specified in pairs and copies them into the krnPair array of KERNINGPAIR structures.
 
uint GetOutlineTextMetrics (uint data, OUTLINETEXTMETRIC &otm)
 Retrieves metric information for TrueType fonts on this DC and copies it to the given array of OUTLINETEXTMETRIC structures, otm.
 
bool GetCharWidth (uint firstChar, uint lastChar, int *buffer)
 Retrieves the widths in logical units for a consecutive sequence of characters in the current font for this DC.
 
uint32 SetMapperFlags (uint32 flag)
 Alters the algorithm used by the font mapper when mapping logical fonts to physical fonts on this DC.
 
bool GetAspectRatioFilter (TSize &size) const
 Retrieves the setting of the current aspect-ratio filter for this DC.
 
int EnumFonts (LPCTSTR faceName, OLDFONTENUMPROC callback, void *data) const
 Enumerates the fonts available on this DC for the given faceName.
 
int EnumFonts (const tstring &facename, OLDFONTENUMPROC callback, void *data) const
 
int EnumFontFamilies (LPCTSTR family, FONTENUMPROC proc, void *data) const
 Enumerates the fonts available to this DC in the font family specified by family.
 
int EnumFontFamilies (const tstring &family, FONTENUMPROC proc, void *data) const
 
uint32 GetFontData (uint32 table, uint32 offset, void *buffer, long data)
 Retrieves font-metric information from a scalable TrueType font file (specified by table and starting at offset into this table) and places it in the given buffer.
 
bool GetCharABCWidths (uint firstChar, uint lastChar, ABC *abc)
 Retrieves the widths of consecutive characters in the range firstChar to lastChar from the current TrueType font of this DC.
 
bool BeginPath ()
 Opens a new path bracket for this DC and discards any previous paths from this DC.
 
bool CloseFigure ()
 Closes an open figure in this DC's open path bracket by drawing a line from the current position to the first point of the figure (usually the point specified by the most recent TDC::MoveTo call), and connecting the lines using the current join style for this DC.
 
bool EndPath ()
 Closes the path bracket and selects the path it defines into this DC.
 
bool FlattenPath ()
 Transforms any curves in the currently selected path of this DC.
 
bool WidenPath ()
 Redefines the current, closed path on this DC as the area that would be painted if the path were stroked with this DC's current pen.
 
bool FillPath ()
 Closes any open figures in the current path of this DC and fills the path's interior using the current brush and polygon fill mode.
 
bool StrokePath ()
 Renders the current, closed path on this DC and uses the DC's current pen.
 
bool StrokeAndFillPath ()
 Closes any open figures in the current path of this DC, strokes the outline of the path using the current pen, and fills its interior using the current brush and polygon fill mode.
 
bool SelectClipPath (int mode)
 Selects the current path on this DC as a clipping region, combining any existing clipping region using the specified mode as shown in the following table:
 
HRGN PathToRegion ()
 If successful, returns a region created from the closed path in this DC; otherwise, returns 0.
 
virtual HDC GetAttributeHDC () const
 Returns the attributes of the DC object.
 
HDC GetHDC () const
 Return the handle of the device context.
 

Protected Member Functions

DOCINFOGetDocInfo ()
 Return the DOCINFO structure.
 
void SetDocInfo (const DOCINFO &docinfo)
 Sets the DOCINFO structure.
 
- Protected Member Functions inherited from owl::TCreatedDC
 TCreatedDC ()
 Creates a device context (DC) for the given device.
 
- Protected Member Functions inherited from owl::TDC
 TDC (HDC handle, TAutoDelete autoDelete)
 Constructor for use by derived classes only.
 
void Init ()
 Sets OrgBrush, OrgPen, OrgFont, OrgBitmap, and OrgPalette to 0, and sets ShouldDelete to true.
 
void CheckValid (uint resId=IDS_GDIFAILURE)
 
- Protected Member Functions inherited from owl::TGdiBase
void CheckValid (uint resId=IDS_GDIFAILURE)
 
 TGdiBase ()
 This default constructor sets Handle to 0 and ShouldDelete to true.
 
 TGdiBase (HANDLE handle, TAutoDelete autoDelete=NoAutoDelete)
 Initializes members to given values, and validates the handle.
 

Additional Inherited Members

- Public Types inherited from owl::TDC
enum  TFlag {
  Left = 0x0001 , Top = 0x0002 , Right = 0x0004 , Bottom = 0x0008 , TopLeft = Top | Left , TopRight = Top | Right , BottomLeft = Bottom | Left , BottomRight = Bottom | Right , Rect = Top | Left | Bottom | Right , Diagonal = 0x0010 ,
  Fill = 0x0800 , Soft = 0x1000 , Adjust = 0x2000 , Flat = 0x4000 , Mono = 0x8000
}
 Which edge(s) to draw. ctor defaults to all 4. More...
 
enum  TStyle {
  None , Plain , Raised , Recessed , Embossed , Grooved , ButtonUp , ButtonDn , WndRaised , WndRecessed ,
  WellSet , ButtonUp3x , ButtonDn3x
}
 Enumeration describing hilevel border styles. More...
 
enum  TEdge { RaisedOuter = 0x01 , SunkenOuter = 0x02 , RaisedInner = 0x04 , SunkenInner = 0x08 , EdgeOuter = 0x03 , EdgeInner = 0x0C , EdgeRaised = RaisedOuter | RaisedInner , EdgeSunken = SunkenOuter | SunkenInner , EdgeEtched = SunkenOuter | RaisedInner , EdgeBump = RaisedOuter | SunkenInner }
 Enumeration describing the type of edge to be drawn. More...
 
- Static Protected Member Functions inherited from owl::TGdiBase
static void _CheckValid (HANDLE handle, uint resId=IDS_GDIFAILURE)
 
- Protected Attributes inherited from owl::TDC
HANDLE Handle
 < make this function available to derivatives
 
bool ShouldDelete
 < The handle of this DC. Uses the base class's handle (TGdiBase::Handle.)
 
- Protected Attributes inherited from owl::TGdiBase
HANDLE Handle
 GDI handle of this object.
 
bool ShouldDelete
 Should object delete GDI handle in dtor?
 

Detailed Description

A DC class that provides access to a printer.

Definition at line 874 of file dc.h.

Constructor & Destructor Documentation

◆ TPrintDC() [1/2]

owl::TPrintDC::TPrintDC ( HDC handle,
TAutoDelete autoDelete = NoAutoDelete )

Creates a TPrintDC object for the DC given by handle.

Definition at line 66 of file printdc.cpp.

References _T.

◆ TPrintDC() [2/2]

owl::TPrintDC::TPrintDC ( const tstring & device,
const DEVMODE * initData = nullptr )

Creates a TPrintDC object for the given printer device name and initialization data.

Pass nullptr for initData to use the default initializations specified by the user.

Definition at line 80 of file printdc.cpp.

References _T.

Member Function Documentation

◆ AbortDoc()

int owl::TPrintDC::AbortDoc ( )
inline

Aborts the current print job on this printer and erases everything drawn since the last call to StartDoc.

AbortDoc calls the user-defined function set with TPrintDC::SetAbortProc to abort a print job because of error or user intervention. TPrintDC::EndDoc should be used to terminate a successfully completed print job. If successful, AbortDoc returns a positive or zero value; otherwise a negative value is returned.

Definition at line 3778 of file dc.h.

References owl::TDC::GetHDC().

◆ BandInfo()

int owl::TPrintDC::BandInfo ( TBandInfo & bandInfo)
inline

Retrieves information about the banding capabilities of this device, and copies it to the given bandInfo structure.

If successful, returns a positive value; otherwise the return value is a system error code.

Definition at line 3728 of file dc.h.

References Escape().

◆ EndDoc()

int owl::TPrintDC::EndDoc ( )
inline

Ends the current print job on this printer.

EndDoc should be called immediately after a successfully completed print job. TPrintDC::AbortDoc should be used to terminate a print job because of error or user intervention. If successful, EndDoc returns a positive or zero value; otherwise a negative value is returned.

Definition at line 3790 of file dc.h.

References owl::TDC::GetHDC().

◆ EndPage()

int owl::TPrintDC::EndPage ( )
inline

Tells this printer's device driver that the application has finished writing to a page.

If successful, EndPage returns a positive value; otherwise a negative or zero value is returned. Possible failure values are listed below:

  • SP_ERROR General error.
  • SP_APPABORT Job terminated because the application's print-canceling function returned 0.
  • SP_USERABORT User terminated the job.
  • SP_OUTOFDISK Insufficient disk space for spooling.
  • SP_OUTOFMEMORY Insufficient memory for spooling.

Definition at line 3762 of file dc.h.

References owl::TDC::GetHDC(), and owl::TDC::RestoreObjects().

◆ Escape()

int owl::TPrintDC::Escape ( int esc,
int count = 0,
const void * inData = nullptr,
void * outData = nullptr )
inline

Allows applications to access the capabilities of a particular device that are not directly available through the GDI of this DC.

The Escape call is specified by setting a mnemonic value in the escape argument. In Win32 the use of Escape with certain escape values has been replaced by specific functions. The names of these new functions are based on the corresponding escape mnemonic, as shown in the following table:

  • ABORTDOC Superseded by TPrintDC_AbortDoc in Win32.
  • BANDINFO Obsolete in Win32. Because all printer drivers for Windows version 3.1 and later set the text flag in every band, this escape is useful only for older printer drivers.
  • BEGIN_PATH No changes for Win32. This escape is specific to PostScript printers.
  • CLIP_TO_PATH No changes for Win32. This escape is specific to PostScript printers.
  • DEVICEDATA Superseded in Win32. Applications should use the PASSTHROUGH escape to achieve the same functionality.
  • DRAFTMODE Superseded in Win32. Applications can achieve the same functionality by setting the dmPrintQuality member of the DEVMODE structure to DMRES_DRAFT and passing this structure to the CreateDC function.
  • DRAWPATTERNRECT No changes for Win32.
  • ENABLEDUPLEX Superseded in Win32. Applications can achieve the same functionality by setting the dmDuplex member of the DEVMODE structure and passing this structure to the CreateDC function.
  • ENABLEPAIRKERNING No changes for Win32.
  • ENABLERELATIVEWIDTHS No changes for Win32.
  • ENDDOC Superseded by TPrintDC_EndDoc in Win32.
  • END_PATH No changes for Win32. This escape is specific to PostScript printers.
  • ENUMPAPERBINS Superseded in Win32. Applications can use TPrintDC::DeviceCapabilities to achieve the same functionality.
  • ENUMPAPERMETRICS Superseded in Win32. Applications can use TPrintDC::DeviceCapabilities to achieve the same functionality.
  • EPSPRINTING No changes for Win32. This escape is specific to PostScript printers.
  • EXT_DEVICE_CAPS Superseded in Win32. Applications can use TDC::GetDeviceCaps to achieve the same functionality. This escape is specific to PostScript printers.
  • EXTTEXTOUT Superseded in Win32. Applications can use TDC::ExtTextOut to achieve the same functionality. This escape is not supported by the version 3.1 PCL driver.
  • FLUSHOUTPUT Removed for Win32.
  • GETCOLORTABLE Removed for Win32.
  • GETEXTENDEDTEXTMETRICS No changes for Win32. Support for this escape might change in future versions of Windows.
  • GETEXTENTTABLE Superseded in Win32. Applications can use GetCharWidth to achieve the same functionality. This escape is not supported by the version 3.1 PCL or PostScript drivers.
  • GETFACENAME No changes for Win32. This escape is specific to PostScript printers.
  • GETPAIRKERNTABLE No changes for Win32.
  • GETPHYSPAGESIZE No changes for Win32. Support for this escape might change in future versions of Windows.
  • GETPRINTINGOFFSET No changes for Win32. Support for this escape might change in future versions of Windows.
  • GETSCALINGFACTOR No changes for Win32. Support for this escape might change in future versions of Windows.
  • GETSETPAPERBINS Superseded in Win32. Applications can achieve the same functionality by calling TPrintDC::DeviceCapabilities to find the number of paper bins, calling ::ExtDeviceMode to find the current bin, and then setting the dmDefaultSource member of the DEVMODE structure and passing this structure to the CreateDC function. GETSETPAPERBINS changes the paper bin only for the current device context. A new device context will use the system-default paper bin until the bin is explicitly changed for that device context.
  • GETSETPAPERMETRICS Obsolete in Win32. Applications can use TPrintDC::DeviceCapabilities and ::ExtDeviceMode to achieve the same functionality.
  • GETSETPAPERORIENT Obsolete in Win32. Applications can achieve the same functionality by setting the dmOrientation member of the DEVMODE structure and passing this structure to the CreateDC function. This escape is not supported by the Windows 3.1 PCL driver.
  • GETSETSCREENPARAMS No changes for Win32.
  • GETTECHNOLOGY No changes for Win32. Support for this escape might change in future versions of Windows. This escape is not supported by the Windows 3.1 PCL driver.
  • GETTRACKKERNTABLE No changes for Win32.
  • GETVECTORBRUSHSIZE No changes for Win32. Support for this escape might change in future versions of Windows.
  • GETVECTORPENSIZE No changes for Win32. Support for this escape might change in future versions of Windows.
  • MFCOMMENT No changes for Win32.
  • NEWFRAME No changes for Win32. Applications should use StartPage and EndPage instead of this escape. Support for this escape might change in future versions of Windows.
  • NEXTBAND No changes for Win32. Support for this escape might change in future versions of Windows.
  • PASSTHROUGH No changes for Win32.
  • QUERYESCAPESUPPORT No changes for Win32.
  • RESTORE_CTM No changes for Win32. This escape is specific to PostScript printers.
  • SAVE_CTM No changes for Win32. This escape is specific to PostScript printers.
  • SELECTPAPERSOURCE Obsolete in Win32. Applications can achieve the same functionality by using TPrintDC::DeviceCapabilities.
  • SETABORTPROC Superseded in Win32 by SetAbortProc. See TPrintDC::SetAbortProc.
  • SETALLJUSTVALUES No changes for Win32. Support for this escape might change in future versions of Windows. This escape is not supported by the Windows 3.1 PCL driver.
  • SET_ARC_DIRECTION No changes for Win32. This escape is specific to PostScript printers.
  • SET_BACKGROUND_COLOR No changes for Win32. Applications should use SetBkColor instead of this escape. Support for this escape might change in future versions of Windows.
  • SET_BOUNDS No changes for Win32. This escape is specific to PostScript printers.
  • SETCOLORTABLE No changes for Win32. Support for this escape might change in future versions of Windows.
  • SETCOPYCOUNT Superseded in Win32. An application should call TPrintDC::DeviceCapabilities, specifying DC_COPIES for the capability parameter, to find the maximum number of copies the device can make. Then the application can set the number of copies by passing to the CreateDC function a pointer to the DEVMODE structure.
  • SETKERNTRACK No changes for Win32.
  • SETLINECAP No changes for Win32. This escape is specific to PostScript printers.
  • SETLINEJOIN No changes for Win32. This escape is specific to PostScript printers.
  • SETMITERLIMIT No changes for Win32. This escape is specific to PostScript printers.
  • SET_POLY_MODE No changes for Win32. This escape is specific to PostScript printers.
  • SET_SCREEN_ANGLE No changes for Win32.
  • SET_SPREAD No changes for Win32.
  • STARTDOC Superseded in Win32. Applications should call StartDoc instead of this escape.
  • TRANSFORM_CTM No changes for Win32. This escape is specific to PostScript printers.

Escape calls are translated and sent to the printer device driver. The inData buffer lets you supply any data needed for the escape. You must set count to the size (in bytes) of the inData buffer. If no input data is required, inData and count should be set to the default value of 0. Similarly, you must supply an outData buffer for those Escape calls that retrieve data. If the escape does not supply output, set outData to the default value of 0.

Definition at line 3673 of file dc.h.

References owl::esc(), and owl::TDC::GetHDC().

◆ GetDocInfo()

DOCINFO & owl::TPrintDC::GetDocInfo ( )
inlineprotected

Return the DOCINFO structure.

Definition at line 3528 of file dc.h.

◆ NextBand()

int owl::TPrintDC::NextBand ( TRect & rect)
inline

Tells this printer's device driver that the application has finished writing to a band.

The device driver sends the completed band to the Print Manager and copies the coordinates of the next band in the rectangle specified by rect. If successful, NextBand returns a positive value; otherwise the return value is a system error code. Possible failure values are listed below:

  • SP_ERROR General error.
  • SP_APPABORT Job terminated because the application's print-canceling function returned 0.
  • SP_USERABORT User terminated the job.
  • SP_OUTOFDISK Insufficient disk space for spooling.
  • SP_OUTOFMEMORY Insufficient memory for spooling.

Definition at line 3746 of file dc.h.

References Escape().

◆ QueryEscSupport()

uint owl::TPrintDC::QueryEscSupport ( int escapeNum)
inline

Returns true if the escape specified by escapeNum is implemented on this device; otherwise false.

Definition at line 3800 of file dc.h.

References Escape().

◆ SetAbortProc()

int owl::TPrintDC::SetAbortProc ( ABORTPROC proc)
inline

Establishes the user-defined proc as the printer-abort function for this printer.

This function is called by TPrintDC::AbortDoc to cancel a print job during spooling. SetAbortProc returns a positive (nonzero) value if successful; otherwise it returns a negative (nonzero) value.

Definition at line 3686 of file dc.h.

References owl::TDC::GetHDC().

◆ SetCopyCount()

int owl::TPrintDC::SetCopyCount ( int reqestCopies,
int & actualCopies )
inline

Sets requestCount to the number of uncollated copies of each page that this printer should print.

The actual number of copies to be printed is copied to actualCount. The actual count will be less than the requested count if the latter exceeds the maximum allowed for this device. SetCopyCount returns 1 if successful; otherwise, it returns 0.

Definition at line 3812 of file dc.h.

References Escape().

◆ SetDocInfo()

void owl::TPrintDC::SetDocInfo ( const DOCINFO & docinfo)
inlineprotected

Sets the DOCINFO structure.

Definition at line 3536 of file dc.h.

◆ StartDoc() [1/2]

int owl::TPrintDC::StartDoc ( const tstring & docName,
const tstring & output = tstring{} )
inline

Definition at line 892 of file dc.h.

◆ StartDoc() [2/2]

int owl::TPrintDC::StartDoc ( LPCTSTR docName,
LPCTSTR output = nullptr )
inline

Starts a print job for the named document on this printer DC.

If successful, StartDoc returns a positive value, the job ID for the document. If the call fails, the value SP_ERROR is returned. Detailed error information can be obtained by calling GetLastError. This function replaces the earlier Escape call with value STARTDOC.

Definition at line 3698 of file dc.h.

References owl::TDC::GetHDC().

◆ StartPage()

int owl::TPrintDC::StartPage ( )
inline

Prepares this device to accept data.

The system disables ResetDC between calls to StartPage and EndPage, so that applications cannot change the device mode except at page boundaries. If successful, StartPage returns a positive value; otherwise, a negative or zero value is returned.

Definition at line 3716 of file dc.h.

References owl::TDC::GetHDC().


The documentation for this class was generated from the following files: