outputsetup.h
来自「Windows 图形编程 书籍」· C头文件 代码 · 共 66 行
H
66 行
#pragma once
//-----------------------------------------------------------------------------------//
// Windows Graphics Programming: Win32 GDI and DirectDraw //
// ISBN 0-13-086985-6 //
// //
// Written by Yuan, Feng www.fengyuan.com //
// Copyright (c) 2000 by Hewlett-Packard Company www.hp.com //
// Published by Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com //
// //
// FileName : outputsetup.h //
// Description: Printer setup and page setup wrapper //
// Version : 1.00.000, May 31, 2000 //
//-----------------------------------------------------------------------------------//
class KOutputSetup
{
PRINTDLG m_pd;
PAGESETUPDLG m_psd;
void Release(void);
public:
KOutputSetup(void);
~KOutputSetup(void);
void DeletePrinterDC(void);
void SetDefault(HWND hwndOwner, int minpage, int maxpage);
int PrintDialog(DWORD flag);
BOOL PageSetup(DWORD flag);
void GetPaperSize(POINT & p) const
{
p = m_psd.ptPaperSize;
}
void GetMargin(RECT & rect) const
{
rect = m_psd.rtMargin;
}
void GetMinMargin(RECT & rect) const
{
rect = m_psd.rtMinMargin;
}
HDC GetPrinterDC(void) const
{
return m_pd.hDC;
}
DEVMODE * GetDevMode(void)
{
return (DEVMODE *) GlobalLock(m_pd.hDevMode);
}
const TCHAR * GetDriverName(void) const;
const TCHAR * GetDeviceName(void) const;
const TCHAR * GetOutputName(void) const;
HDC CreatePrinterDC(void);
};
void ShowProperty(KOutputSetup & setup, HINSTANCE hInst, int nControlId[], int dialogres);
void ListPrinters(HWND hWnd, int mess = LB_ADDSTRING);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?