Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CPropertyPage Class Reference

#include <proppage.h>

Inheritance diagram for CPropertyPage:

CShellExtensionPage CDeviceProfileManagement CProfileAssociationPage CProfileInformationPage CMonitorProfileManagement CPrinterProfileManagement CScannerProfileManagement List of all members.

Public Member Functions

 CPropertyPage ()
virtual ~CPropertyPage ()
HPROPSHEETPAGE Handle ()
VOID EnableApplyButton ()
VOID DisableApplyButton ()
BOOL SettingChanged ()
VOID SettingChanged (BOOL b)
virtual BOOL OnCommand (WORD wNotifyCode, WORD wid, HWND hwndCtl)
virtual BOOL OnNotify (int idCtrl, LPNMHDR pnmh)
virtual BOOL OnInit ()
virtual BOOL OnDestroy ()
virtual BOOL OnHelp (LPHELPINFO pHelp)
virtual BOOL OnContextMenu (HWND hwnd)

Protected Attributes

PROPSHEETPAGE m_psp
HWND m_hwnd
HWND m_hwndSheet
HPROPSHEETPAGE m_hpsp
BOOL m_bChanged

Static Private Member Functions

BOOL CALLBACK DialogProc (HWND hwndPage, UINT uMsg, WPARAM wp, LPARAM lp)

Constructor & Destructor Documentation

CPropertyPage::CPropertyPage  ) 
 

Definition at line 27 of file proppage.cpp.

References DialogProc(), FALSE, m_bChanged, m_hpsp, m_psp, and NULL.

00027 { 00028 m_psp.dwSize = sizeof m_psp; 00029 m_psp.pfnDlgProc = (DLGPROC) DialogProc; 00030 m_psp.lParam = (LPARAM) this; 00031 m_psp.dwFlags = PSP_DEFAULT; // Can be overriden later 00032 m_hpsp = NULL; 00033 m_bChanged = FALSE; 00034 }

virtual CPropertyPage::~CPropertyPage  )  [inline, virtual]
 

Definition at line 57 of file proppage.h.

00057 {}


Member Function Documentation

BOOL CALLBACK CPropertyPage::DialogProc HWND  hwndPage,
UINT  uMsg,
WPARAM  wp,
LPARAM  lp
[static, private]
 

Definition at line 44 of file proppage.cpp.

References BOOL, DialogProc(), FALSE, GetWindowLongPtr(), m_hwnd, m_hwndSheet, OnCommand(), OnContextMenu(), OnDestroy(), OnHelp(), OnInit(), OnNotify(), SetWindowLongPtr(), and UINT.

Referenced by CPropertyPage(), and DialogProc().

00045 { 00046 00047 CPropertyPage *pcppMe = 00048 (CPropertyPage *) GetWindowLongPtr(hwndPage, DWLP_USER); 00049 00050 switch (uMsg) { 00051 00052 case WM_INITDIALOG: 00053 00054 // In this case, lp points to the PROPSHEETHEADER that created 00055 // us. We look into its lParam member for our this pointer, 00056 // and store this in the dialog's private data. This lets us 00057 // use the pointer to get at all of our overridable functions. 00058 00059 pcppMe = (CPropertyPage *) ((LPPROPSHEETPAGE) lp) -> lParam; 00060 00061 SetWindowLongPtr(hwndPage, DWLP_USER, (LONG_PTR) pcppMe); 00062 pcppMe -> m_hwnd = hwndPage; 00063 00064 // Now, see if the derived class has any initialization needs 00065 00066 return pcppMe -> OnInit(); 00067 00068 // Overridable processing for standard control notifications 00069 00070 case WM_COMMAND: 00071 00072 return pcppMe -> OnCommand(HIWORD(wp), LOWORD(wp), (HWND) lp); 00073 00074 case WM_DESTROY: 00075 00076 return pcppMe -> OnDestroy(); 00077 00078 case WM_HELP: 00079 00080 return pcppMe -> OnHelp((LPHELPINFO) lp); 00081 00082 case WM_CONTEXTMENU: 00083 00084 return pcppMe -> OnContextMenu((HWND) wp); 00085 00086 // Overridable processing for common control notifications 00087 00088 case WM_NOTIFY: { 00089 00090 // If the message is PSM_SETACTIVE, note the property sheet hwnd 00091 00092 LPNMHDR pnmh = (LPNMHDR) lp; 00093 00094 if (pnmh -> code == PSN_SETACTIVE) 00095 pcppMe -> m_hwndSheet = pnmh -> hwndFrom; 00096 return pcppMe -> OnNotify((int) wp, pnmh); 00097 } 00098 00099 } 00100 00101 return FALSE; // We didn't handle the message. 00102 }

VOID CPropertyPage::DisableApplyButton  )  [inline]
 

Definition at line 65 of file proppage.h.

References m_hwnd, m_hwndSheet, SendMessage(), and VOID().

Referenced by CProfileAssociationPage::OnInit(), CDeviceProfileManagement::OnInit(), CProfileAssociationPage::OnNotify(), CMonitorProfileManagement::OnNotify(), CPrinterProfileManagement::OnNotify(), and CDeviceProfileManagement::OnNotify().

00065 { 00066 SendMessage(m_hwndSheet, PSM_UNCHANGED, (WPARAM) m_hwnd, 0); 00067 }

VOID CPropertyPage::EnableApplyButton  )  [inline]
 

Definition at line 61 of file proppage.h.

References m_hwnd, m_hwndSheet, SendMessage(), and VOID().

Referenced by CDeviceProfileManagement::FillList(), CProfileAssociationPage::OnCommand(), and CPrinterProfileManagement::OnCommand().

00061 { 00062 SendMessage(m_hwndSheet, PSM_CHANGED, (WPARAM) m_hwnd, 0); 00063 }

HPROPSHEETPAGE CPropertyPage::Handle  ) 
 

Definition at line 38 of file proppage.cpp.

References m_hpsp, and m_psp.

Referenced by CICMUserInterface::InvokeCommand().

00038 { 00039 return m_hpsp = (m_hpsp ? m_hpsp : CreatePropertySheetPage(&m_psp)); 00040 }

virtual BOOL CPropertyPage::OnCommand WORD  wNotifyCode,
WORD  wid,
HWND  hwndCtl
[inline, virtual]
 

Reimplemented in CDeviceProfileManagement, CPrinterProfileManagement, CMonitorProfileManagement, and CProfileAssociationPage.

Definition at line 83 of file proppage.h.

References BOOL, FALSE, and OnCommand().

Referenced by DialogProc(), and OnCommand().

00083 { 00084 return FALSE; 00085 }

virtual BOOL CPropertyPage::OnContextMenu HWND  hwnd  )  [inline, virtual]
 

Reimplemented in CPrinterProfileManagement, CScannerProfileManagement, CMonitorProfileManagement, and CProfileAssociationPage.

Definition at line 96 of file proppage.h.

References BOOL, OnContextMenu(), and TRUE.

Referenced by DialogProc(), and OnContextMenu().

00096 { return TRUE; }

virtual BOOL CPropertyPage::OnDestroy  )  [inline, virtual]
 

Reimplemented in CProfileAssociationPage, and CProfileInformationPage.

Definition at line 93 of file proppage.h.

References BOOL, and FALSE.

Referenced by DialogProc().

00093 { return FALSE; }

virtual BOOL CPropertyPage::OnHelp LPHELPINFO  pHelp  )  [inline, virtual]
 

Reimplemented in CPrinterProfileManagement, CScannerProfileManagement, CMonitorProfileManagement, and CProfileAssociationPage.

Definition at line 95 of file proppage.h.

References BOOL, OnHelp(), and TRUE.

Referenced by DialogProc(), and OnHelp().

00095 { return TRUE; }

virtual BOOL CPropertyPage::OnInit  )  [inline, virtual]
 

Reimplemented in CDeviceProfileManagement, CPrinterProfileManagement, CScannerProfileManagement, CMonitorProfileManagement, CProfileAssociationPage, and CProfileInformationPage.

Definition at line 91 of file proppage.h.

References BOOL, and TRUE.

Referenced by DialogProc().

00091 { return TRUE; }

virtual BOOL CPropertyPage::OnNotify int  idCtrl,
LPNMHDR  pnmh
[inline, virtual]
 

Reimplemented in CDeviceProfileManagement, CPrinterProfileManagement, CMonitorProfileManagement, and CProfileAssociationPage.

Definition at line 87 of file proppage.h.

References BOOL, FALSE, and OnNotify().

Referenced by DialogProc(), and OnNotify().

00087 { 00088 return FALSE; 00089 }

VOID CPropertyPage::SettingChanged BOOL  b  )  [inline]
 

Definition at line 73 of file proppage.h.

References m_bChanged, and VOID().

00073 { 00074 m_bChanged = b; 00075 }

BOOL CPropertyPage::SettingChanged  )  [inline]
 

Definition at line 69 of file proppage.h.

References BOOL, and m_bChanged.

Referenced by CDeviceProfileManagement::FillList(), CProfileAssociationPage::OnCommand(), CPrinterProfileManagement::OnCommand(), CProfileAssociationPage::OnInit(), CDeviceProfileManagement::OnInit(), CProfileAssociationPage::OnNotify(), CMonitorProfileManagement::OnNotify(), CPrinterProfileManagement::OnNotify(), and CDeviceProfileManagement::OnNotify().

00069 { 00070 return m_bChanged; 00071 }


Member Data Documentation

BOOL CPropertyPage::m_bChanged [protected]
 

Definition at line 52 of file proppage.h.

Referenced by CPropertyPage(), and SettingChanged().

HPROPSHEETPAGE CPropertyPage::m_hpsp [protected]
 

Definition at line 50 of file proppage.h.

Referenced by CPropertyPage(), and Handle().

HWND CPropertyPage::m_hwnd [protected]
 

Definition at line 49 of file proppage.h.

Referenced by DialogProc(), DisableApplyButton(), and EnableApplyButton().

HWND CPropertyPage::m_hwndSheet [protected]
 

Definition at line 49 of file proppage.h.

Referenced by DialogProc(), DisableApplyButton(), and EnableApplyButton().

PROPSHEETPAGE CPropertyPage::m_psp [protected]
 

Definition at line 48 of file proppage.h.

Referenced by CPropertyPage(), and Handle().


The documentation for this class was generated from the following files:
Generated on Sat May 15 19:46:28 2004 for test by doxygen 1.3.7