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.

89 lines
2.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. dumbprop.cpp
  7. Dummy property sheet to put up to avoid MMC's handlig of
  8. the property verb.
  9. FILE HISTORY:
  10. */
  11. #include "stdafx.h"
  12. #include "dumbprop.h"
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. /////////////////////////////////////////////////////////////////////////////
  19. //
  20. // CDummyProperties holder
  21. //
  22. /////////////////////////////////////////////////////////////////////////////
  23. CDummyProperties::CDummyProperties
  24. (
  25. ITFSNode * pNode,
  26. IComponentData * pComponentData,
  27. LPCTSTR pszSheetName
  28. ) : CPropertyPageHolderBase(pNode, pComponentData, pszSheetName)
  29. {
  30. m_fSetDefaultSheetPos = FALSE;
  31. AddPageToList((CPropertyPageBase*) &m_pageGeneral);
  32. }
  33. CDummyProperties::~CDummyProperties()
  34. {
  35. RemovePageFromList((CPropertyPageBase*) &m_pageGeneral, FALSE);
  36. }
  37. /////////////////////////////////////////////////////////////////////////////
  38. // CDummyPropGeneral property page
  39. //IMPLEMENT_DYNCREATE(CDummyPropGeneral, CPropertyPageBase)
  40. CDummyPropGeneral::CDummyPropGeneral() : CPropertyPageBase(CDummyPropGeneral::IDD)
  41. {
  42. //{{AFX_DATA_INIT(CDummyPropGeneral)
  43. //}}AFX_DATA_INIT
  44. }
  45. CDummyPropGeneral::~CDummyPropGeneral()
  46. {
  47. }
  48. void CDummyPropGeneral::DoDataExchange(CDataExchange* pDX)
  49. {
  50. CPropertyPageBase::DoDataExchange(pDX);
  51. //{{AFX_DATA_MAP(CDummyPropGeneral)
  52. //}}AFX_DATA_MAP
  53. }
  54. BEGIN_MESSAGE_MAP(CDummyPropGeneral, CPropertyPageBase)
  55. //{{AFX_MSG_MAP(CDummyPropGeneral)
  56. ON_WM_CREATE()
  57. //}}AFX_MSG_MAP
  58. END_MESSAGE_MAP()
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CDummyPropGeneral message handlers
  61. int CDummyPropGeneral::OnCreate(LPCREATESTRUCT lpCreateStruct)
  62. {
  63. if (CPropertyPageBase::OnCreate(lpCreateStruct) == -1)
  64. return -1;
  65. RECT rect;
  66. ::GetWindowRect(lpCreateStruct->hwndParent, &rect);
  67. ::SetWindowPos(lpCreateStruct->hwndParent, HWND_BOTTOM, 0, 0, 0, 0, SWP_HIDEWINDOW);
  68. ::PropSheet_PressButton(lpCreateStruct->hwndParent, PSBTN_CANCEL);
  69. return 0;
  70. }