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.

165 lines
5.5 KiB

  1. /* *
  2. * Front Page IAthenaView implementation
  3. *
  4. * Apr 97: EricAn
  5. */
  6. #ifndef _FRNTPAGE_H
  7. #define _FRNTPAGE_H
  8. // for IAthenaView
  9. #include "browser.h"
  10. class CFrontBody;
  11. /////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Types
  14. //
  15. /////////////////////////////////////////////////////////////////////////////
  16. //
  17. // Exported functions
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. //
  21. // Global Exported Data
  22. //
  23. /////////////////////////////////////////////////////////////////////////////
  24. //
  25. // CCommonView
  26. //
  27. class CFrontPage :
  28. public IViewWindow,
  29. public IOleCommandTarget,
  30. public IMessageWindow
  31. {
  32. public:
  33. /////////////////////////////////////////////////////////////////////////
  34. //
  35. // OLE Interfaces
  36. //
  37. // IUnknown
  38. virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
  39. virtual ULONG STDMETHODCALLTYPE AddRef(void);
  40. virtual ULONG STDMETHODCALLTYPE Release(void);
  41. // IOleWindow
  42. HRESULT STDMETHODCALLTYPE GetWindow(HWND * lphwnd);
  43. HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
  44. // IViewWindow
  45. HRESULT STDMETHODCALLTYPE TranslateAccelerator(LPMSG lpmsg);
  46. HRESULT STDMETHODCALLTYPE UIActivate(UINT uState);
  47. HRESULT STDMETHODCALLTYPE CreateViewWindow(IViewWindow *lpPrevView, IAthenaBrowser * psb,
  48. RECT * prcView, HWND * phWnd);
  49. HRESULT STDMETHODCALLTYPE DestroyViewWindow();
  50. HRESULT STDMETHODCALLTYPE SaveViewState();
  51. HRESULT STDMETHODCALLTYPE OnPopupMenu(HMENU hMenu, HMENU hMenuPopup, UINT uID);
  52. // IOleCommandTarget
  53. virtual STDMETHODIMP QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[],
  54. OLECMDTEXT *pCmdText);
  55. virtual STDMETHODIMP Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdExecOpt,
  56. VARIANTARG *pvaIn, VARIANTARG *pvaOut);
  57. /////////////////////////////////////////////////////////////////////////
  58. // IMessageWindow
  59. //
  60. STDMETHOD(OnFrameWindowActivate)(THIS_ BOOL fActivate);
  61. STDMETHOD(GetCurCharSet)(THIS_ UINT *cp);
  62. STDMETHOD(UpdateLayout)(THIS_ BOOL fPreviewVisible, BOOL fPreviewHeader,
  63. BOOL fPreviewVert, BOOL fReload);
  64. STDMETHOD(GetMessageList)(THIS_ IMessageList ** ppMsgList) {return E_NOTIMPL;}
  65. //
  66. // Constructors, Destructors, and Initialization
  67. //
  68. CFrontPage();
  69. virtual ~CFrontPage();
  70. HRESULT HrInit(FOLDERID idFolder);
  71. /////////////////////////////////////////////////////////////////////////
  72. //
  73. // virtuals
  74. //
  75. /////////////////////////////////////////////////////////////////////////
  76. //
  77. // accessors
  78. //
  79. // LPITEMIDLIST PidlRoot() { return m_pidlRoot; }
  80. // LPFOLDERIDLIST Fidl() { return m_fidl; }
  81. HWND HwndOwner() { return m_hwndOwner; }
  82. private:
  83. BOOL LoadBaseSettings();
  84. BOOL SaveBaseSettings();
  85. /////////////////////////////////////////////////////////////////////////
  86. //
  87. // Callback Functions
  88. //
  89. // Note: All callbacks must be made static members to avoid having the
  90. // implicit "this" pointer passed as the first parameter.
  91. //
  92. static LRESULT CALLBACK FrontPageWndProc(HWND, UINT, WPARAM, LPARAM);
  93. /////////////////////////////////////////////////////////////////////////
  94. //
  95. // Message Handling
  96. //
  97. LRESULT WndProc(HWND, UINT, WPARAM, LPARAM);
  98. BOOL OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct);
  99. void OnSize(HWND hwnd, UINT state, int cxClient, int cyClient);
  100. LRESULT OnNotify(HWND hwnd, int idFrom, LPNMHDR pnmhdr);
  101. void OnSetFocus(HWND hwnd, HWND hwndOldFocus);
  102. void PostCreate();
  103. /////////////////////////////////////////////////////////////////////////
  104. //
  105. // Shell Interface Handling
  106. //
  107. BOOL OnActivate(UINT uActivation);
  108. BOOL OnDeactivate();
  109. private:
  110. /////////////////////////////////////////////////////////////////////////
  111. //
  112. // Private Data
  113. //
  114. /////////////////////////////////////////////////////////////////////////
  115. // Shell Stuff
  116. UINT m_cRef;
  117. FOLDERID m_idFolder;
  118. FOLDERTYPE m_ftType;
  119. IAthenaBrowser *m_pShellBrowser;
  120. BOOL m_fFirstActive;
  121. UINT m_uActivation;
  122. HWND m_hwndOwner; // Owner window
  123. HWND m_hwnd; // Our window
  124. HWND m_hwndCtlFocus; // Child control to set focus to
  125. #ifndef WIN16 // No RAS support in Win16
  126. HMENU m_hMenuConnect;
  127. #endif
  128. /////////////////////////////////////////////////////////////////////////
  129. // Child support
  130. CFrontBody *m_pBodyObj;
  131. IOleCommandTarget *m_pBodyObjCT;
  132. CStatusBar *m_pStatusBar;
  133. /////////////////////////////////////////////////////////////////////////
  134. // Language support
  135. /////////////////////////////////////////////////////////////////////////
  136. // Layout members
  137. };
  138. #endif // _FRNTPAGE_H