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.

119 lines
3.9 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to
  4. // existing Microsoft documentation.
  5. //
  6. //
  7. //
  8. //
  9. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  10. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  11. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  12. // PURPOSE.
  13. //
  14. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  15. //
  16. //
  17. //
  18. //==============================================================;
  19. #ifndef _SPACE_H
  20. #define _SPACE_H
  21. #include "globals.h"
  22. #include "DeleBase.h"
  23. //forward declaration
  24. class CSpaceVehicle;
  25. class CRocket : public CDelegationBase {
  26. public:
  27. CRocket(_TCHAR *szName, int id, LONG lWeight, LONG lHeight, LONG lPayload, CSpaceVehicle *pParent);
  28. virtual ~CRocket();
  29. virtual const _TCHAR *GetDisplayName(int nCol = 0);
  30. virtual const GUID & getNodeType() { return thisGuid; }
  31. virtual const int GetBitmapIndex() { return INDEX_SPACEICON; }
  32. BOOL getDeletedStatus() { return isDeleted; }
  33. public:
  34. // virtual functions go here (for MMCN_*)
  35. virtual HRESULT OnRename(LPOLESTR pszNewName);
  36. virtual HRESULT OnSelect(CComponent *pComponent, IConsole *pConsole, BOOL bScope, BOOL bSelect);
  37. virtual HRESULT CreatePropertyPages(IPropertySheetCallback *lpProvider, LONG_PTR handle);
  38. virtual HRESULT HasPropertySheets();
  39. virtual HRESULT GetWatermarks(HBITMAP *lphWatermark,
  40. HBITMAP *lphHeader,
  41. HPALETTE *lphPalette,
  42. BOOL *bStretch);
  43. virtual HRESULT OnPropertyChange(IConsole *pConsole, CComponent *pComponent);
  44. virtual HRESULT OnToolbarCommand(IConsole *pConsole, MMC_CONSOLE_VERB verb, IDataObject *pDataObject);
  45. virtual HRESULT OnSetToolbar(IControlbar *pControlbar, IToolbar *pToolbar, BOOL bScope, BOOL bSelect);
  46. virtual HRESULT OnUpdateItem(IConsole *pConsole, long item, ITEM_TYPE itemtype);
  47. virtual HRESULT OnRefresh(IConsole *pConsole);
  48. virtual HRESULT OnDelete(IConsole *pConsoleComp);
  49. private:
  50. // {B95E11F5-6BE7-11d3-9156-00C04F65B3F9}
  51. static const GUID thisGuid;
  52. _TCHAR *szName;
  53. LONG lWeight;
  54. LONG lHeight;
  55. LONG lPayload;
  56. int nId;
  57. enum ROCKET_STATUS {RUNNING, PAUSED, STOPPED} iStatus;
  58. LONG_PTR m_ppHandle;
  59. static BOOL CALLBACK DialogProc(
  60. HWND hwndDlg, // handle to dialog box
  61. UINT uMsg, // message
  62. WPARAM wParam, // first message parameter
  63. LPARAM lParam // second message parameter
  64. );
  65. CSpaceVehicle* m_pParent;
  66. BOOL isDeleted;
  67. };
  68. class CSpaceVehicle : public CDelegationBase {
  69. public:
  70. CSpaceVehicle();
  71. virtual ~CSpaceVehicle();
  72. virtual const _TCHAR *GetDisplayName(int nCol = 0) { return _T("Future Vehicles"); }
  73. virtual const GUID & getNodeType() { return thisGuid; }
  74. virtual const int GetBitmapIndex() { return INDEX_SPACEICON; }
  75. virtual void SetScopeItemValue(HSCOPEITEM hscopeitem) { m_hParentHScopeItem = hscopeitem; }
  76. virtual HSCOPEITEM GetParentScopeItem() { return m_hParentHScopeItem; }
  77. public:
  78. // virtual functions go here (for MMCN_*)
  79. virtual HRESULT OnShow(IConsole *pConsole, BOOL bShow, HSCOPEITEM scopeitem);
  80. virtual HRESULT OnAddMenuItems(IContextMenuCallback *pContextMenuCallback, long *pInsertionsAllowed);
  81. virtual HRESULT OnMenuCommand(IConsole *pConsole, IConsoleNameSpace *pConsoleNameSpace, long lCommandID, IDataObject *piDataObject);
  82. private:
  83. enum { IDM_NEW_SPACE = 4 };
  84. // {B95E11F4-6BE7-11d3-9156-00C04F65B3F9}
  85. static const GUID thisGuid;
  86. private:
  87. enum { NUMBER_OF_CHILDREN = 4 };
  88. enum { MAX_NUMBER_OF_CHILDREN = 6 };
  89. CRocket *children[MAX_NUMBER_OF_CHILDREN];
  90. int m_cchildren;
  91. HSCOPEITEM m_hParentHScopeItem;
  92. };
  93. #endif // _SPACE_H