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.

70 lines
2.5 KiB

  1. #ifndef _FRAME_H
  2. #define _FRAME_H
  3. class CMDIFrame :
  4. public IOleInPlaceFrame
  5. {
  6. public:
  7. CMDIFrame();
  8. virtual ~CMDIFrame();
  9. // *** IUnknown methods ***
  10. virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, LPVOID FAR *);
  11. virtual ULONG STDMETHODCALLTYPE AddRef();
  12. virtual ULONG STDMETHODCALLTYPE Release();
  13. // *** IOleWindow methods ***
  14. virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *);
  15. virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL);
  16. // *** IOleInPlaceUIWindow methods ***
  17. virtual HRESULT STDMETHODCALLTYPE GetBorder(LPRECT);
  18. virtual HRESULT STDMETHODCALLTYPE RequestBorderSpace(LPCBORDERWIDTHS);
  19. virtual HRESULT STDMETHODCALLTYPE SetBorderSpace(LPCBORDERWIDTHS);
  20. virtual HRESULT STDMETHODCALLTYPE SetActiveObject(IOleInPlaceActiveObject *, LPCOLESTR);
  21. // *** IOleInPlaceFrame methods ***
  22. virtual HRESULT STDMETHODCALLTYPE InsertMenus(HMENU, LPOLEMENUGROUPWIDTHS);
  23. virtual HRESULT STDMETHODCALLTYPE SetMenu(HMENU, HOLEMENU, HWND);
  24. virtual HRESULT STDMETHODCALLTYPE RemoveMenus(HMENU);
  25. virtual HRESULT STDMETHODCALLTYPE SetStatusText(LPCOLESTR);
  26. virtual HRESULT STDMETHODCALLTYPE EnableModeless(BOOL);
  27. virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(LPMSG, WORD);
  28. static LRESULT CALLBACK ExtWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  29. static BOOL CALLBACK ExtOptDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  30. LRESULT WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  31. BOOL OptDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  32. HRESULT HrInit(LPSTR pszCmdLine);
  33. HRESULT TranslateAcclerator(LPMSG);
  34. private:
  35. HWND m_hwnd,
  36. m_hToolbar,
  37. m_hStatusbar,
  38. m_hwndClient,
  39. m_hwndFocus;
  40. BOOL m_fToolbar;
  41. BOOL m_fStatusbar;
  42. ULONG m_cRef;
  43. IOleInPlaceActiveObject *m_pInPlaceActiveObj;
  44. BOOL WMCreate(HWND hwnd);
  45. void WMDestroy();
  46. HRESULT HrWMCommand(HWND hwnd, int id, WORD wCmd);
  47. void WMNotify(WPARAM wParam, NMHDR* pnmhdr);
  48. void WMPaint();
  49. void WMSize();
  50. void SetToolbar();
  51. void SetStatusbar();
  52. void DoOptions();
  53. LRESULT WMInitMenuPopup(HWND hwnd, HMENU hmenuPopup, UINT uPos);
  54. HRESULT OpenDoc(LPSTR pszFileName);
  55. };
  56. typedef CMDIFrame *LPMDIFRAME;
  57. #endif //_FRAME_H