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.

183 lines
4.6 KiB

  1. /*--------------------------------------------------------------------------*
  2. *
  3. * Microsoft Windows
  4. * Copyright (C) Microsoft Corporation, 1992 - 1999
  5. *
  6. * File: props.cpp
  7. *
  8. * Contents: Interface file for console property sheet and page(s)
  9. *
  10. * History: 05-Dec-97 JeffRo Created
  11. *
  12. *--------------------------------------------------------------------------*/
  13. #if !defined(AFX_PROPS_H__088693B7_6D93_11D1_802E_0000F875A9CE__INCLUDED_)
  14. #define AFX_PROPS_H__088693B7_6D93_11D1_802E_0000F875A9CE__INCLUDED_
  15. #if _MSC_VER >= 1000
  16. #pragma once
  17. #endif // _MSC_VER >= 1000
  18. // props.h : header file
  19. //
  20. #include "amc.h" // for CAMCApp::ProgramMode
  21. #include "smarticon.h"
  22. class CMainFrame;
  23. class CAMCDoc;
  24. class CConsolePropSheet;
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CConsolePropPage dialog
  27. class CConsolePropPage : public CPropertyPage
  28. {
  29. DECLARE_DYNCREATE(CConsolePropPage)
  30. // Construction
  31. public:
  32. CConsolePropPage();
  33. ~CConsolePropPage();
  34. // Dialog Data
  35. //{{AFX_DATA(CConsolePropPage)
  36. enum { IDD = IDD_PROPPAGE_CONSOLE };
  37. CButton m_wndDontSaveChanges;
  38. CButton m_wndAllowViewCustomization;
  39. CStatic m_wndModeDescription;
  40. CEdit m_wndTitle;
  41. CStatic m_wndIcon;
  42. int m_nConsoleMode;
  43. BOOL m_fDontSaveChanges;
  44. CString m_strTitle;
  45. BOOL m_fAllowViewCustomization;
  46. //}}AFX_DATA
  47. private:
  48. // this is exported by ordinal from shell32.dll
  49. // used here by permission of the shell team, specifically Chris Guzak (chrisg)
  50. // STDAPI_(int) PickIconDlg (HWND hwnd, LPTSTR pszIconPath, UINT cchIconPath, int * piIconIndex)
  51. typedef int (STDAPICALLTYPE* PickIconDlg_Ptr)(HWND, LPTSTR, UINT, int *);
  52. enum { PickIconDlg_Ordinal = 62 };
  53. HINSTANCE m_hinstSelf;
  54. CSmartIcon m_icon;
  55. CString m_strIconFile;
  56. int m_nIconIndex;
  57. bool m_fTitleChanged;
  58. bool m_fIconChanged;
  59. CAMCDoc* const m_pDoc;
  60. CString m_strDescription[eMode_Count];
  61. void SetDescriptionText ();
  62. void EnableDontSaveChanges();
  63. // Overrides
  64. // ClassWizard generate virtual function overrides
  65. //{{AFX_VIRTUAL(CConsolePropPage)
  66. public:
  67. virtual void OnOK();
  68. protected:
  69. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  70. //}}AFX_VIRTUAL
  71. // Implementation
  72. protected:
  73. // Generated message map functions
  74. //{{AFX_MSG(CConsolePropPage)
  75. afx_msg void OnSelendokConsoleMode();
  76. virtual BOOL OnInitDialog();
  77. afx_msg void OnDontSaveChanges();
  78. afx_msg void OnAllowViewCustomization();
  79. afx_msg void OnChangeIcon();
  80. afx_msg void OnChangeCustomTitle();
  81. //}}AFX_MSG
  82. IMPLEMENT_CONTEXT_HELP(g_aHelpIDs_IDD_PROPPAGE_CONSOLE);
  83. DECLARE_MESSAGE_MAP()
  84. };
  85. /////////////////////////////////////////////////////////////////////////////
  86. // CConsolePropPage dialog
  87. class CDiskCleanupPage : public CPropertyPage
  88. {
  89. DECLARE_DYNCREATE(CDiskCleanupPage)
  90. // Construction
  91. public:
  92. CDiskCleanupPage();
  93. ~CDiskCleanupPage();
  94. // Dialog Data
  95. enum { IDD = IDD_DISK_CLEANUP};
  96. virtual BOOL OnInitDialog();
  97. IMPLEMENT_CONTEXT_HELP(g_aHelpIDs_IDD_PROPPAGE_DISK_CLEANUP);
  98. // Generated message map functions
  99. protected:
  100. //{{AFX_MSG(CDiskCleanupPage)
  101. afx_msg void OnDeleteTemporaryFiles();
  102. //}}AFX_MSG
  103. DECLARE_MESSAGE_MAP()
  104. private:
  105. SC ScRecalculateUsedSpace();
  106. };
  107. /////////////////////////////////////////////////////////////////////////////
  108. // CConsolePropSheet
  109. class CConsolePropSheet : public CPropertySheet
  110. {
  111. DECLARE_DYNAMIC(CConsolePropSheet)
  112. // Construction
  113. public:
  114. CConsolePropSheet(UINT nIDCaption = IDS_CONSOLE_PROPERTIES, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
  115. CConsolePropSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
  116. private:
  117. void CommonConstruct();
  118. // Attributes
  119. public:
  120. CConsolePropPage m_ConsolePage;
  121. CDiskCleanupPage m_diskCleanupPage;
  122. // Operations
  123. public:
  124. void SetTitle (LPCTSTR pszTitle);
  125. // Overrides
  126. // ClassWizard generated virtual function overrides
  127. //{{AFX_VIRTUAL(CConsolePropSheet)
  128. public:
  129. virtual INT_PTR DoModal();
  130. //}}AFX_VIRTUAL
  131. // Implementation
  132. public:
  133. virtual ~CConsolePropSheet();
  134. // Generated message map functions
  135. protected:
  136. //{{AFX_MSG(CConsolePropSheet)
  137. virtual BOOL OnInitDialog();
  138. //}}AFX_MSG
  139. DECLARE_MESSAGE_MAP()
  140. };
  141. /////////////////////////////////////////////////////////////////////////////
  142. //{{AFX_INSERT_LOCATION}}
  143. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  144. #endif // !defined(AFX_PROPS_H__088693B7_6D93_11D1_802E_0000F875A9CE__INCLUDED_)