OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
printdia.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 class TPrintDialog, a Print and PrintSetup common Dialog
7/// encapsulation
8//----------------------------------------------------------------------------
9#include <owl/pch.h>
10#include <owl/printdia.h>
11#include <owl/dc.h>
12#include <owl/framewin.h>
13#include <memory>
14
15#if defined(__BORLANDC__)
16# pragma option -w-ccc // Disable "Condition is always true/false"
17# pragma option -w-rch // Disable "Unreachable code"
18#endif
19
20namespace owl {
21
23
24
25DEFINE_RESPONSE_TABLE1(TPrintDialog, TCommonDialog)
27
28namespace
29{
30
31tstring ToString(TResId id)
32{return id.IsString() ? tstring(id.GetString()) : tstring();}
33
34} // namespace
35
36//
37/// Constructs a print or print setup dialog box with specified data from the
38/// TPrintDialog::TData struct structure, parent window, window caption, print and
39/// setup templates, and module.
40//
42 LPCTSTR title, TModule* module)
43:
44 TCommonDialog(parent, title, module),
45 Data(data),
46 PrintTemplate(printTemplate),
47 PrintTemplateName(ToString(printTemplate)),
48 SetupTemplate(setupTemplate),
49 SetupTemplateName(ToString(setupTemplate))
50{
51 Init();
52}
53
54//
55/// String-aware overload
56//
58 const tstring& title, TModule* module)
59:
60 TCommonDialog(parent, title.c_str(), module),
61 Data(data),
62 PrintTemplate(),
63 PrintTemplateName(printTemplateName),
64 SetupTemplate(),
65 SetupTemplateName(setupTemplateName)
66{
67 Init();
68}
69
70//
71/// Common initialization of the contained data structures.
72//
73void
75{
76 // If our dialog template identifiers are given as strings, then redirect the resource
77 // identifiers to our buffered copies (copied in the constructor). This prevents run-time errors
78 // caused by dangling string pointers.
79 //
80 if (!PrintTemplateName.empty())
81 PrintTemplate = TResId{PrintTemplateName.c_str()};
82
83 if (!SetupTemplateName.empty())
84 SetupTemplate = TResId{SetupTemplateName.c_str()};
85
86 memset(&Pd, 0, sizeof Pd);
87 Pd.lStructSize = sizeof Pd;
88 Pd.hwndOwner = GetParentO() ? GetParentO()->GetHandle() : nullptr;
89 Pd.hInstance = *GetModule();
91 Pd.Flags &= ~PD_RETURNDEFAULT;
92
93 if (PrintTemplate)
94 {
95 Pd.lpPrintTemplateName = PrintTemplate.GetPointerRepresentation();
96 Pd.Flags |= PD_ENABLEPRINTTEMPLATE;
97 }
98 else
99 Pd.Flags &= ~PD_ENABLEPRINTTEMPLATE;
100
101 if (SetupTemplate)
102 {
103 Pd.lpSetupTemplateName = SetupTemplate.GetPointerRepresentation();
104 Pd.Flags |= PD_ENABLESETUPTEMPLATE;
105 }
106 else
107 Pd.Flags &= ~PD_ENABLESETUPTEMPLATE;
108
109 Pd.lpfnPrintHook = nullptr;
110 Pd.lpfnSetupHook = nullptr;
111 Pd.nFromPage = static_cast<uint16>(Data.FromPage);
112 Pd.nToPage = static_cast<uint16>(Data.ToPage);
113 Pd.nMinPage = static_cast<uint16>(Data.MinPage);
114 Pd.nMaxPage = static_cast<uint16>(Data.MaxPage);
115 Pd.nCopies = static_cast<uint16>(Data.Copies);
116
117 memset(&Psd, 0, sizeof Psd);
118 Psd.lStructSize = sizeof Psd;
119 Psd.hwndOwner = GetParentO() ? GetParentO()->GetHandle() : nullptr;
120 Psd.hInstance = *GetModule();
122
123 if (SetupTemplate)
124 {
125 Psd.lpPageSetupTemplateName = SetupTemplate.GetPointerRepresentation();
126 Psd.Flags |= PSD_ENABLEPAGESETUPTEMPLATE;
127 }
128 else
129 Psd.Flags &= ~PSD_ENABLEPAGESETUPTEMPLATE;
130
131 Psd.lpfnPageSetupHook = nullptr;
132 Psd.lpfnPagePaintHook = nullptr;
133 Psd.ptPaperSize = Data.PaperSize;
134 Psd.rtMinMargin = Data.MinMargin;
135 Psd.rtMargin = Data.Margin;
136
137 memset(&Pde, 0, sizeof Pde);
138 Pde.lStructSize = sizeof Pde;
139
140 // Note: PRINTDLGEX::hwndOwner cannot be NULL (see Windows API).
141 // But, we need to maintain compatibility with older versions which allowed Parent == 0.
142 // So, if no parent has been passed we'll try to assign the main window handle.
143 // If this fails we'll handle the problem in DoExecute by reverting to the old dialog.
144
146 Pde.hwndOwner = GetParentO() ? GetParentO()->GetHandle() : main_window ? main_window->GetHandle() : nullptr;
147 Pde.hInstance = *GetModule();
148 Pde.Flags = Data.Flags;
149 Pde.Flags &= ~PD_RETURNDEFAULT;
150 Pde.Flags2 = 0;
151 Pde.nStartPage = START_PAGE_GENERAL; // Needed, won't work otherwise even for PD_RETURNDEFAULT
152
153 if (PrintTemplate)
154 {
155 Pde.lpPrintTemplateName = PrintTemplate.GetPointerRepresentation();
156 Pde.Flags |= PD_ENABLEPRINTTEMPLATE;
157 Pde.hInstance = GetModule()->GetHandle();
158 }
159 else
160 {
161 Pde.Flags &= ~PD_ENABLEPRINTTEMPLATE;
162 Pde.hInstance = nullptr;
163 }
164
165 Pde.lpCallback = nullptr;
166 Pde.nMaxPageRanges = 1;
167 Pde.lpPageRanges = &PdeRange;
168 Pde.lpPageRanges[0].nFromPage = (uint16)Data.FromPage;
169 Pde.lpPageRanges[0].nToPage = (uint16)Data.ToPage;
170 Pde.nMinPage = static_cast<uint16>(Data.MinPage);
171 Pde.nMaxPage = static_cast<uint16>(Data.MaxPage);
172 Pde.nCopies = static_cast<uint16>(Data.Copies);
173}
174
175//
176/// Default processing.
177/// Responds to the click of the setup button with an EV_COMMAND message.
178//
183
184//
185/// Returns the PRINTDLG structure used by the dialog.
186//
188{
189 return Pd;
190}
191
192//
193/// Sets the PRINTDLG structure used by the dialog.
194//
196{
197 Pd = pd;
198}
199
200//
201/// Returns the transfer data of the dialog.
202//
204{
205 return Data;
206}
207
208//
209/// Returns true if a message is handled.
210//
216
217//
218/// If no error occurs, DoExecute copies flags and print specifications into the
219/// data argument in the constructor. If an error occurs, DoExecute sets the error
220/// number of data to an error code from TPrintDialog::TData::Error.
221//
222int
224{
225 if (Data.DoPageSetup)
226 {
227 Psd.lpfnPageSetupHook = LPPAGESETUPHOOK(StdDlgProc);
228 Psd.lpfnPagePaintHook = LPPAGEPAINTHOOK(StdDlgProc);
229
230 Data.Unlock();
231
232 Psd.hDevMode = Data.HDevMode;
233 Psd.hDevNames = Data.HDevNames;
234
235 int ret = PageSetupDlg(&Psd);
236 if (ret)
237 {
238 Data.PageSetupFlags = Psd.Flags;
239 Data.Error = 0;
240 Data.PaperSize = Psd.ptPaperSize;
241 Data.MinMargin = Psd.rtMinMargin;
242 Data.Margin = Psd.rtMargin;
243 }
244 else
245 {
247 }
248
249 Data.HDevMode = Psd.hDevMode;
250 Data.HDevNames = Psd.hDevNames;
251
252 Data.Lock();
253
254 return ret ? IDOK : IDCANCEL;
255 }
256
257 Pd.lpfnPrintHook = LPPRINTHOOKPROC(StdDlgProc);
258 Pd.lpfnSetupHook = LPSETUPHOOKPROC(StdDlgProc);
259
260 Data.Unlock();
261 Pd.hDevMode = Data.HDevMode;
262 Pd.hDevNames = Data.HDevNames;
263
264 int result;
265
266 HWND hDummyWnd = nullptr;
267
268 if (!Data.UseOldDialog && TSystem::GetMajorVersion() > 4 && Pde.hwndOwner == nullptr)
269 {
270 //If no TWindow is provided, create a dummy window to pass to the new print dialog
271 //
272 hDummyWnd = ::CreateWindow(_T("STATIC"), _T(""), 0,
273 0, 0, 0, 0,
274 nullptr, nullptr,
275 GetApplication() ? GetApplication()->GetHandle() : nullptr, nullptr);
276
277 Pde.hwndOwner = hDummyWnd;
278 }
279
280 if (!Data.UseOldDialog && TSystem::GetMajorVersion() > 4 && Pde.hwndOwner != nullptr)
281 {
282 Pde.hDevMode = Data.HDevMode;
283 Pde.hDevNames = Data.HDevNames;
284 CHECK(Pde.hwndOwner); // cannot be NULL
285 HRESULT ret = PrintDlgEx(&Pde);
286 if (ret == S_OK)
287 {
288 if (!(Pde.Flags & PD_RETURNDEFAULT) && Pde.dwResultAction == PD_RESULT_CANCEL)
289 {
290 Data.Error = 0;
291 result = IDCANCEL;
292 }
293 else
294 {
295 Data.Flags = Pde.Flags;
296 Data.Error = 0;
297 Data.HDc = Pde.hDC;
298 Data.FromPage = Pde.lpPageRanges[0].nFromPage;
299 Data.ToPage = Pde.lpPageRanges[0].nToPage;
300 Data.Copies = Pde.nCopies;
301
302 if ((Pde.Flags & PD_RETURNDEFAULT) || Pde.dwResultAction == PD_RESULT_PRINT)
303 {
304 result = IDOK;
305 }
306 else
307 {
308 result = IDCANCEL;
309 }
310 }
311 }
312 else
313 {
315 result = IDCANCEL;
316 }
317 Data.HDevMode = Pde.hDevMode;
318 Data.HDevNames = Pde.hDevNames;
319
320 if (hDummyWnd != nullptr)
321 {
323 }
324 }
325 else
326 {
327 int ret = PrintDlg(&Pd);
328 if (ret)
329 {
330 Data.Flags = Pd.Flags;
331 Data.Error = 0;
332 Data.HDc = Pd.hDC;
333 Data.FromPage = Pd.nFromPage;
334 Data.ToPage = Pd.nToPage;
335 Data.Copies = Pd.nCopies;
336 result = IDOK;
337 }
338 else
339 {
341 result = IDCANCEL;
342 }
343 Data.HDevMode = Pd.hDevMode;
344 Data.HDevNames = Pd.hDevNames;
345 }
346
347 Data.Lock();
348 return result;
349}
350
351//
352/// Without displaying a dialog box, GetDefaultPrinter gets the device mode and name
353/// that are initialized for the system default printer.
354//
355bool
357{
358 Pd.Flags |= PD_RETURNDEFAULT;
359 int flags = Pde.Flags;
360 Pde.Flags = PD_RETURNDEFAULT;
361 Data.ClearDevMode();
362 Data.ClearDevNames();
363 int result = DoExecute();
364 Pde.Flags = flags;
365 return result == IDOK;
366}
367
368//----------------------------------------------------------------------------
369
371:
372 Flags(PD_ALLPAGES|PD_COLLATE),
373 Error(0),
374 FromPage(-1), ToPage(-1),
375 MinPage(-1), MaxPage(-1),
376 Copies(1),
377 PageSetupFlags(PSD_DEFAULTMINMARGINS),
378 DoPageSetup(false),
379 UseOldDialog(false),
380 HDevMode(nullptr),
381 HDevNames(nullptr), HDc(nullptr),
382 DevMode(nullptr), DevNames(nullptr)
383{
384}
385
387{
388 if (HDevMode)
389 {
390 ::GlobalUnlock(HDevMode);
391 ::GlobalFree(HDevMode);
392 }
393 if (HDevNames)
394 {
395 ::GlobalUnlock(HDevNames);
396 ::GlobalFree(HDevNames);
397 }
398 if (HDc)
399 ::DeleteDC(HDc);
400}
401
402//
403/// Gets a pointer to a DEVMODE structure (a structure containing information
404/// necessary to initialize the dialog controls).
405//
407{
408 return DevMode;
409}
410
411//
412/// Gets a pointer to a non-const DEVMODE structure (a structure containing information
413/// necessary to initialize the dialog controls).
414//
416{
417 return DevMode;
418}
419
420//
421/// Gets a pointer to a DEVNAMES structure (a structure containing three strings
422/// used to specify the driver name, the printer name, and the output port name).
423//
425{
426 return DevNames;
427}
428
429//
430/// Locks memory associated with the DEVMODE and DEVNAMES structures.
431//
432void
434{
435 if (HDevMode)
436 DevMode = (DEVMODE *)::GlobalLock(HDevMode);
437 else
438 DevMode = nullptr;
439 if (HDevNames)
440 DevNames = (DEVNAMES *)::GlobalLock(HDevNames);
441 else
442 DevNames = nullptr;
443}
444
445//
446/// Unlocks memory associated with the DEVMODE and DEVNAMES structures.
447//
448void
450{
451 if (HDevMode)
452 {
453 ::GlobalUnlock(HDevMode);
454 DevMode = nullptr;
455 }
456 if (HDevNames)
457 {
458 ::GlobalUnlock(HDevNames);
459 DevNames = nullptr;
460 }
461 if (HDc)
462 {
463 ::DeleteDC(HDc);
464 HDc = nullptr;
465 }
466}
467
468//
469/// Clears device mode information (information necessary to initialize the dialog
470/// controls).
471//
472void
474{
475 if (HDevMode)
476 {
477 ::GlobalUnlock(HDevMode);
478 ::GlobalFree(HDevMode);
479 HDevMode = nullptr;
480 DevMode = nullptr;
481 }
482}
483
484//
485/// Sets the values for the DEVMODE structure.
486//
487void
489{
490 ClearDevMode();
491 if (devMode)
492 {
493 int size = devMode->dmSize + devMode->dmDriverExtra;
494 HDevMode = ::GlobalAlloc(GHND, size);
495 DevMode = (DEVMODE *)::GlobalLock(HDevMode);
496 memcpy(DevMode, devMode, size);
497 }
498}
499
500//
501/// Clears the device name information (information that contains three strings used
502/// to specify the driver name, the printer name, and the output port name).
503//
504void
506{
507 if (HDevNames)
508 {
509 ::GlobalUnlock(HDevNames);
510 ::GlobalFree(HDevNames);
511 HDevNames = nullptr;
512 DevNames = nullptr;
513 }
514}
515
516//
517/// Gets the name of the printer device driver.
518//
521{
522 return DevNames ? reinterpret_cast<LPCTSTR>(DevNames) + DevNames->wDriverOffset : nullptr;
523}
524
525//
526/// Gets the name of the output device.
527//
530{
531 return DevNames ? reinterpret_cast<LPCTSTR>(DevNames) + DevNames->wDeviceOffset : nullptr;
532}
533
534//
535/// Gets the name of the physical output medium.
536//
539{
540 return DevNames ? reinterpret_cast<LPCTSTR>(DevNames) + DevNames->wOutputOffset : nullptr;
541}
542
543//
544/// Sets the values for the DEVNAMES structure.
545//
546void
548{
549 ClearDevNames();
550
551 // Calculate the required buffer size, as the number of characters incl. null-terminators,
552 // and the resulting total size, in bytes, of the DEVNAMES structure including trailing strings.
553 // Then allocate and lock the required amount of global memory.
554 //
555 const int n = static_cast<int>(driver.length() + 1 + device.length() + 1 + output.length() + 1);
556 const int size = sizeof(DEVNAMES) + (n * sizeof(tchar));
557 HDevNames = ::GlobalAlloc(GHND, size);
558 DevNames = static_cast<DEVNAMES*>(::GlobalLock(HDevNames));
559 DevNames->wDefault = false;
560
561 // Calculate the offsets to the strings within DEVNAMES.
562 // Then copy the given names into DEVNAMES (actually, behind the fixed part of DEVNAMES).
563 //
564 // NB! Offsets are in character counts. Here we assume the size of the fixed part of DEVNAMES is divisible
565 // by the character size. Otherwise the driver name will overwrite the last byte of the fixed part.
566 // But DEVNAMES is divisible and forever set in stone, so we don't need to consider an odd struct size.
567 //
568 CHECK(sizeof(DEVNAMES) % sizeof(tchar) == 0);
569 const LPTSTR base = reinterpret_cast<LPTSTR>(DevNames);
570 const LPTSTR pDriver = reinterpret_cast<LPTSTR>(DevNames + 1); // Jump past the the fixed part, assuming even struct size.
571 const LPTSTR pDevice = pDriver + driver.length() + 1; // Jump past the preceding string, including null-terminator.
572 const LPTSTR pOutput = pDevice + device.length() + 1;
573 DevNames->wDriverOffset = static_cast<WORD>(pDriver - base);
574 DevNames->wDeviceOffset = static_cast<WORD>(pDevice - base);
575 DevNames->wOutputOffset = static_cast<WORD>(pOutput - base);
576 _tcscpy(pDriver, driver.c_str());
577 _tcscpy(pDevice, device.c_str());
578 _tcscpy(pOutput, output.c_str());
579}
580
581//
582/// Creates and returns a TPrintDC with the current settings.
583/// Pass ownership of our hDC to the caller thru the new's TPrintDC object
584//
587{
588 if (!HDc)
589 return nullptr;
590 HDC hdc = HDc;
591 HDc = nullptr;
592 return new TPrintDC(hdc, AutoDelete);
593}
594
595
596//
597// Read the persistent object from the stream.
598//
599void*
601{
602 is >> Flags;
603 is >> FromPage;
604 is >> ToPage;
605 is >> MinPage;
606 is >> MaxPage;
607 is >> Copies;
608 const auto driverNarrow = std::unique_ptr<char[]>(is.freadString());
609 const auto deviceNarrow = std::unique_ptr<char[]>(is.freadString());
610 const auto outputNarrow = std::unique_ptr<char[]>(is.freadString());
612 is >> deflt;
614 const auto driver = _A2W(driverNarrow.get());
615 const auto device = _A2W(deviceNarrow.get());
616 const auto output = _A2W(outputNarrow.get());
617 SetDevNames(driver, device, output);
618 if (DevNames)
619 DevNames->wDefault = deflt;
620
621 int16 size;
622 is >> size;
623 if (size)
624 {
625 DEVMODE * devMode = (DEVMODE *)new tchar[size];
626 is.freadBytes(devMode, size);
627 SetDevMode(devMode);
628 delete[] devMode;
629 }
630 else
631 ClearDevMode();
632
633 if (version > 1)
634 {
635 is >> PageSetupFlags;
636 is >> PaperSize;
637 is >> MinMargin;
638 is >> Margin;
639 }
640
641 return this;
642}
643
644//
645/// Writes the object to a peristent stream.
646//
647void
649{
651
652 os << Flags;
653 os << FromPage;
654 os << ToPage;
655 os << MinPage;
656 os << MaxPage;
657 os << Copies;
658 os.fwriteString(_W2A(GetDriverName()));
659 os.fwriteString(_W2A(GetDeviceName()));
660 os.fwriteString(_W2A(GetOutputName()));
661 os << (DevNames ? DevNames->wDefault : uint16(0));
662
663 if (DevMode)
664 {
665 int16 size = int16(DevMode->dmSize + DevMode->dmDriverExtra);
666 os << size;
667 os.fwriteBytes(DevMode, size); // NB! Problem with Unicode?
668 }
669 else
670 os << int16(0);
671
672 os << PageSetupFlags;
673 os << PaperSize;
674 os << MinMargin;
675 os << Margin;
676}
677
678
679} // OWL namespace
680
#define CHECK(condition)
Definition checks.h:239
TFrameWindow * GetMainWindow()
Return the current main window.
Definition applicat.h:592
Derived from TDialog, TCommonDialog is the abstract base class for TCommonDialog objects.
Definition commdial.h:62
virtual INT_PTR DialogFunction(TMsgId, TParam1, TParam2)
Override this to process messages within the dialog function.
Definition dialog.cpp:353
static INT_PTR CALLBACK StdDlgProc(HWND, UINT, WPARAM, LPARAM) noexcept
Callback procs for hooking TDialog to native window.
Definition dialog.cpp:440
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
A DC class that provides access to a printer.
Definition dc.h:874
TPrintDialog::TData contains information required to initialize the printer dialog box with the user'...
Definition printdia.h:58
uint32 PageSetupFlags
Additional page setup dialog flags.
Definition printdia.h:140
LPCTSTR GetOutputName() const
Gets the name of the physical output medium.
Definition printdia.cpp:538
const DEVMODE * GetDevMode() const
Gets a pointer to a DEVMODE structure (a structure containing information necessary to initialize the...
Definition printdia.cpp:406
bool UseOldDialog
Flag to force use of the old print dialog under Win2K/XP/.
Definition printdia.h:145
uint32 Error
If the dialog box is successfully executed, Error returns 0.
Definition printdia.h:132
TPoint PaperSize
Size of the paper user has chosen.
Definition printdia.h:141
TRect MinMargin
Minimum allowable margins of the paper.
Definition printdia.h:142
void SetDevNames(const tstring &driver, const tstring &device, const tstring &output)
Sets the values for the DEVNAMES structure.
Definition printdia.cpp:547
LPCTSTR GetDriverName() const
Gets the name of the printer device driver.
Definition printdia.cpp:520
int MaxPage
MaxPage indicates the maximum number of pages that can be printed.
Definition printdia.h:137
TPrintDC * TransferDC()
Transfers the printers device context.
Definition printdia.cpp:586
void Write(opstream &os)
Writes the object to a peristent stream.
Definition printdia.cpp:648
void ClearDevNames()
Accessors and mutators for the internal Win32 DEVNAMES structure.
Definition printdia.cpp:505
int FromPage
FromPage indicates the beginning page to print.
Definition printdia.h:134
LPCTSTR GetDeviceName() const
Gets the name of the output device.
Definition printdia.cpp:529
uint32 Flags
Flags , which are used to initialize the printer dialog box, can be one or more of the following valu...
Definition printdia.h:97
int ToPage
ToPage indicates the ending page to print.
Definition printdia.h:135
void * Read(ipstream &is, uint32 version)
Definition printdia.cpp:600
int MinPage
MinPage indicates the minimum number of pages that can be printed.
Definition printdia.h:136
TRect Margin
Initial margins for the paper.
Definition printdia.h:143
void ClearDevMode()
Accessors and mutators for the internal Win32 DEVMODE structure.
Definition printdia.cpp:473
const DEVNAMES * GetDevNames() const
Gets a pointer to a DEVNAMES structure (a structure containing three strings used to specify the driv...
Definition printdia.cpp:424
void Lock()
Locks memory associated with the DEVMODE and DEVNAMES structures.
Definition printdia.cpp:433
int Copies
Copies indicates the actual number of pages to be printed.
Definition printdia.h:138
void SetDevMode(const DEVMODE *devMode)
Sets the values for the DEVMODE structure.
Definition printdia.cpp:488
void Unlock()
Unlocks memory associated with the DEVMODE and DEVNAMES structures.
Definition printdia.cpp:449
bool DoPageSetup
Flag to do page setup?
Definition printdia.h:144
void CmSetup()
Default processing.
Definition printdia.cpp:179
auto DialogFunction(TMsgId, TParam1, TParam2) -> INT_PTR override
Returns true if a message is handled.
Definition printdia.cpp:212
PRINTDLG & GetPD()
Returns the PRINTDLG structure used by the dialog.
Definition printdia.cpp:187
auto DoExecute() -> int override
If no error occurs, DoExecute copies flags and print specifications into the data argument in the con...
Definition printdia.cpp:223
TPrintDialog(TWindow *parent, TData &, TResId printTemplate=TResId{}, TResId setupTemplate=TResId{}, LPCTSTR title=0, TModule *=0)
Constructs a print or print setup dialog box with specified data from the TPrintDialog::TData struct ...
Definition printdia.cpp:41
void SetPD(const PRINTDLG &)
Sets the PRINTDLG structure used by the dialog.
Definition printdia.cpp:195
void Init()
Common initialization of the contained data structures.
Definition printdia.cpp:74
bool GetDefaultPrinter()
Without displaying a dialog box, GetDefaultPrinter gets the device mode and name that are initialized...
Definition printdia.cpp:356
TData & GetData()
Returns the transfer data of the dialog.
Definition printdia.cpp:203
TPointer GetPointerRepresentation() const
Returns the encapsulated pointer.
Definition wsyscls.h:76
static uint GetMajorVersion()
Definition system.cpp:81
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
TApplication * GetApplication() const
Gets a pointer to the TApplication object associated with this.
Definition window.h:1855
TWindow * GetParentO() const
Return the OWL's parent for this window.
Definition window.h:2006
TModule * GetModule() const
Returns a pointer to the module object.
Definition window.h:1841
TResult DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
Definition window.cpp:852
HWND GetHandle() const
Returns the handle of the window.
Definition window.h:2020
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition objstrm.h:391
Base class for writing streamable objects.
Definition objstrm.h:480
#define _tcscpy
Definition cygwin.h:79
#define _T(x)
Definition cygwin.h:51
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 class TFrameWindow.
@ AutoDelete
Definition gdibase.h:70
THandle GetHandle() const
Return the instance handle of the library module represented by the TModule obect.
Definition module.h:1233
#define _W2A(lpw)
Definition memory.h:219
#define _A2W(lpw)
Definition memory.h:220
#define _USES_CONVERSION
Definition memory.h:217
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
UINT TMsgId
Message ID type.
Definition dispatch.h:53
unsigned long uint32
Definition number.h:34
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
signed short int16
Definition number.h:29
WPARAM TParam1
First parameter type.
Definition dispatch.h:54
OWL_DIAGINFO
Definition animctrl.cpp:14
END_RESPONSE_TABLE
Definition button.cpp:26
unsigned short uint16
Definition number.h:33
std::string tstring
Definition defs.h:79
Definition of Print and PrintSetup common Dialogs classes.