00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _CCPRINTUIPROPPAGE_H_
00028 #define _CCPRINTUIPROPPAGE_H_
00029
00030 #include "devmode.h"
00031 #include "CCPrintPropPage.h"
00032 #include "CCPrintRegistry.h"
00033
00037 class CCPrintUIPropPage : public CCPrintPropPage
00038 {
00039 public:
00040
00042 CCPrintUIPropPage(UINT uResourceID, HANDLE hPrinter, IPrintOemDriverUI* pHelper, POEMDEV pDevMode = NULL);
00043
00044 protected:
00045
00047 POEMDEV m_pDevMode;
00049 HANDLE m_hPrinter;
00051 PFNCOMPROPSHEET m_pfnComPropSheet;
00053 HANDLE m_hComPropSheet;
00055 HANDLE m_hPage;
00056
00057 public:
00062 bool IsDevicePage() const {return (m_pDevMode == NULL);};
00069 void SetCallbackData(PFNCOMPROPSHEET pfnComPropSheet, HANDLE hComPropSheet, HANDLE hPage) {m_pfnComPropSheet = pfnComPropSheet; m_hComPropSheet = hComPropSheet; m_hPage = hPage;};
00070
00071 protected:
00072
00079 bool GetRegistryBool(LPCTSTR lpSetting, bool bDefault) const {return CCPrintRegistry::GetRegistryBool(m_hPrinter, lpSetting, bDefault);};
00086 int GetRegistryInt(LPCTSTR lpSetting, int nDefault) const {return CCPrintRegistry::GetRegistryInt(m_hPrinter, lpSetting, nDefault);};
00093 std::tstring GetRegistryString(LPCTSTR lpSetting, LPCTSTR lpDefault) const {return CCPrintRegistry::GetRegistryString(m_hPrinter, lpSetting, lpDefault);};
00099 void SetRegistryInt(LPCTSTR lpSetting, int nValue) const {CCPrintRegistry::SetRegistryInt(m_hPrinter, lpSetting, nValue);};
00100
00104 void SetChanged()
00105 {
00106 if (m_hDlg != NULL)
00107 ::PostMessage(GetParent(m_hDlg), PSM_CHANGED, (WPARAM)m_hDlg, 0);
00108 }
00109 };
00110
00111 #endif //#define _CCPRINTUIPROPPAGE_H_