|
///////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////
#ifndef __CeProperty_h__
#define __CeProperty_h__
#include "stdafx.h"
#include "cedialog.h"
#include <prsht.h>
///////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////
class CePropertySheet: public CeDialog
{
private:
PROPSHEETHEADER m_psh;
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam);
friend class CePropertyPage;
public:
CePropertySheet();
virtual ~CePropertySheet();
// undefined... ???
BOOL Create(LPCTSTR lpszCaption, HWND hParent);
int DoModal(LPCTSTR lpszCaption, HWND hParent);
int DoWizard(LPCTSTR lpszCaption, HWND hParent);
BOOL SetCurSel(int index);
BOOL SetCurSel(CePropertyPage* pPage);
BOOL AddPage(CePropertyPage* pPage);
void RemovePage(CePropertyPage* pPage);
void RemovePage(int index);
BOOL SetChanged(CePropertyPage* pPage);
void SetUnChanged(CePropertyPage* pPage);
void CancelToClose();
int QuerySiblings(WPARAM wParam, LPARAM lParam);
BOOL Apply();
void SetTitle(WORD wStyle, LPCTSTR lpszText);
void SetWizButtons(DWORD dwFlags);
BOOL PressButton(int iButton);
BOOL SetCurSelByID(int id);
void SetFinishText(LPCTSTR lpszText);
HWND GetTabControl();
HWND GetCurrentPageHwnd();
void RestartWindows();
void RebootSystem();
BOOL IsDialogMessage(MSG* pMsg);
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool &bHandled);
};
///////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////
class CePropertyPage: public CeDialog
{
private:
PROPSHEETPAGE m_psp;
static UINT CALLBACK PropSheetPageProc(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
static BOOL CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
void CommonConstruct(LPCTSTR lpszTemplateName, LPCTSTR lpszCaption);
friend class CePropertySheet;
public:
CePropertyPage(UINT nIDTemplate, LPCTSTR lpszCaption): CeDialog(nIDTemplate)
{ CommonConstruct(MAKEINTRESOURCE(nIDTemplate), lpszCaption); }
CePropertyPage(LPCTSTR lpszTemplateName, LPCTSTR lpszCaption): CeDialog(lpszTemplateName)
{ CommonConstruct(lpszTemplateName, lpszCaption); }
CePropertyPage(UINT nIDTemplate, UINT nIDCaption = 0): CeDialog(nIDTemplate)
{ CommonConstruct(MAKEINTRESOURCE(nIDTemplate), MAKEINTRESOURCE(nIDCaption)); }
CePropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0): CeDialog(lpszTemplateName)
{ CommonConstruct(lpszTemplateName, MAKEINTRESOURCE(nIDCaption)); }
virtual ~CePropertyPage();
//CePropertySheet& GetSheet();
//CePropertySheet& GetPropertySheet();
BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
LRESULT OnNotify(int nCtrlId, LPNMHDR pNMH, bool& bHandled);
LRESULT OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual BOOL OnApply();
virtual BOOL OnKillActive();
virtual BOOL OnSetActive();
virtual LRESULT OnQuerySiblings(WPARAM wParam, LPARAM lParam);
virtual BOOL OnQueryCancel();
// Only called for wizard pages
virtual void OnHelp();
virtual void OnReset();
virtual void OnBack();
virtual void OnNext();
virtual void OnFinish();
virtual void OnCancel();
virtual void OnOK();
};
#include "CeProperty.inl"
#endif // __CeProperty_h__
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.