home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / ACTIVEX / SRDVID / DATA.Z / svview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-10  |  2.6 KB  |  85 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. //    SVView.h : Interface of the CSVViewerView class
  4. //
  5. /////////////////////////////////////////////////////////////////////////////
  6. //
  7. //  (C) Copyright Black Diamond Consulting, Inc 1996. All rights reserved.
  8. //
  9. //    You have a royalty-free right to use, modify, reproduce and 
  10. //    distribute the Sample Files (and/or any modified version) in 
  11. //    any way you find useful, provided that you agree that Black 
  12. //    Diamond Consulting has no warranty obligations or liability
  13. //    for any Sample Application Files which are modified. 
  14. //
  15. //    Revision History:
  16. //
  17. /////////////////////////////////////////////////////////////////////////////
  18.  
  19. #define __SVVIEW_H__
  20. #include "dib.h"
  21.  
  22. #ifndef __CSURVIEW_H__
  23.     #include "CSurView.h"
  24. #endif
  25.  
  26. #ifndef __CHOTSPOT_H__
  27.     #include "CHotspot.h"
  28. #endif
  29.  
  30. class CSVViewerView : public CSurroundView
  31. {                  
  32.  
  33. protected:
  34.     CHotspot*        m_currentHotspot;    // Currently active hotspot
  35.     CRectTracker    m_rectTracker;        // Hotspot CRectTracker
  36.     BOOL            m_bEdit;            // Edit mode
  37.     PDIB            m_pHotspotDib;
  38.     PDIB            m_pAlteredDib;
  39.  
  40. private:
  41.     void DrawHotspots( CDC* pDC );
  42.     void SetCurrentHotspot( CHotspot* pHotspot );
  43.     BOOL GetHotspotRect( RECT* pRect, CHotspot* pHotspot = NULL );
  44.     BOOL SetHotspotRect( RECT* pRect, CHotspot* pHotspot = NULL );
  45.     CHotspot* PtInHotspot( CPoint point );
  46.     void Alter( PDIB pDib );
  47.  
  48. protected: // create from serialization only
  49.     CSVViewerView();
  50.     DECLARE_DYNCREATE(CSVViewerView)
  51.  
  52.     virtual ISurround* GetISurround();
  53.      
  54.     //{{AFX_MSG(CSVViewerView)
  55.     afx_msg void OnLButtonDown( UINT nFlags, CPoint point );
  56.     afx_msg void OnLButtonUp( UINT nFlags, CPoint point );
  57.     afx_msg void OnRButtonDown( UINT nFlags, CPoint point );
  58.     afx_msg void OnRButtonUp( UINT nFlags, CPoint point );
  59.     afx_msg void OnMouseMove( UINT nFlags, CPoint point );
  60.     afx_msg void OnLButtonDblClk( UINT nFlags, CPoint point );
  61.     afx_msg void OnEditHotspot();
  62.     afx_msg void OnDeleteHotspot();
  63.     afx_msg void OnModeEdit();
  64.     afx_msg void OnUpdateCurrentHotspot( CCmdUI* pCmdUI ); 
  65.     afx_msg void CSVViewerView::OnUpdateModeEdit( CCmdUI* pCmdUI ); 
  66.     afx_msg void CSVViewerView::OnUpdateModeRun( CCmdUI* pCmdUI ); 
  67.     afx_msg void OnUpdateSave(CCmdUI* pCmdUI); 
  68.     //}}AFX_MSG
  69.     DECLARE_MESSAGE_MAP()
  70.  
  71. public:
  72.     virtual ~CSVViewerView();
  73.  
  74.     // ClassWizard generated virtual function overrides
  75.     //{{AFX_VIRTUAL(CSVViewerView)
  76.     public:
  77.     virtual void OnDraw( CDC* pDC );  // overridden to draw this view
  78.     protected:
  79.     //}}AFX_VIRTUAL
  80. };
  81.  
  82.  
  83. /////////////////////////////////////////////////////////////////////////////
  84.  
  85.