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.

92 lines
2.4 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. //if this is not done, deadlock can happen
  32. EnablePeekMessageDuringNotifyConsole(TRUE);
  33. AddPageToList((CPropertyPageBase*) &m_pageGeneral);
  34. }
  35. CDummyProperties::~CDummyProperties()
  36. {
  37. RemovePageFromList((CPropertyPageBase*) &m_pageGeneral, FALSE);
  38. }
  39. /////////////////////////////////////////////////////////////////////////////
  40. // CDummyPropGeneral property page
  41. //IMPLEMENT_DYNCREATE(CDummyPropGeneral, CPropertyPageBase)
  42. CDummyPropGeneral::CDummyPropGeneral() : CPropertyPageBase(CDummyPropGeneral::IDD)
  43. {
  44. //{{AFX_DATA_INIT(CDummyPropGeneral)
  45. //}}AFX_DATA_INIT
  46. }
  47. CDummyPropGeneral::~CDummyPropGeneral()
  48. {
  49. }
  50. void CDummyPropGeneral::DoDataExchange(CDataExchange* pDX)
  51. {
  52. CPropertyPageBase::DoDataExchange(pDX);
  53. //{{AFX_DATA_MAP(CDummyPropGeneral)
  54. //}}AFX_DATA_MAP
  55. }
  56. BEGIN_MESSAGE_MAP(CDummyPropGeneral, CPropertyPageBase)
  57. //{{AFX_MSG_MAP(CDummyPropGeneral)
  58. ON_WM_CREATE()
  59. //}}AFX_MSG_MAP
  60. END_MESSAGE_MAP()
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CDummyPropGeneral message handlers
  63. int CDummyPropGeneral::OnCreate(LPCREATESTRUCT lpCreateStruct)
  64. {
  65. if (CPropertyPageBase::OnCreate(lpCreateStruct) == -1)
  66. return -1;
  67. RECT rect;
  68. ::GetWindowRect(lpCreateStruct->hwndParent, &rect);
  69. ::SetWindowPos(lpCreateStruct->hwndParent, HWND_BOTTOM, 0, 0, 0, 0, SWP_HIDEWINDOW);
  70. ::PropSheet_PressButton(lpCreateStruct->hwndParent, PSBTN_CANCEL);
  71. return 0;
  72. }