home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WPRTDLG.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-18
|
6KB
|
184 lines
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 1994, by WATCOM International Inc. All rights %
% reserved. No part of this software may be reproduced or %
% used in any form or by any means - graphic, electronic or %
% mechanical, including photocopying, recording, taping or %
% information storage and retrieval systems - except with the %
% written permission of WATCOM International Inc. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
#ifndef _WPRTDLG_HPP_INCLUDED
#define _WPRTDLG_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
#ifndef _WCANVAS_HPP_INCLUDED
# include "wcanvas.hpp"
#endif
#ifndef _WCOMDLG_HPP_INCLUDED
# include "wcomdlg.hpp"
#endif
#ifndef _WPRTDATA_HPP_INCLUDED
# include "wprtdata.hpp"
#endif
#undef GetPrinterData
#undef SetPrinterData
#if defined( _UNICODE )
#define GetPrinterData GetPrinterDataW
#define SetPrinterData SetPrinterDataW
#else
#define GetPrinterData GetPrinterDataA
#define SetPrinterData SetPrinterDataA
#endif
//
// PrintDialog Styles
//
typedef WULong WPrintDStyle;
#define WPrintDSAllPages ((WPrintDStyle)0x00000000L)
#define WPrintDSSelection ((WPrintDStyle)0x00000001L)
#define WPrintDSPageNums ((WPrintDStyle)0x00000002L)
#define WPrintDSNoSelection ((WPrintDStyle)0x00000004L)
#define WPrintDSNoPageNums ((WPrintDStyle)0x00000008L)
#define WPrintDSCollate ((WPrintDStyle)0x00000010L)
#define WPrintDSPrintToFile ((WPrintDStyle)0x00000020L)
#define WPrintDSPrintSetup ((WPrintDStyle)0x00000040L)
#define WPrintDSNoWarning ((WPrintDStyle)0x00000080L)
#define WPrintDSReturnDC ((WPrintDStyle)0x00000100L)
#define WPrintDSReturnIC ((WPrintDStyle)0x00000200L)
#define WPrintDSReturnDefault ((WPrintDStyle)0x00000400L)
#define WPrintDSShowHelp ((WPrintDStyle)0x00000800L)
#define WPrintDSEnablePrintHook ((WPrintDStyle)0x00001000L)
#define WPrintDSEnablePrintTemplate ((WPrintDStyle)0x00004000L)
#define WPrintDSUseDevModeCopies ((WPrintDStyle)0x00040000L)
#define WPrintDSUseDevModeCopiesAndCollate ((WPrintDStyle)0x00040000L)
#define WPrintDSDisablePrintToFile ((WPrintDStyle)0x00080000L)
#define WPrintDSHidePrintToFile ((WPrintDStyle)0x00100000L)
#define WPrintDSNoNetworkButton ((WPrintDStyle)0x00200000L)
//
// WPrintDialog
//
// Used to display color dialog.
class WCMCLASS WPrintDialog : public WCommonDialog {
WDeclareSubclass( WPrintDialog, WCommonDialog );
public:
WPrintDialog();
~WPrintDialog();
/*******************************************************
* Properties
*******************************************************/
// Copies
WUShort GetCopies() const;
WBool SetCopies( WUShort numCopies );
// Collate
//
//
void SetCollate(WBool bCollate = FALSE);
// FirstPage
WUShort GetFirstPage() const;
WBool SetFirstPage( WUShort firstPage );
// FromPage
WUShort GetFromPage() const;
WBool SetFromPage( WUShort fromPage );
// InfoCanvas
WInfoCanvas GetInfoCanvas() const;
// LastPage
WUShort GetLastPage() const;
WBool SetLastPage( WUShort lastPage );
// PrinterData
//
// The data that defines which printer is chosen and
// its currennt settings (landscape, etc.). A copy is made
// when setting.
WPrinterData GetPrinterData() const;
WBool SetPrinterData( const WPrinterData & pd );
// PrinterCanvas
WPrinterCanvas GetPrinterCanvas() const;
// Style
//
// Set the styles used by the print dialog. Note that
// the WPrintDSEnableHook style will ALWAYS be enabled.
WPrintDStyle GetStyle() const;
WBool SetStyle( WPrintDStyle style );
// ToPage
WUShort GetToPage() const;
WBool SetToPage( WUShort toPage );
/*******************************************************
* Methods
*******************************************************/
// ChangeStyle
//
// Use to turn a specific style on or off.
WBool ChangeStyle( WPrintDStyle style, WBool on );
// Prompt
//
// Display the dialog and wait for it to be dismissed.
// The first form uses the current settings. The second
// is a convenience function.
WBool Prompt();
WBool Prompt( WWindow *owner, const WChar *title );
/************************************************************
* Notifications
************************************************************/
void OnDialogInitialize( WWindowHandle hWnd, WWindowHandle focus );
private:
void *PackPD();
WBool UnpackPD( WBool ok );
private:
void *_pd;
WPrinterCanvas _printerCanvas;
WInfoCanvas _infoCanvas;
WPrinterData _printerData;
};
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _WPRTDLG_HPP_INCLUDED