CODPageSettings Class

class CODPageSettings: public CObject

The page settings keep track of the current page settings for a diagram.

Defined in: OdPageSettings.h

Class Members

 CODPageSettings()

Constructor.

 CODPageSettings(const CODPageSettings& src)

Copy constructor.

virtual  ~CODPageSettings()

Destructor.

CODPageSettings&  operator=(const CODPageSettings& src)

Copies another page settings object.

void  SetDefaults()

Initialize page settings to match default printer.

void  SetPaperOrientation(short dmNewOrientation)

Set the printer's paper orientation.

void  SetPaperSize(short dmNewSize)

Set the printer's paper size.

void  SetMargins(const CRect& rcMargin)

Sets the margins.

DWORD  SetUnitMeasure(const DWORD dwUnitMeasure)

Sets the unit of measure used by the page settings.

DWORD  GetUnitMeasure() const

Gets the unit of measure used by the page settings.

void  GetPaperSize(POINT& ptPaperSize)

Gets the paper size.

void  GetPaperSize(int& nPaperWidth, int& nPaperHeight)

Gets the paper size.

void  GetMargins(CRect& rcMargin)

Gets the margins.

void  GetMinMargins(CRect& rcMinMargin)

Gets the minimum value for the margins.

void  GetAppPrinter(CWinApp* pApp)

Get current printer information in CWinApp object.

void  SetAppPrinter(CWinApp* pApp)

Set current printer information in CWinApp object.

void  ChangePrinter(HGLOBAL hDevNames)

Change printer settings to match the given DEVNAMES structure.

BOOL  PrinterExists() const

Test to see if the selected printer exists.

BOOL  ValidatePrinter()

Check for valid printer and correct printer settings if necessary.

void  GetPageSetupDlg(PAGESETUPDLG& pageSetupDlg)

Get page setup information.

void  SetPageSetupDlg(const PAGESETUPDLG& pageSetupDlg)

Put page setup information.

void  GetPrintDlg(PRINTDLG& printDlg)

Gets the print dialog information.

void  GetPrintInfo(CPrintInfo* pInfo)

Gets the printing information.

HDC  CreateDC()

Create a device context using the page and device settings.

virtual void  Serialize(CArchive& ar)

Serializes the page settings.

HGLOBAL  GetDevNames()

Return a copy of the DEVNAMES structure.

void  SetDevNames(HGLOBAL hSrcDevNames)

Copy the DEVNAMES structure into the page settings.

HGLOBAL  GetDevMode()

Return a copy of the DEVMODE structure.

void  SetDevMode(HGLOBAL hSrcDevMode)

Copy the DEVMODE structure into the page settings.

PAGESETUPDLG m_pageSetupDlg

Information for the page setup dialog.