Source code of Windows XP (NT5)
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.

96 lines
2.3 KiB

  1. // genpage.h : header file
  2. //
  3. #ifndef _GEN_PAGE_
  4. #define _GEN_PAGE_
  5. #include "compsdef.h"
  6. enum YES_NO_ENTRIES {
  7. YESNO_NO,
  8. YESNO_YES
  9. };
  10. // These are checkbox states
  11. #define CHECKEDVALUE 1
  12. #define UNCHECKEDVALUE 0
  13. // These are our true/false values for the registry
  14. #define TRUEVALUE 1
  15. #define FALSEVALUE 0
  16. // Since TRUEVALUE = CHECKEDVALUE and FALSEVALUE = UNCHECKEDVALUE, we don't really need this.
  17. // This avoids dependency on that correlation
  18. #define GETREGVALUEFROMCHECKBOX(p) ((p) == UNCHECKEDVALUE) ? FALSEVALUE : TRUEVALUE
  19. #define GETCHECKBOXVALUEFROMREG(p) ((p) == FALSEVALUE) ? UNCHECKEDVALUE : CHECKEDVALUE
  20. // Data Structure for numeric registry entries, all pages
  21. typedef struct _NUM_REG_ENTRY {
  22. LPTSTR strFieldName;
  23. DWORD ulFieldValue;
  24. DWORD ulMultipleFactor; //for entries where the use specifies MB, KB, minutes, etc.
  25. DWORD ulDefaultValue;
  26. BOOL bIsChanged;
  27. } NUM_REG_ENTRY, *PNUM_REG_ENTRY;
  28. typedef struct _STRING_REG_ENTRY {
  29. LPTSTR strFieldName;
  30. CString strFieldValue;
  31. CString strDefaultValue;
  32. BOOL bIsChanged;
  33. } STRING_REG_ENTRY, *PSTRING_REG_ENTRY;
  34. void AFXAPI DDX_TexttoHex(CDataExchange* pDX, int nIDC, DWORD& value);
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CGenPage dialog
  37. class CGenPage : public CPropertyPage
  38. {
  39. DECLARE_DYNCREATE(CGenPage)
  40. // Construction
  41. public:
  42. CGenPage(UINT nIDTemplate, UINT nIDCaption = 0);
  43. CGenPage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
  44. ~CGenPage();
  45. // Dialog Data
  46. //{{AFX_DATA(CGenPage)
  47. // enum { IDD = _UNKNOWN_RESOURCE_ID_ };
  48. // NOTE - ClassWizard will add data members here.
  49. // DO NOT EDIT what you see in these blocks of generated code !
  50. //}}AFX_DATA
  51. /* PURE */ virtual void SaveInfo(void);
  52. CRegKey *m_rkMainKey;
  53. // Overrides
  54. // ClassWizard generate virtual function overrides
  55. //{{AFX_VIRTUAL(CGenPage)
  56. protected:
  57. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  58. //}}AFX_VIRTUAL
  59. // Implementation
  60. protected:
  61. // Generated message map functions
  62. //{{AFX_MSG(CGenPage)
  63. // NOTE: the ClassWizard will add member functions here
  64. //}}AFX_MSG
  65. BOOL m_bIsDirty;
  66. BOOL m_bSetChanged;
  67. void SaveNumericInfo(PNUM_REG_ENTRY lpbinNumEntries, int iNumEntries);
  68. void SaveStringInfo(PSTRING_REG_ENTRY lpbinStringEntries, int iStringEntries);
  69. DECLARE_MESSAGE_MAP()
  70. };
  71. #endif //_GEN_PAGE_