home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / oleview / mainfrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.6 KB  |  86 lines

  1. // mainfrm.h : interface of the CMainFrame class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. // This is a part of the Microsoft Foundation Classes C++ library.
  6. // Copyright (C) 1992-1998 Microsoft Corporation
  7. // All rights reserved.
  8. //
  9. // This source code is only intended as a supplement to the
  10. // Microsoft Foundation Classes Reference and related
  11. // electronic documentation provided with the library.
  12. // See these sources for detailed information regarding the
  13. // Microsoft Foundation Classes product.
  14.  
  15. #ifndef _MAINFRM_H_
  16. #define _MAINFRM_H_
  17.  
  18. // OnUpdate( lHint ) flags
  19. #define UPD_ALL                0x00000000
  20. #define UPD_NOOBJECTVIEW       0x00000001
  21. #define UPD_NOINTERFACEVIEW    0x00000002
  22. #define UPD_NOIFACELISTVIEW    0x00000004
  23. #define UPD_NORELOAD           0x00000008
  24.  
  25. void WINAPI ViewInterface( HWND hwnd, REFIID riid, IUnknown *punk );
  26.  
  27. class CObjTreeView ;
  28. class CRegistryView ;
  29.  
  30. class CMainFrame : public CFrameWnd
  31. {
  32. friend class COle2ViewApp ;
  33. protected: // create from serialization only
  34.     CMainFrame();
  35.     DECLARE_DYNCREATE(CMainFrame)
  36.     BOOL SavePosition() ;
  37.     BOOL RestorePosition(int nCmdShow) ;
  38.  
  39. // Implementation
  40. public:
  41.     virtual ~CMainFrame();
  42.     virtual BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE,
  43.                 CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
  44.     virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  45. #ifdef _DEBUG
  46.     virtual void AssertValid() const;
  47.     virtual void Dump(CDumpContext& dc) const;
  48. #endif
  49.  
  50.  
  51. public:
  52.     CSplitterWnd    m_wndSplitter ;
  53.     CStatusBar      m_wndStatusBar;
  54.     CToolBar        m_wndToolBar;
  55.  
  56.     CObjTreeView*   m_pObjTreeView ;
  57.     CRegistryView*  m_pObjectView ;
  58.  
  59. // Generated message map functions
  60. protected:
  61.     //{{AFX_MSG(CMainFrame)
  62.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  63.     afx_msg void OnDestroy();
  64.     afx_msg void OnFileRunREGEDIT();
  65.     afx_msg void OnViewRefresh();
  66.     afx_msg void OnUpdateViewRefresh(CCmdUI* pCmdUI);
  67.     afx_msg void OnSysColorChange();
  68.     afx_msg void OnObjectDelete();
  69.     afx_msg void OnUpdateObjectDelete(CCmdUI* pCmdUI);
  70.     afx_msg void OnObjectVerify();
  71.     afx_msg void OnUpdateObjectVerify(CCmdUI* pCmdUI);
  72.     afx_msg void OnFileViewTypeLib();
  73.     afx_msg void OnUseInProcServer();
  74.     afx_msg void OnUpdateUseInProcServer(CCmdUI* pCmdUI);
  75.     afx_msg void OnUseInProcHandler();
  76.     afx_msg void OnUpdateUseInProcHandler(CCmdUI* pCmdUI);
  77.     afx_msg void OnUseLocalServer();
  78.     afx_msg void OnUpdateUseLocalServer(CCmdUI* pCmdUI);
  79.     afx_msg void OnFileBind();
  80.     //}}AFX_MSG
  81.     DECLARE_MESSAGE_MAP()
  82. };
  83.  
  84.  
  85. #endif // _MAINFRM_H_
  86.