Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
//+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1998 - 1999
//
// File: genpage.h
//
//--------------------------------------------------------------------------
#ifndef _GENPAGE_H
#define _GENPAGE_H
// genpage.h : header file
//
#include <tfcprop.h>
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
// class CAutoDeletePropPage
//
// This object is the backbone for property page
// that will *destroy* itself when no longer needed.
// The purpose of this object is to maximize code reuse
// among the various pages in the snapin wizards.
//
//
class CAutoDeletePropPage : public PropertyPage { public: // Construction
CAutoDeletePropPage(UINT uIDD); virtual ~CAutoDeletePropPage();
protected: // Dialog Data
// Overrides
virtual BOOL OnSetActive(); virtual BOOL UpdateData(BOOL fSuckFromDlg = TRUE); void OnHelp(LPHELPINFO lpHelp); void OnContextHelp(HWND hwnd); bool HasContextHelp(int nDlgItem);
// Implementation
protected: virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
// This mechanism deletes the CAutoDeletePropPage object
// when the wizard is finished
struct { INT cWizPages; // Number of pages in wizard
LPFNPSPCALLBACK pfnOriginalPropSheetPageProc; } m_autodeleteStuff;
static UINT CALLBACK S_PropSheetPageProc(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
protected: CString m_strHelpFile; // Name for the .hlp file
CString m_strCaption; // Name for the .hlp file
const DWORD * m_prgzHelpIDs; // Optional: Pointer to an array of help IDs
public: void SetCaption(UINT uStringID); void SetCaption(LPCTSTR pszCaption); void SetHelp(LPCTSTR szHelpFile, const DWORD rgzHelpIDs[]); void EnableDlgItem(INT nIdDlgItem, BOOL fEnable);
}; // CAutoDeletePropPage
#include <gpedit.h>
//////////////////////////////
// hand-hewn pages
/////////////////////////////////////////
// CCertTemplateGeneralPage
class CCertTemplateGeneralPage : public CAutoDeletePropPage { public: enum { IID_DEFAULT = IDD_CERTIFICATE_TEMPLATE_PROPERTIES_GENERAL_PAGE };
// Construction
public: CCertTemplateGeneralPage(HCERTTYPE hCertType, UINT uIDD = IID_DEFAULT); ~CCertTemplateGeneralPage();
void SetItemTextWrapper(UINT nID, int *piItem, BOOL fDoInsert, BOOL *pfFirstUsageItem);
// Dialog Data
HWND m_hwndPurposesList; HWND m_hwndOtherInfoList;
// Overrides
public: BOOL OnApply(); BOOL OnInitDialog(); protected: BOOL UpdateData(BOOL fSuckFromDlg = TRUE);
// Implementation
protected: void OnDestroy(); BOOL OnCommand(WPARAM wParam, LPARAM lParam);
public: LONG_PTR m_hConsoleHandle; // Handle given to the snap-in by the console
HCERTTYPE m_hCertType;
private: BOOL m_bUpdate; };
/////////////////////////////////////////
// CCertTemplateSelectPage
INT_PTR SelectCertTemplateDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
class CCertTemplateSelectDialog { // Construction
public: CCertTemplateSelectDialog(HWND hParent = NULL); ~CCertTemplateSelectDialog();
// Dialog Data
enum { IDD = IDD_SELECT_CERTIFICATE_TEMPLATE }; HWND m_hDlg; HWND m_hwndCertTypeList;
// Overrides
public: BOOL OnInitDialog(HWND hDlg); void OnOK(); void OnHelp(LPHELPINFO lpHelp); void OnContextHelp(HWND hwnd); bool HasContextHelp(int nDlgItem);
protected: BOOL UpdateData(BOOL fSuckFromDlg = TRUE);
public: void SetCA(HCAINFO hCAInfo, bool fAdvancedServer); void SetHelp(LPCTSTR szHelpFile, const DWORD rgzHelpIDs[]);
// Implementation
//protected:
public: void OnDestroy(); void OnSelChange(NMHDR * pNotifyStruct); BOOL OnCommand(WPARAM wParam, LPARAM lParam); BOOL OnNotify(UINT idCtrl, NMHDR* pnmh);
protected: CString m_strHelpFile; // Name for the .hlp file
const DWORD * m_prgzHelpIDs; // Optional: Pointer to an array of help IDs
bool m_fAdvancedServer; CTemplateList m_TemplateList;
public: HCAINFO m_hCAInfo; };
#endif // _GENPAGE_H
|