15#if defined(BI_HAS_PRAGMA_ONCE)
73 TopRight = Top | Right,
74 BottomLeft = Bottom | Left,
75 BottomRight = Bottom | Right,
76 Rect = Top | Left | Bottom | Right,
114 EdgeRaised = RaisedOuter | RaisedInner,
115 EdgeSunken = SunkenOuter | SunkenInner,
116 EdgeEtched = SunkenOuter | RaisedInner,
117 EdgeBump = RaisedOuter | SunkenInner
130 operator HDC()
const;
141 virtual int SaveDC()
const;
142 virtual bool RestoreDC(
int savedDC = -1);
143 virtual int GetDeviceCaps(
int index)
const;
149 void SelectObject(
const TPen&
pen);
150 virtual void SelectObject(
const TFont&
font);
153 virtual void SelectStockObject(
int index);
156 virtual void RestoreFont();
157 void RestorePalette();
158 void RestoreBitmap();
159 void RestoreTextBrush();
160 void RestoreObjects();
172 int RealizePalette();
176 uint GetSystemPaletteUse()
const;
177 int SetSystemPaletteUse(
int usage);
181 TColor GetBkColor()
const;
183 int GetBkMode()
const;
184 int SetBkMode(
int mode);
185 int GetPolyFillMode()
const;
186 int SetPolyFillMode(
int mode);
188 int SetROP2(
int mode);
189 int GetStretchBltMode()
const;
190 int SetStretchBltMode(
int mode);
191 TColor GetTextColor()
const;
198 int GetMapMode()
const;
199 virtual int SetMapMode(
int mode);
205 TPoint GetViewportOrg()
const;
210 TSize GetViewportExt()
const;
216 TPoint GetWindowOrg()
const;
221 TSize GetWindowExt()
const;
236 TRect GetClipBox()
const;
238 int ExcludeUpdateRgn(
HWND wnd);
239 int IntersectClipRect(
const TRect&
rect);
256 bool RectVisible(
const TRect&
rect)
const;
278 bool MoveTo(
int x,
int y);
284 bool DrawIcon(
int x,
int y,
const TIcon&
icon);
288 bool DrawIcon(
int x,
int y,
const TIcon&
icon,
int w,
int h,
305 bool InvertRect(
int x1,
int y1,
int x2,
int y2);
307 bool DrawFocusRect(
int x1,
int y1,
int x2,
int y2);
314 bool TextRect(
int x1,
int y1,
int x2,
int y2);
340 bool Chord(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
346 bool Ellipse(
int x1,
int y1,
int x2,
int y2);
350 bool LineTo(
int x,
int y);
362 bool Rectangle(
int x1,
int y1,
int x2,
int y2);
366 bool RoundRect(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
373 TColor GetPixel(
int x,
int y)
const;
399#if defined(OWL5_COMPAT)
433 virtual bool TextOut(
int x,
int y,
434 const tstring& str,
int count = -1);
436 bool TextOut(
const TPoint& p,
437 const tstring& str,
int count = -1);
440 const tstring& str,
int count = -1,
const int *
dx =
nullptr);
443 const tstring& str,
int count = -1,
const int *
dx =
nullptr);
445 virtual bool TabbedTextOut(
const TPoint& p,
449 bool TabbedTextOut(
const TPoint& p,
457 virtual int DrawTextEx(
LPTSTR str,
int count,
TRect* =
nullptr,
475 uint GetTextAlign()
const;
479 int GetTextCharacterExtra()
const;
481 int SetTextCharacterExtra(
int extra);
485 int GetTextFaceLength()
const;
505 bool GetAspectRatioFilter(
TSize& size)
const;
530 bool StrokeAndFillPath();
531 bool SelectClipPath(
int mode);
536 virtual HDC GetAttributeHDC()
const;
545 using TGdiBase::CheckValid;
546 using TGdiBase::Handle;
547 using TGdiBase::ShouldDelete;
699 LPCTSTR description =
nullptr);
706 bool Comment(
uint bytes,
const void*
data);
708 bool IsEnhanced()
const;
730#if defined(OWL5_COMPAT)
760#if defined(OWL5_COMPAT)
797#if defined(OWL5_COMPAT)
879#if defined(OWL5_COMPAT)
886 int Escape(
int escape,
int count=0,
const void*
inData=
nullptr,
897 int NextBand(TRect&
rect);
905#if defined(OWL5_COMPAT)
942 TPrintDC(
const TPrintDC&);
960#if !defined(OWL_METAFILE_H)
973inline TDC::operator
HDC()
const
992 return ::GetObjectType(
GetHDC()) != 0;
1056 return ::RealizePalette(
GetHDC());
1084 return ::GetSystemPaletteUse(
GetHDC());
1494 return ::ExcludeUpdateRgn(
GetHDC(), Wnd);
1692 return ::MoveToEx(
GetHDC(), x, y,
nullptr);
2127 return ::Ellipse(
GetHDC(), p.x, p.y, p.x+s.cx, p.y+s.cy);
2150 return ::LineTo(
GetHDC(), x, y);
2320 return ::Rectangle(
GetHDC(), p.x, p.y, p.x+s.cx, p.y+s.cy);
2360 return ::RoundRect(
GetHDC(), p.x, p.y, p.x+s.cx, p.y+s.cy,
rad.x,
rad.y);
2379 return ::GetPixel(
GetHDC(), x, y);
2524 return ::StretchBlt(
GetHDC(),
2623#if defined(OWL5_COMPAT)
2643 return ::TransparentBlt(
GetHDC(),
2698 dib.GetBits(),
dib.GetInfo(),
dib.Usage());
2756 return ::SetDIBitsToDevice(
2779 return ::SetDIBitsToDevice(
2783 dib.StartScan(),
dib.NumScans(),
2784 const_cast<void*
>(
dib.GetBits()),
2806 return ::StretchDIBits(
2829 return ::StretchDIBits(
2899 return TextOut(p.x, p.y, str, count);
2924 const tstring& str,
int count,
const int *
dx)
3351 return ::BeginPath(
GetHDC());
3368 return ::CloseFigure(
GetHDC());
3377 return ::EndPath(
GetHDC());
3387 return ::FlattenPath(
GetHDC());
3408 return ::WidenPath(
GetHDC());
3419 return ::FillPath(
GetHDC());
3428 return ::StrokePath(
GetHDC());
3439 return ::StrokeAndFillPath(
GetHDC());
3459 return ::SelectClipPath(
GetHDC(), mode);
3468 return ::PathToRegion(
GetHDC());
3516 return ::GdiComment(
GetHDC(), bytes,
reinterpret_cast<const BYTE*
>(
data));
3703#if (WINVER >= 0x0400)
3704 DocInfo.lpszDatatype =
nullptr;
3707 return ::StartDoc(
GetHDC(), &DocInfo);
3719 return ::StartPage(
GetHDC());
3766 return ::EndPage(
GetHDC());
3780 return ::AbortDoc(
GetHDC());
3792 return ::EndDoc(
GetHDC());
#define PRECONDITION(condition)
TBitmap is the GDI bitmap class derived from TGdiObject.
The GDI Brush class is derived from TGdiObject.
A device context class derived from TWindowDC, TClientDC provides access to the client area owned by ...
Class wrapper for management of color values.
An abstract TDC class, TCreatedDC serves as the base for DCs that are created and deleted.
TCursor, derived from TGdiBase, represents the GDI cursor object class.
TDC is the root class for GDI DC wrappers.
int GetBkMode() const
Returns the background mode of this DC, either OPAQUE or TRANSPARENT.
int GetTextFaceLength() const
Retrieves the length of the typeface name for the current font on this DC.
HBITMAP CreateDIBSection(const BITMAPINFO &info, uint usage, void **bits, HANDLE section=0, uint32 offset=0)
Create a fast DIB under Win32.
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,...
uint SetTextAlign(uint flags)
Sets the text-alignment flags 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 ...
bool FillSolidRect(const TRect &r, const TColor &color)
int OffsetClipRgn(const TPoint &delta)
Moves the clipping region of this DC by the x- and y-offsets specified in delta.
TStyle
Enumeration describing hilevel border styles.
@ ButtonDn
Button in down position.
@ Recessed
Status field style recessed.
@ WndRecessed
Input field & other window recessed.
@ WellSet
Well option set (auto grows + 1) // !CQ W4 cant do.
@ Grooved
Grouping groove.
@ WndRaised
Raised window outer+inner edge.
@ None
No border painted at all.
@ ButtonUp
Button in up position.
@ Raised
Status field style raised.
@ Embossed
Grouping raised emboss bead.
@ Plain
Plain plain window frame.
@ ButtonUp3x
Button in up position, Win 3.x style.
TEdge
Enumeration describing the type of edge to be drawn.
TColor GetBkColor() const
Returns the current background color of this DC.
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.
int EnumFonts(const tstring &facename, OLDFONTENUMPROC callback, void *data) const
TPoint GetWindowOrg() const
Places in point the x- and y-coordinates of the origin of the window associated with this DC.
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 GetCharWidth(uint firstChar, uint lastChar, int *buffer)
Retrieves the widths in logical units for a consecutive sequence of characters in the current font fo...
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.
int ExcludeClipRect(const TRect &rect)
Creates a new clipping region for this DC.
int EnumFontFamilies(const tstring &family, FONTENUMPROC proc, void *data) const
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 th...
bool PlayEnhMetaFile(const TEnhMetaFilePict &metaFile, const TRect *rect)
Play the enhanced metafile onto this device context.
bool StrokeAndFillPath()
Closes any open figures in the current path of this DC, strokes the outline of the path using the cur...
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 FlattenPath()
Transforms any curves in the currently selected path of this DC.
bool InvertRgn(const TRegion ®ion)
Inverts the given region, on this DC.
bool FrameRgn(const TRegion ®ion, const TBrush &brush, const TSize &brushSize)
Draws a border on this DC around the given region, region, using the given brush, brush.
bool PolylineTo(const TPoint *points, int count)
Draws one or more connected line segments on this DC using the currently selected pen object.
bool SetBrushOrg(const TPoint &origin, TPoint *oldOrg=nullptr)
Sets the origin of the currently selected brush of this DC with the given origin value.
bool FillRgn(const TRegion ®ion, const TBrush &brush)
Fills the given region on this DC using the specified brush.
bool PolyBezierTo(const TPoint *points, int count)
Draws one or more connected cubic Beziers splines through the points specified in the points array us...
bool GetBrushOrg(TPoint &point) const
Places in point the current brush origin of this DC.
bool PaintRgn(const TRegion ®ion)
Paints the given rectangle using the currently selected brush for this DC.
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...
bool DrawCursor(int x, int y, const TCursor &cursor)
bool SetWorldTransform(XFORM &xform)
Sets a two-dimensional linear transformation, given by the xform structure, between world space and p...
int GetPolyFillMode() const
Returns the current polygon-filling mode for this DC, either ALTERNATE or WINDING.
TSize GetViewportExt() const
The first version retrieves this DC's current viewport's x- and y-extents (in device units) and place...
TEXTMETRIC GetTextMetrics() const
Functional style overload.
bool PtVisible(const TPoint &point) const
Returns true if the given point lies within the clipping region of this DC; otherwise,...
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 speci...
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 char...
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...
bool GetAspectRatioFilter(TSize &size) const
Retrieves the setting of the current aspect-ratio filter for this DC.
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 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 polyg...
bool BeginPath()
Opens a new path bracket for this DC and discards any previous paths from this DC.
int SetSystemPaletteUse(int usage)
Changes the usage of this DC's system palette.
int GetTextCharacterExtra() const
If successful, returns the current intercharacter spacing, in logical units, for this DC; otherwise,...
int RemoveClipRgn()
Removes the device context's clipping region.
bool GetDCOrg(TPoint &point) const
Obtains the final translation origin for this device context and places the value in point.
bool DPtoLP(TPoint *points, int count=1) const
Converts each of the count points in the points array from device points to logical points.
int GetKerningPairs(int pairs, KERNINGPAIR *krnPair)
Retrieves kerning pairs for the current font of this DC up to the number specified in pairs and copie...
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).
TFlag
Which edge(s) to draw. ctor defaults to all 4.
int EnumObjects(uint objectType, GOBJENUMPROC proc, void *data) const
Enumerates the pen or brush objects available for this DC.
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...
bool WidenPath()
Redefines the current, closed path on this DC as the area that would be painted if the path were stro...
bool SetTextJustification(int breakExtra, int breakCount)
When text strings are displayed using TDC::TextOut and TDC::ExtTextOut, sets the number of logical un...
bool SetMiterLimit(float newLimit, float *oldLimit=nullptr)
Sets the limit of miter joins to newLimit and puts the previous value in oldLimit.
int EnumFonts(LPCTSTR faceName, OLDFONTENUMPROC callback, void *data) const
Enumerates the fonts available on this DC for the given faceName.
int EnumEnhMetaFile(const TEnhMetaFilePict &metaFile, ENHMFENUMPROC callback, void *data, const TRect *rect) const
Enumerate through the enhanced metafile records.
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.
int SetROP2(int mode)
Sets the current foreground mix mode mode of this DC to the given mode value and returns the previous...
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 TextRect(int x1, int y1, int x2, int y2)
Fills the given rectangle, clipping any text to the rectangle.
bool DrawFocusRect(int x1, int y1, int x2, int y2)
Draws the given rectangle on this DC in the style used to indicate focus.
virtual HDC GetAttributeHDC() const
Returns the attributes of the DC object.
uint SetBoundsRect(TRect &bounds, uint flags)
Controls the accumulation of bounding rectangle information for this DC.
tstring GetTextFace() const
virtual TColor SetBkColor(const TColor &color)
Sets the current background color of this DC to the given color value or the nearest available.
int IntersectClipRect(const TRect &rect)
Creates a new clipping region for this DC's window by forming the intersection of the current region ...
void UpdateColors()
Updates the client area of this DC by matching the current colors in the client area to the system pa...
TSize GetWindowExt() const
Retrieves this DC's window current x- and y-extents (in device units).
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...
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.
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 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 ...
TPoint GetViewportOrg() const
The first version sets in the point argument the x- and y-extents (in device-units) of this DC's view...
int SelectClipRgn(const TRegion ®ion)
Selects the given region as the current clipping region for this DC.
bool RectVisible(const TRect &rect) const
Returns true if any part of the given rectangle, rect, lies within the clipping region of this DC; ot...
uint GetOutlineTextMetrics(uint data, OUTLINETEXTMETRIC &otm)
Retrieves metric information for TrueType fonts on this DC and copies it to the given array of OUTLIN...
int GetClipRgn(TRegion ®ion) const
Retrieves this DC's current clip-region and, if successful, places a copy of it in the region argumen...
bool LineTo(int x, int y)
Draws a line on this DC using the current pen object.
void RestoreObjects()
Restores all the original GDI objects to this DC.
bool FillPath()
Closes any open figures in the current path of this DC and fills the path's interior using the curren...
TColor GetPixel(int x, int y) const
Returns the color of the pixel at the given location.
int GetStretchBltMode() const
Returns the current stretching mode for this DC: BLACKONWHITE, COLORONCOLOR, or WHITEONBLACK.
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 char...
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 ent...
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 ...
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...
int SetPolyFillMode(int mode)
Description Sets the polygon-filling mode for this DC to the given mode value, either ALTERNATE or WI...
bool ModifyWorldTransform(XFORM &xform, uint32 mode)
Changes the current world transformation for this DC using the given xform and mode arguments.
HRGN PathToRegion()
If successful, returns a region created from the closed path in this DC; otherwise,...
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 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 StrokePath()
Renders the current, closed path on this DC and uses the DC's current pen.
bool PolyBezier(const TPoint *points, int count)
Draws one or more connected cubic Bezier splines through the points specified in the points array usi...
bool DrawIcon(int x, int y, const TIcon &icon)
Draws the given icon on 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 EnumMetaFile(const TMetaFilePict &metaFile, MFENUMPROC callback, void *data) const
Enumerates the GDI calls within the given metaFile.
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.
uint32 SetMapperFlags(uint32 flag)
Alters the algorithm used by the font mapper when mapping logical fonts to physical fonts on this DC.
bool SelectClipPath(int mode)
Selects the current path on this DC as a clipping region, combining any existing clipping region usin...
TColor GetTextColor() const
Returns the current text color of this DC.
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.
void PlayEnhMetaFileRecord(HANDLETABLE &handletable, ENHMETARECORD &metaRecord, uint count)
Play one record from the enhanced metafile onto this DC.
uint GetTextAlign() const
If successful, returns the current text-alignment flags for this DC; otherwise, returns the value GDI...
int EnumFontFamilies(LPCTSTR family, FONTENUMPROC proc, void *data) const
Enumerates the fonts available to this DC in the font family specified by family.
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 le...
int SelectClipRgn(HRGN r=0)
Selects the given region as the current clipping region for the device context.
bool PlayMetaFile(const TMetaFilePict &metaFile)
Plays the contents of the given metaFile on this DC.
int RealizePalette()
Maps to the system palette the logical palette entries selected into this DC.
int SetBkMode(int mode)
Sets the background mode to the given mode argument, which can be either OPAQUE or TRANSPARENT.
bool IsDC() const
Validation routine - used mainly for diagnostic purposes.
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...
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 b...
bool InvertRect(int x1, int y1, int x2, int y2)
Inverts the given rectangle, rect, on this DC.
bool GetCharABCWidths(uint firstChar, uint lastChar, ABC *abc)
Retrieves the widths of consecutive characters in the range firstChar to lastChar from the current Tr...
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,...
bool PatBlt(int x, int y, int w, int h, uint32 rop=PATCOPY)
bool GetCurrentPosition(TPoint &point) const
Reports in point the logical coordinates of this DC's current position.
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 seg...
HANDLE Handle
< make this function available to derivatives
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 objec...
TRect GetClipBox() const
Places the current clip box size of this DC in rect.
int SetStretchBltMode(int mode)
Sets the stretching mode of this DC to the given mode value and returns the previous mode.
uint GetSystemPaletteUse() const
Determines whether this DC has access to the full system palette.
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 EndPath()
Closes the path bracket and selects the path it defines into this DC.
bool CloseFigure()
Closes an open figure in this DC's open path bracket by drawing a line from the current position to t...
HDC GetHDC() const
Return the handle of the device context.
int SetTextCharacterExtra(int extra)
If successful, sets the current intercharacter spacing to extra, in logical units,...
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...
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.
int GetMapMode() const
If successful, returns the current window mapping mode of this DC; otherwise, returns 0.
bool Polygon(const TPoint *points, int count)
int GetROP2() const
Returns the current drawing (raster operation) mode of this DC.
bool GetBoundsRect(TRect &bounds, uint16 flags) const
Reports in bounds the current accumulated bounding rectangle of this DC or of the Windows manager,...
A DC class that provides access to the desktop window's client area which is the window behind all ot...
A DC class that provides access to DIBs using DIBSection, WinG, or the DIB.DRV driver.
Pseudo-GDI object Device Independent Bitmap (DIB) class.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
Root and abstract class for Windows object wrappers.
Derived from TCreatedDC, TIC is a device context (DC) class that provides a constructor for creating ...
TIcon, derived from TGdiObject, represents the GDI object icon class.
A device context (DC) class derived from TCreatedDC, TMemoryDC provides access to a memory DC.
A DC class that provides access to the non-client area owned by a window.
A DC class that wraps begin and end paint calls for use in an WM_PAINT response function.
PAINTSTRUCT Ps
The paint structure associated with this TPaintDC object.
HWND Wnd
The associated window handle.
TPalette is the GDI Palette class derived from TGdiObject.
TPen is derived from TGdiObject.
TPoint is a support class, derived from tagPOINT.
A DC class that provides access to a printer.
int AbortDoc()
Aborts the current print job on this printer and erases everything drawn since the last call to Start...
uint QueryEscSupport(int escapeNum)
Returns true if the escape specified by escapeNum is implemented on this device; otherwise false.
void SetDocInfo(const DOCINFO &docinfo)
Sets the DOCINFO structure.
int StartPage()
Prepares this device to accept 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...
int StartDoc(LPCTSTR docName, LPCTSTR output=nullptr)
Starts a print job for the named document on this printer DC.
DOCINFO & GetDocInfo()
Return the DOCINFO structure.
int SetAbortProc(ABORTPROC proc)
Establishes the user-defined proc as the printer-abort function for this printer.
int StartDoc(const tstring &docName, const tstring &output=tstring{})
int EndDoc()
Ends the current print job on this printer.
int SetCopyCount(int reqestCount, int &actualCount)
Sets requestCount to the number of uncollated copies of each page that this printer should print.
int BandInfo(TBandInfo &bandInfo)
Retrieves information about the banding capabilities of this device, and copies it to the given bandI...
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.
TRect is a mathematical class derived from tagRect.
TRegion, derived from TGdiObject, represents GDI abstract shapes or regions.
Derived from TWindowDC, TScreenDC is a DC class that provides direct access to the screen bitmap.
The tagSIZE struct is defined as.
Derived from TDC, TWindowDC is a device context (DC) class that provides access to the entire area ow...
HWND Wnd
Holds a handle to the window owned by this device context.
Definition of base most abstract GDI object class, and associated exception class.
Definition of abstract GDI object class and derived classes.
Classes for window system geometry.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
Object Windows Library (OWLNext Core)
bool SetViewportExt(HDC hdc, int w, int h)
bool SetWindowExt(HDC hdc, int w, int h)
bool SetWindowOrg(HDC hdc, int w, int h)
bool SetViewportOrg(HDC hdc, int x, int y)
Equivalent to BANDINFOSTRUCT.