00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
#if !defined(DEVICE_PROFILE_UI)
00026 
00027 #define DEVICE_PROFILE_UI
00028 
00029 
#include    "PropPage.H"
00030 
#include    "Profile.H"
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 #define DEVLIST_ONINIT   0x0001
00066 #define DEVLIST_CHANGED  0x0002
00067 #define DEVLIST_NOSELECT 0x0004
00068 
00069 class CDeviceProfileManagement : 
public CShellExtensionPage {
00070 
00071     DWORD           m_dwType;       
00072 
00073 
protected:
00074 
00075     CUintArray      m_cuaRemovals;  
00076     CProfileArray   m_cpaAdds;      
00077     CProfileArray   m_cpaProfile;   
00078     CString         m_csDevice;     
00079     HWND            
m_hwndList;     
00080     BOOL            m_bCMYK;        
00081     BOOL            m_bReadOnly;    
00082                                     
00083     
virtual void    InitList();
00084     
virtual void    FillList(DWORD dwFlags = 0);
00085 
00086     
void            GetDeviceTypeString(DWORD dwType,
CString& csDeviceName);
00087 
00088 
public:
00089 
00090     
CDeviceProfileManagement(LPCTSTR lpstrName, HINSTANCE hiWhere, 
int idPage,
00091                              DWORD  dwType);
00092     ~CDeviceProfileManagement() {}
00093 
00094 
00095     
virtual BOOL    OnInit();
00096     
virtual BOOL    OnCommand(WORD wNotifyCode, WORD wid, HWND hwndCtl);
00097     
virtual BOOL    OnNotify(
int idCtrl, LPNMHDR pnmh);
00098 };
00099 
00100 
00101 
00102 
00103 class CAddProfileDialog {
00104 
00105     CStringArray csa_Files;
00106 
00107     
static UINT_PTR 
APIENTRY OpenFileHookProc(HWND hDlg, UINT uMessage, WPARAM wp,
00108                                           LPARAM lp);
00109 
00110 
public:
00111 
00112     
CAddProfileDialog(HWND hwndOwner, HINSTANCE hi);
00113     ~CAddProfileDialog() { 
csa_Files.
Empty(); }
00114 
00115     unsigned  ProfileCount()              { 
return csa_Files.
Count(); }
00116     LPCTSTR   
ProfileName(
unsigned u)     { 
return csa_Files[u]; }
00117     CString   ProfileNameAndExtension(
unsigned u) 
00118                                           { 
return csa_Files[u].NameAndExtension(); }
00119     void      AddProfile(LPCTSTR str)     { 
csa_Files.
Add(str); }
00120 };
00121 
00122 
00123 
00124 
00125 
00126 class CPrinterProfileManagement : 
public CDeviceProfileManagement {
00127 
00128 
protected:
00129 
00130     unsigned    m_uDefault;    
00131     BOOL        m_bManualMode; 
00132     BOOL        m_bAdminAccess;
00133     BOOL        m_bLocalPrinter;
00134 
00135     
virtual void    InitList();
00136     
virtual void    FillList(DWORD dwFlags = 0);
00137 
00138 
public:
00139 
00140     
CPrinterProfileManagement(LPCTSTR lpstrName, HINSTANCE hiWhere);
00141     ~CPrinterProfileManagement() {}
00142 
00143     
virtual BOOL    OnInit();
00144     
virtual BOOL    OnCommand(WORD wNotifyCode, WORD wid, HWND hwndCtl);
00145     
virtual BOOL    OnNotify(
int idCtrl, LPNMHDR pnmh);
00146 
00147     
virtual BOOL    OnHelp(LPHELPINFO pHelp);
00148     
virtual BOOL    OnContextMenu(HWND hwnd);
00149 };
00150 
00151 
00152 
00153 
00154 
00155 class CScannerProfileManagement : 
public CDeviceProfileManagement {
00156 
00157 
public:
00158 
00159     
CScannerProfileManagement(LPCTSTR lpstrName, HINSTANCE hiWhere);
00160     ~CScannerProfileManagement() {}
00161 
00162     
virtual BOOL    OnInit();
00163 
00164     
virtual BOOL    OnHelp(LPHELPINFO pHelp);
00165     
virtual BOOL    OnContextMenu(HWND hwnd);
00166 };
00167 
00168 
00169 
00170 
00171 
00172 
00173 class CMonitorProfileManagement : 
public CDeviceProfileManagement {
00174 
00175 
protected:
00176 
00177     unsigned    m_uDefault;              
00178     CString     m_csDeviceFriendlyName;  
00179 
00180     
virtual void    InitList();
00181     
virtual void    FillList(DWORD dwFlags = 0);
00182 
00183 
public:
00184 
00185     
CMonitorProfileManagement(LPCTSTR lpstrName, LPCTSTR lpstrFriendlyName, HINSTANCE hiWhere);
00186     ~CMonitorProfileManagement() {}
00187 
00188     
virtual BOOL    OnInit();
00189     
virtual BOOL    OnCommand(WORD wNotifyCode, WORD wid, HWND hwndCtl);
00190     
virtual BOOL    OnNotify(
int idCtrl, LPNMHDR pnmh);
00191 
00192     
virtual BOOL    OnHelp(LPHELPINFO pHelp);
00193     
virtual BOOL    OnContextMenu(HWND hwnd);
00194 };
00195 
00196 
#endif