OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
preview.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1992, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Implementation of print preview classes
7//----------------------------------------------------------------------------
8#include <owl/pch.h>
9#include <owl/preview.h>
10#include <owl/printer.h>
11#include <owl/gdiobjec.h>
12#include <owl/dc.h>
13#include <owl/printdia.h>
14#include <math.h>
15
16//
17// Some inlines to provide platform independence since we drop directly to API
18// calls to implement some of TPrintPreviewDC.
19//
20 inline bool SetWindowExt(HDC hdc, int w, int h) {return ::SetWindowExtEx(hdc, w, h, nullptr);}
21 inline bool SetWindowOrg(HDC hdc, int w, int h) {return ::SetWindowOrgEx(hdc, w, h, nullptr);}
22 inline bool SetViewportExt(HDC hdc, int w, int h) {return ::SetViewportExtEx(hdc, w, h, nullptr);}
23 inline bool SetViewportOrg(HDC hdc, int x, int y) {return ::SetViewportOrgEx(hdc, x, y, nullptr);}
24
25namespace owl {
26
28
29//
30/// Constructs a basic Preview DC.
31//
38
39//
40/// Overriden to return printer's HDC.
41//
42HDC
44{
45 return PrnDC;
46}
47
48//
49/// TPrintPreviewDC's constructor takes a screen DC as well as a printer DC. The
50/// screen DC is passed to the inherited constructor while the printer DC is copied
51/// to the member, PrnDC.
52//
55 const TRect& client,
56 const TRect& clip)
57:
59 PrnFont(nullptr),
60 CurrentPreviewFont(nullptr)
61{
62 //
63 // Set the initial mode & extents for the screen dc
64 //
66 ::SetWindowExt(GetHDC(), client.Width(), client.Height());
67 ::SetViewportExt(GetHDC(), client.Width(), client.Height());
68
69 //
70 // Static call to virtual method, but some mapping must be done now.
71 //
72 ReScale();
73
74 //
75 // Assume clip rect is in device points - DPs are same in new viewport
76 //
79 SyncFont();
80}
81
82//
83/// Destroys a TPrintPreviewDC object.
84//
86{
87 // cleanup screen dc
88 //
90 delete CurrentPreviewFont;
91}
92
93//
94/// Selects the given font object into this DC.
95///
96/// Intercept setting of the printer font, making & keeping a copy of it and
97/// calling SyncFont if needed to recreate the preview font.
98//
99void
101{
102 if ((HFONT)newFont) {
103 LOGFONT lf = newFont.GetObject();
104
105 TFont* oldPreviewF = CurrentPreviewFont;
106 CurrentPreviewFont = new TFont(lf);
107
108 PrnDC.SelectObject(*CurrentPreviewFont);
109 delete oldPreviewF;
110
111 if ((HFONT)(*CurrentPreviewFont) != PrnFont) {
112 PrnFont = (HFONT)(*CurrentPreviewFont);
113 SyncFont();
114 }
115 }
116}
117
118//
119/// Retrieves a handle to a predefined stock font.
120//
121void
123{
125 switch (index) {
126 case ANSI_FIXED_FONT:
127 case ANSI_VAR_FONT:
129 case OEM_FIXED_FONT:
130 case SYSTEM_FONT:
131 case SYSTEM_FIXED_FONT: {
133 if (stockFont != PrnFont) {
134 PrnFont = stockFont;
135 SyncFont();
136 }
137 break;
138 }
139 default:
141 }
142}
143
144//
145/// Restores the original GDI font object to this DC.
146//
147void
155
156//
157/// GetDeviceCaps returns capability information, such as font and pitch attributes,
158/// about the printer DC. The index argument specifies the type of information
159/// required.
160//
161int
163{
164 switch (index) {
165 case CLIPCAPS:
166 case RASTERCAPS:
167 case CURVECAPS:
168 case LINECAPS:
169 case POLYGONALCAPS:
170 case TEXTCAPS: // report capabilities supported on both devices
171 return PrnDC.GetDeviceCaps(index) & TPrintDC::GetDeviceCaps(index);
172
173 // otherwise, report printer caps and let GDI sort out differences
174 default:
175 return PrnDC.GetDeviceCaps(index);
176 }
177}
178
179//
180//
181//
182inline int
184{
185 return tm.tmHeight < 0
186 ? tm.tmHeight
187 : -(tm.tmHeight - tm.tmInternalLeading);
188}
189
190/// Sets the screen font equal to the current printer font.
191//
192/// SyncFont performs a simple font match attempt, with a retry option if
193/// the GDI selected match is too different from the selected printer font.
194/// In print preview, matching the size of the characters is more important
195/// than matching their appearance. In most cases, the print preview will
196/// barely be legible anyway. Size is most important because you don't
197/// want character size differences to change the line breaks or page
198/// breaks of the on-screen document from what they would be on the
199/// printed page. This effect is minimized in this TPrintPreviewDC object,
200/// since info reports such as GetTextMetrics and GetTextExtent are always
201/// reported from the printer dc using the real font. Internal calculations
202/// should be the same for preview as for printing, but the output accuracy
203/// will depend upon the accuracy of font selection.
204///
205/// It is also possible to take over control of the text output functions
206/// through this DC object - the TextOut and other text methods are virtual.
207/// You can place each character on the preview screen yourself, if you
208/// desire more precision in character placement than GDI's font matching
209/// can provide. That's a lot of work, and a lot of code, and isn't
210/// necessary to meet the needs of most applications.
211///
212/// SyncFont is virtual so that you may substitute your own font matching
213/// algorythm with more font matching heuristics.
214//
215void
217{
218 //
219 // set screen font to match current printer font.
220 //
221 LOGFONT lf;
222 ::GetObject(PrnFont, sizeof(lf), &lf);
223
226
227 lf.lfHeight = GlyphHeight(tm);
228 lf.lfWidth = tm.tmAveCharWidth;
229 lf.lfWeight = tm.tmWeight;
230 lf.lfItalic = tm.tmItalic;
231 lf.lfUnderline = tm.tmUnderlined;
232 lf.lfStrikeOut = tm.tmStruckOut;
233 lf.lfCharSet = tm.tmCharSet;
234 lf.lfOutPrecision = OUT_TT_PRECIS;
235 lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
236 lf.lfQuality = DRAFT_QUALITY;
237
238 // Keep just the pitch (low 2 bits). Ignore the family
239 //
240 lf.lfPitchAndFamily = uint8((tm.tmPitchAndFamily & 0x0003) | FF_DONTCARE);
241 PrnDC.GetTextFace(sizeof(lf.lfFaceName)/sizeof(lf.lfFaceName[0]), lf.lfFaceName);
242
244
245 //
246 // if height isn't right, relax the font pitch and facename requirements
247 //
249 if (abs(abs(static_cast<int>(lf.lfHeight)) - abs(GlyphHeight(tm))) > 2) {
250 if (lf.lfPitchAndFamily & FF_DECORATIVE)
251 lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DECORATIVE;
252 else
253 lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
254 lf.lfFaceName[0] = 0;
256 }
257}
258
259//
260// Return the size of the given printer device in device units.
261//
262static TSize
263GetPageSizeInPixels(TPrintDC& d)
264{
265 return TSize(d.GetDeviceCaps(HORZRES), d.GetDeviceCaps(VERTRES));
266}
267
268//
269/// Maps the points of the printer DC to the screen DC. Sets the screen window
270/// extent equal to the maximum logical pointer of the printer DC.
271///
272/// It is assumed that the viewport extents of the screen DC
273/// are already set and represent the full previewed page.
274/// The window extents are set to the page size in logical units
275/// as defined by the printer DC.
276//
277void
279{
280 // Get the extents of the screen viewport in device units (pixels).
281 // This should represent the whole previewed page on the screen.
282
284
285 // Calculate the size of the previewed page in logical units.
286
287 TSize page = GetPageSizeInPixels(PrnDC);
290 TSize we(MulDiv(page.cx, pwe.cx, pve.cx), MulDiv(page.cy, pwe.cy, pve.cy));
291
292 // Set the mapping mode and scale.
293
295 ::SetWindowExtEx(GetHDC(), we.cx, we.cy, nullptr);
296 ::SetViewportExtEx(GetHDC(), ve.cx, ve.cy, nullptr);
297
298 // Set the origin for logical units.
299
300 ReOrg();
301}
302
303//
304/// Gets the x- and y- extents of the viewport, equalizes the logical and screen
305/// points, and resets the x- and y- extents of the viewport.
306//
307void
309{
310 // Get the viewport origin of the printer DC and transform it into
311 // screen device units. It is assumed that the viewport extents of
312 // the screen DC represent the whole previewed page.
313
315 TSize page = GetPageSizeInPixels(PrnDC);
316 TSize ve; ::GetViewportExtEx(GetHDC(), &ve); // screen extents
317 TPoint vo(MulDiv(pvo.x, ve.cx, page.cx), MulDiv(pvo.y, ve.cy, page.cy));
318
319 // Use the same logical origin as the printout.
320
322
323 // Set the origins.
324
325 ::SetWindowOrgEx(GetHDC(), wo.x, wo.y, nullptr);
326 ::SetViewportOrgEx(GetHDC(), vo.x, vo.y, nullptr);
327}
328
329//
330/// Sets the current background color of this DC to the given color value or the
331/// nearest available. Returns 0x80000000 if the call fails.
332//
333TColor
335{
336 TColor result = PrnDC.SetBkColor(color);
338 return result;
339}
340
341//
342/// Sets the current text color of this DC to the given color value. The text color
343/// determines the color displayed by TDC::TextOut and TDC::ExtTextOut.
344//
345TColor
347{
348 TColor result = PrnDC.SetTextColor(color);
350 return result;
351}
352
353//
354/// Sets the current window mapping mode of this DC to mode. Returns the previous
355/// mapping mode value. The mapping mode defines how logical coordinates are mapped
356/// to device coordinates. It also controls the orientation of the device's x- and
357/// y-axes.
358//
359int
361{
362 int result = PrnDC.SetMapMode(mode);
363 ReScale();
364 return result;
365}
366
367//
368/// Sets the printer DC's viewport origin to the given origin value, and saves the
369/// previous origin in oldOrg. Returns nonzero if the call is successful; otherwise
370/// returns 0.
371//
372bool
374{
375 bool result = PrnDC.SetViewportOrg(origin, oldOrg);
376 ReOrg();
377 return result;
378}
379
380//
381/// Modifies this DC's viewport origin relative to the current values. The delta x-
382/// and y-components are added to the previous origin and the resulting point
383/// becomes the new viewport origin. The previous origin is saved in oldOrg. Returns
384/// nonzero if the call is successful; otherwise, returns 0.
385//
386bool
388{
389 bool result = PrnDC.OffsetViewportOrg(delta, oldOrg);
390 ReOrg();
391 return result;
392}
393
394//
395/// Sets the screen's viewport x- and y-extents to the given extent values. The
396/// previous extents are saved in oldExtent. Returns nonzero if the call is
397/// successful; otherwise, returns 0. The extent value determines the amount of
398/// stretching or compression needed in the logical coordinate system to fit the
399/// device coordinate system. extent also determines the relative orientation of the
400/// two coordinate systems.
401//
402bool
404{
405 bool result = PrnDC.SetViewportExt(extent, oldExtent);
406 ReScale();
407 return result;
408}
409
410/// Modifies this DC's viewport extents relative to the current values. The new
411/// extents are derived as follows:
412/// \code
413/// xNewVE = (xOldVE * xNum)/ xDenom
414/// yNewVE = (yOldVE * yNum)/ yDenom
415/// \endcode
416/// The previous extents are saved in oldExtent. Returns nonzero if the call is
417/// successful; otherwise returns 0.
418bool
421{
423 ReScale();
424 return result;
425}
426
427/// Sets the DC's window x- and y-extents to the given extent values. The previous
428/// extents are saved in oldExtent. Returns nonzero if the call is successful;
429/// otherwise, returns 0. The extent value determines the amount of stretching or
430/// compression needed in the logical coordinate system to fit the device coordinate
431/// system. extent also determines the relative orientation of the two coordinate
432/// systems.
433//
434bool
436{
437 bool result = PrnDC.SetWindowExt(extent, oldExtent);
438 ReScale();
439 return result;
440}
441
442//
443/// Modifies this DC's window extents relative to the current values. The new
444/// extents are derived as follows:
445/// \code
446/// xNewWE = (xOldWE * xNum)/ xDenom
447/// yNewWE = (yOldWE * yNum)/ yDenom
448/// \endcode
449/// The previous extents are saved in oldExtent. Returns nonzero if the call is
450/// successful; otherwise returns 0.
451//
452bool
455{
457 ReScale();
458 return result;
459}
460
461
465
466//
467/// Constructs a TPreviewPage object where parent is the parent window, printout is
468/// a reference to the corresponding TPrintout object, prndc is a reference to the
469/// TPrintPreviewDC object, printExtent is the extent (width and height) in logical
470/// units of the printed page, and pagenum is the number of the preview page.
471/// TPreviewPage has the attributes of a visible child window with a thin border.
472/// Sets the background color of the preview page window to white.
473//
476:
477 TWindow(parent),
478 PageNum(pagenum),
479 PrintExtent(printExtent),
480 Printout(printout),
481 PrintDC(prndc)
482{
483 Attr.Style = WS_CHILD | WS_BORDER | WS_VISIBLE;
485}
486
487//
488/// Sets newNum to the number of the page currently displayed in the preview window.
489//
490void
492{
493 PageNum = newNum;
494 if (GetHandle())
495 Invalidate();
496}
497
498//
499/// Using a TPrintPreviewDC, 'print' the current page (PageNum) of Printout
500/// onto the window DC provided
501///
502/// Displays the page in the preview window. To determine the preview page's
503/// attributes (line width, and so on), Paint calls several of TPrintout's member
504/// functions. Then, to adjust the printer object for previewing, Paint determines
505/// if the page fits in the preview window or if clipping is necessary. Finally,
506/// Paint passes clipping and banding information to TPrintout's PrintPage function,
507/// which is called to display the page in the preview window.
508//
509void
511{
512 TPrintPreviewDC pdc(dc, PrintDC, GetClientRect(), clip);
513 Printout.SetPrintParams(&pdc, PrintExtent);
514
515 if (Printout.HasPage(PageNum)) {
516 Printout.BeginPrinting();
517 Printout.BeginDocument(PageNum, PageNum, pfBoth);
518
519 // Change clip rect into the shared logical coordinate space, & print
520 //
521 pdc.SDPtoLP(clip);
522 Printout.PrintPage(PageNum, clip, pfBoth);
523
524 Printout.EndDocument();
525 Printout.EndPrinting();
526 }
527 else
528 dc.PatBlt(0, 0, Attr.W, Attr.H, WHITENESS);
529}
530
531//
532/// Invalidates the entire window when the size of the page displayed in the preview
533/// window changes.
534//
535void
537{
538 Invalidate();
540}
541
542} // OWL namespace
543/* ========================================================================== */
544
Class wrapper for management of color values.
Definition color.h:245
static const TColor White
Static TColor object with fixed Value set by RGB(255, 255, 255).
Definition color.h:314
TDC is the root class for GDI DC wrappers.
Definition dc.h:64
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.
Definition dc.cpp:444
int GetTextFace(int count, TCHAR *facename) const
Retrieves the typeface name for the current font on this DC.
Definition dc.h:3166
TColor GetBkColor() const
Returns the current background color of this DC.
Definition dc.h:1099
virtual int GetDeviceCaps(int index) const
Used under WIN3.1 or later, GetDeviceCaps returns capability information about this DC.
Definition dc.cpp:373
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 view...
Definition dc.h:1303
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.
Definition dc.cpp:554
void SelectObject(const TBrush &brush)
Selects the given GDI brush object into this DC.
Definition dc.cpp:113
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.
Definition dc.cpp:492
TEXTMETRIC GetTextMetrics() const
Functional style overload.
Definition dc.cpp:382
virtual int SetMapMode(int mode)
Sets the current window mapping mode of this DC to mode.
Definition dc.cpp:431
HANDLE GetCurrentObject(uint objectType) const
Returns a handle to the currently selected object of the given objectType associated with this DC.
Definition dc.cpp:319
virtual TColor SetBkColor(const TColor &color)
Sets the current background color of this DC to the given color value or the nearest available.
Definition dc.cpp:405
virtual bool SetWindowExt(const TSize &extent, TSize *oldExtent=nullptr)
Sets this DC's window x- and y-extents to the given extent values.
Definition dc.cpp:536
int SelectClipRgn(const TRegion &region)
Selects the given region as the current clipping region for this DC.
Definition dc.h:1533
virtual void RestoreFont()
Restores the original GDI font object to this DC.
Definition dc.cpp:246
bool GetViewportExt(TSize &extent) const
The first version retrieves this DC's current viewport's x- and y-extents (in device units) and place...
Definition dc.h:1330
virtual void SelectStockObject(int index)
Selects into the DC a predefined stock pen, brush, font, or palette.
Definition dc.cpp:206
bool GetWindowOrg(TPoint &point) const
Places in point the x- and y-coordinates of the origin of the window associated with this DC.
Definition dc.h:1356
virtual bool OffsetViewportOrg(const TPoint &delta, TPoint *oldOrg=nullptr)
Modifies this DC's viewport origin relative to the current values.
Definition dc.cpp:458
bool GetTextMetrics(TEXTMETRIC &metrics) const
Fills the metrics structure with metrics data for the current font on this DC.
Definition dc.h:3175
virtual TColor SetTextColor(const TColor &color)
Sets the current text color of this DC to the given color value.
Definition dc.cpp:417
TColor GetTextColor() const
Returns the current text color of this DC.
Definition dc.h:1213
bool GetWindowExt(TSize &extent) const
Retrieves this DC's window current x- and y-extents (in device units).
Definition dc.h:1380
bool PatBlt(int x, int y, int w, int h, uint32 rop=PATCOPY)
Definition dc.h:2448
virtual bool SetViewportExt(const TSize &extent, TSize *oldExtent=nullptr)
Sets this DC's viewport x- and y-extents to the given extent values.
Definition dc.cpp:474
HDC GetHDC() const
Return the handle of the device context.
Definition dc.h:981
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
Definition gdiobjec.h:296
TPoint is a support class, derived from tagPOINT.
Definition geometry.h:87
TPreviewDCBase is the base class encapsulating a 'dual' device context - i.e.
Definition preview.h:90
HDC GetAttributeHDC() const
Overriden to return printer's HDC.
Definition preview.cpp:43
TPrintDC & PrnDC
DC of 'real' device (aka TargetDevice) whose output we're previewing.
Definition preview.h:103
TPreviewDCBase(TDC &screen, TPrintDC &printdc)
Constructs a basic Preview DC.
Definition preview.cpp:32
TPreviewPage encapsulates a window which displays print-preview data.
Definition preview.h:44
void Paint(TDC &, bool, TRect &) override
Using a TPrintPreviewDC, 'print' the current page (PageNum) of Printout onto the window DC provided.
Definition preview.cpp:510
TPreviewPage(TWindow *parent, TPrintout &printout, TPrintDC &prndc, TSize &printExtent, int pagenum=1)
Constructs a TPreviewPage object where parent is the parent window, printout is a reference to the co...
Definition preview.cpp:474
void EvSize(uint sizeType, const TSize &size)
Invalidates the entire window when the size of the page displayed in the preview window changes.
Definition preview.cpp:536
void SetPageNumber(int newNum)
Sets newNum to the number of the page currently displayed in the preview window.
Definition preview.cpp:491
A DC class that provides access to a printer.
Definition dc.h:874
Derived from TPrintDC, TPrintPreviewDC maps printer device coordinates to logical screen coordinates.
Definition preview.h:123
~TPrintPreviewDC()
Destroys a TPrintPreviewDC object.
Definition preview.cpp:85
TColor SetBkColor(const TColor &color)
Sets the current background color of this DC to the given color value or the nearest available.
Definition preview.cpp:334
void RestoreFont()
Restores the original GDI font object to this DC.
Definition preview.cpp:148
bool ScaleWindowExt(int xNum, int xDenom, int yNum, int yDenom, TSize *oldExtent=0)
Modifies this DC's window extents relative to the current values.
Definition preview.cpp:453
virtual void ReOrg()
Gets the x- and y- extents of the viewport, equalizes the logical and screen points,...
Definition preview.cpp:308
TColor SetTextColor(const TColor &color)
Sets the current text color of this DC to the given color value.
Definition preview.cpp:346
virtual void ReScale()
Maps the points of the printer DC to the screen DC.
Definition preview.cpp:278
bool SetWindowExt(const TSize &extent, TSize *oldExtent=0)
Sets the DC's window x- and y-extents to the given extent values.
Definition preview.cpp:435
void SelectStockObject(int index)
Retrieves a handle to a predefined stock font.
Definition preview.cpp:122
TPrintPreviewDC(TDC &screen, TPrintDC &printdc, const TRect &client, const TRect &clip)
TPrintPreviewDC's constructor takes a screen DC as well as a printer DC.
Definition preview.cpp:53
virtual void SyncFont()
Sets the screen font equal to the current printer font.
Definition preview.cpp:216
bool ScaleViewportExt(int xNum, int xDenom, int yNum, int yDenom, TSize *oldExtent=0)
Modifies this DC's viewport extents relative to the current values.
Definition preview.cpp:419
bool SetViewportOrg(const TPoint &origin, TPoint *oldOrg=0)
Sets the printer DC's viewport origin to the given origin value, and saves the previous origin in old...
Definition preview.cpp:373
bool OffsetViewportOrg(const TPoint &delta, TPoint *oldOrg=0)
Modifies this DC's viewport origin relative to the current values.
Definition preview.cpp:387
int SetMapMode(int mode)
Sets the current window mapping mode of this DC to mode.
Definition preview.cpp:360
int GetDeviceCaps(int index) const
GetDeviceCaps returns capability information, such as font and pitch attributes, about the printer DC...
Definition preview.cpp:162
void SelectObject(const TFont &newFont)
Selects the given font object into this DC.
Definition preview.cpp:100
bool SetViewportExt(const TSize &extent, TSize *oldExtent=0)
Sets the screen's viewport x- and y-extents to the given extent values.
Definition preview.cpp:403
TPrintout represents the physical printed document that is to sent to a printer to be printed.
Definition printer.h:76
virtual void BeginDocument(int startPage, int endPage, uint flags)
The printer object's Print function calls BeginDocument once before printing each copy of a document.
Definition printout.cpp:163
virtual bool HasPage(int pageNumber)
HasPage is called after every page is printed.
Definition printout.cpp:174
virtual void EndPrinting()
The printer object's Print function calls EndPrinting after all copies of the document finish printin...
Definition printout.cpp:206
virtual void EndDocument()
The printer object's Print function calls EndDocument after each copy of the document finishes printi...
Definition printout.cpp:196
virtual void SetPrintParams(TPrintDC *dc, TSize pageSize)
SetPrintParams sets DC to dc and PageSize to pageSize.
Definition printout.cpp:122
virtual void PrintPage(int page, TRect &rect, uint flags)
PrintPage is called for every page (or band, if Banding is true) and must be overridden to print the ...
Definition printout.cpp:186
virtual void BeginPrinting()
The printer object's Print function calls BeginPrinting once at the beginning of a print job,...
Definition printout.cpp:150
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
The tagSIZE struct is defined as.
Definition geometry.h:234
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
void SetBkgndColor(TColor color, bool shouldUpdate=true)
Sets the background color for the window.
Definition window.h:1925
TRect GetClientRect() const
Gets the coordinates of the window's client area (the area in a window you can use for drawing).
Definition window.h:2217
void EvSize(uint sizeType, const TSize &size)
Response method for an incoming WM_SIZE message.
Definition window.cpp:1632
virtual void Invalidate(bool erase=true)
Invalidates (mark for painting) the entire client area of a window.
Definition window.h:2822
HWND GetHandle() const
Returns the handle of the window.
Definition window.h:2020
Definition of GDI DC encapsulation classes: TDC, TWindowDC, TScreenDC, TDesktopDC,...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Definition eventhan.h:492
Definition of abstract GDI object class and derived classes.
@ pfBoth
Current band accepts both text and graphics.
Definition printer.h:64
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
int GlyphHeight(TEXTMETRIC &tm)
Definition preview.cpp:183
unsigned char uint8
Definition number.h:32
OWL_DIAGINFO
Definition animctrl.cpp:14
END_RESPONSE_TABLE
Definition button.cpp:26
unsigned int uint
Definition number.h:25
EV_WM_SIZE
Definition decframe.cpp:34
bool SetViewportExt(HDC hdc, int w, int h)
Definition preview.cpp:22
bool SetWindowExt(HDC hdc, int w, int h)
Definition preview.cpp:20
bool SetWindowOrg(HDC hdc, int w, int h)
Definition preview.cpp:21
bool SetViewportOrg(HDC hdc, int x, int y)
Definition preview.cpp:23
Definition of print preview classes.
Definition of Print and PrintSetup common Dialogs classes.