⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 previewdialog.h

📁 虚拟打印机
💻 H
字号:
/* * * previewdialog.h *   Copyright (C) 2006 Michael H. Overlin   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      Contact at poster_printer@yahoo.com * */#ifndef PREVIEWDIALOG_H#define PREVIEWDIALOG_H#include "..\lib\dialogwindow.h"#include "..\lib\renderpages.h"//#include "..\lib\utils.h"#include <commdlg.h>class DevModeKeeper;class PRSpoolerDataFile; class PreviewDialog : public ::DialogWindow {public:	PreviewDialog(IN HINSTANCE hinst, IN WORD wTemplateID, IN LPCTSTR lptstrCommandLine);	virtual ~PreviewDialog();	BOOL ConfirmationMessage(IN LPCTSTR lptstrMessage, HWND hwndParent = NULL); // DEFAULT PARENT USED IS THIS DIALOG	void ErrorMessage(LPCTSTR lptstrMessage, HWND hwndParent = NULL); // DEFAULT PARENT USED IS THIS DIALOGprotected:	virtual BOOL InitMsg(WPARAM wParam, LPARAM lParam);	virtual BOOL CommandMsg(WPARAM wParam, LPARAM lParam);	virtual BOOL NotificationMsg(UINT msg, WPARAM wParam, LPARAM lParam);	virtual BOOL NotifyMsg(WPARAM wParam, LPARAM lParam);	virtual BOOL ScrollMsg(UINT msg, WPARAM wParam, LPARAM lParam);	virtual BOOL InterProcessMsg(UINT msg, WPARAM wParam, LPARAM lParam);	virtual BOOL DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) ;private:	//enum SizeChange { eNone, eZoom, eMosaicIncrease, eMosaicDecrease };	void CloseDataSource(void);	BOOL CloseDataSourceCofirmationMessage(LPCTSTR lptstrAction);	void ClosePage(void);	void CloseViewableLists(void);	void ComposeDialogTitle(OUT tstring& tstrTitle, IN LPCTSTR lptstrSubject);	void DeletePageMetaFiles(void);	void EnableAutoRotate(IN BOOL bEnable) ;	void EnableLandscape(IN BOOL bEnable) ;	void EnablePageControls(IN BOOL bEnable) ;	void EnableOriginalSelection(IN BOOL bEnable);#if 0	void EnableResizedSelection(IN BOOL bEnable);#endif	void FillPageList(IN uint nPages);	BOOL GetBitmapOpenFilename(OUT tstring& tstrFileName);	void GetDefaultPageSpec(OUT ::PageSpec& ps, IN const ::MarginSpec& ms, 							IN BOOL bLandscape, IN BOOL bEvenMargins) const;	// IF TEMPLATE ID IS NULL NO CUSTOM TEMPLATE IS USED	BOOL GetOpenFileName(OUT tstring& tstrFileName, IN tstring& tstrTitle, IN LPTSTR lptstrFilter, WORD wIDTemplate);	BOOL GetPosterOpenFileName(OUT tstring& tstrFileName);	BOOL GetPoserSaveFileName(OUT tstring& tstrFileName, OUT BOOL& bSourceSelection) ;	BOOL GetSaveOriginalAsBitmapFileName(		OUT tstring& tstrFileName, OUT BOOL& bSourceSelection, OUT RECTD& rdSave_Inches, OUT double& dDPI) ;	class PRListViewDialog *GetResizedDialog(void) ;	class PRListViewDialog *GetOriginalSourceDialog(void) ;	void GetResizedSourceSpecForPage(IN uint uiPage, IN HENHMETAFILE hMeta, OUT ::SourceSpec& ssResized);	BOOL IsAutoRotateEnabled(void) const;	BOOL IsLandscapeEnabled(void) const;	BOOL IsOriginalSelectionEnabled(void) const;	BOOL IsValidMosaicSize(const SIZE& szMosaic, 		const ::RenderSpec &rs, const ::PageSpec& ps, const ::SourceSpec& ss) const;	BOOL IsValidPageSpec(IN const ::PageSpec ps, IN double dMinPrintable) const;	BOOL IsValidSourceSelection(IN const RECTD& rdSelection_Inches) const;	BOOL IsValidZoom(double dZoom, const ::RenderSpec &rs, const ::PageSpec& ps, const ::SourceSpec& ss) const ;	void MakeZoomSettingsConsistent(void) ;	void OnHelpAbout(void);	void OnHelpDocumentation(void);	void OnOpenFile(IN const tstring& tstrFileName, class PRDataSource *pprdsNew);	void OnNewDataSource(::PRDataSource *pprdsNew);	void OnSaveOriginalAsBitmapCommand(void) ;	void OnSavePosterCommand(void);	void OnPrintCommand(void);	void OnZoomEditBoxEntry(void);	BOOL ReadAutoRotate(void) const;	//BOOL ReadBW(void) const;	BOOL ReadEvenMargins(void) const;	BOOL ReadLandscape(void) const;	BOOL ReadNoCutGuidelines(void) const ;	BOOL ReadOriginalAll(void) const;#if 0	BOOL ReadResizedAll(void) const;#endif	BOOL ReadSelectedPage(OUT uint& uiPage) const;	BOOL ReadSelectedPrinter(OUT tstring& tstr);	BOOL ReadSourceSelection(RECTD& rdSelection_Inches) const;	BOOL ReadZoomEditBox(OUT double& dZoom) const;	void ResetResizedViewableList(void);	void SelectPage(uint uiPage);	BOOL SetSourceSelection(IN BOOL bHasSelectin, IN const RECTD* prdSelection_Inches);	void SetDialogTitle(IN const tstring& tstrJobName);	void UpdateOriginalPageSpec(void) ;	BOOL UpdateResizedPageSpec(PCDEVMODE pdmNew = NULL) ;	void WriteAutoRotate(IN BOOL b) ;	void WriteEvenMargins(IN BOOL b) ;	void WriteImageInfo(IN BOOL bClear, IN PRListViewDialog *pprlvd, IN LPCTSTR lptstrTitle, 						IN const SIZED *pszdImage, IN const double *pdZoom);	void WriteLandscape(IN BOOL b) ;	void WriteNoCutGuidelines(IN BOOL b) ;	void WriteOriginalAll(IN BOOL b) ;	void WriteResizedAll(IN BOOL b) ;	void WriteOriginalImageInfo(void);	void WriteResizedImageInfo(void);	void WriteSelectedPage(IN uint uiPage) ;	BOOL WriteSelectedPrinter(IN LPCTSTR lptstrPrinterName);	void WriteZoom(IN double dZoom);	HENHMETAFILE m_hMetaForPage;	HENHMETAFILE m_hMetaDraftForPage;	//::PrintPreviewDataSource m_ppds;	tstring m_tstrCommandLine;	class ProgressDialogWindow *m_pdwWaitingForSpoolerData;	HICON m_hIcon;	class TabDialogsCtrl *m_pTabDialogs;	class PRDataSource *m_pDataSource;	DevModeKeeper *m_pdmKeeper;	class RulerDrawerProvider* m_prdp;	tstring m_tstrLastPrinterSelected;	// ADD TO NOTIFY TARGET LIST	HWND m_hwndOriginalListView;	HWND m_hwndResizedListView;	::RenderSpec m_rsResized;	::PageSpec m_psResized;	//6/3 PUT INTO THE PAGESPEC	//BOOL m_bRotatedPSResized;	::SourceSpec m_ssResized;	::MarginSpec m_msResized;	::RenderSpec m_rsOriginal;	::PageSpec m_psOriginal;	::SourceSpec m_ssOriginal;	::MarginSpec m_msOriginal;	SIZED m_szdMinSelectionBox;// ****// **** static// ****private:	//static UINT_PTR CALLBACK TheirGetFileNameCommDlgHook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) ;	//static UINT_PTR CALLBACK TheirSavePosterFileCommDlgHook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) ;	//static UINT_PTR CALLBACK TheirSaveOriginalAsBitmapFileCommDlgHook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) ;	};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -