// MDispMFCView.h : interface of the CMDispMFCView class // ///////////////////////////////////////////////////////////////////////////// #define MAXLINES 25 #define MAXCOLUMNS 80 #define MAXLINE (MAXLINES-1) class CMDispMFCView : public CScrollView { protected: // create from serialization only CMDispMFCView(); DECLARE_DYNCREATE(CMDispMFCView) public: CMDispMFCDoc* GetDocument(); // Implementation public: virtual ~CMDispMFCView(); void IncrementFrameCounter(){m_frameCounter++;} void RemoveFromDisplay(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif double m_oldTime; //For frame rate hook double m_frameCounter; //For frame rate hook // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMDispMFCView) public: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); virtual void OnInitialUpdate(); protected: virtual void OnDraw(CDC* pDC); virtual BOOL OnScrollBy(CSize sizeScroll, BOOL bDoScroll = TRUE); virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); //}}AFX_VIRTUAL protected: // Generated message map functions protected: //{{AFX_MSG(CMDispMFCView) afx_msg void OnGrabStart(); afx_msg void OnUpdateGrabStart(CCmdUI* pCmdUI); afx_msg void OnGrabStop(); afx_msg void OnUpdateGrabStop(CCmdUI* pCmdUI); afx_msg void OnDestroy(); afx_msg void OnOverlay(); afx_msg void OnUpdateOverlay(CCmdUI* pCmdUI); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnZoomin(); afx_msg void OnUpdateZoomin(CCmdUI* pCmdUI); afx_msg void OnZoomout(); afx_msg void OnUpdateZoomout(CCmdUI* pCmdUI); afx_msg void OnNoZoom(); afx_msg void OnUpdateNoZoom(CCmdUI* pCmdUI); afx_msg void OnFillDisplay(); afx_msg void OnUpdateFillDisplay(CCmdUI* pCmdUI); afx_msg void OnWinannotations(); afx_msg void OnUpdateWinannotations(CCmdUI* pCmdUI); afx_msg void OnInterpolationModeChange(); afx_msg void OnNotearing(); afx_msg void OnUpdateNotearing(CCmdUI* pCmdUI); afx_msg void OnDisplayInterpolationFast(); afx_msg void OnUpdateDisplayInterpolationFast(CCmdUI* pCmdUI); afx_msg void OnDisplayInterpolationNearest(); afx_msg void OnUpdateDisplayInterpolationNearest(CCmdUI* pCmdUI); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: //Operations void ScrollImage(); void CalculateCurrentFrameRate(); void ChangeInterpolationMode(long InterpolationMode); void InitializeOverlay(); void ResizeDisplayWindow(); void UpdateScrollBarSizesAndPositions(bool doShowScrollBars=true); void UpdateFillDisplayButton(); void UpdateComboBoxWithCurrentInterpolationMode(); void Zoom(double ZoomFactorToApply); //Attributes MIL_ID m_MilOverlayImage; //Overlay image buffer identifier MIL_ID m_MilDisplay; //Display identifier double m_currentFrameRate; //Last calculated frame rate double m_currentZoomFactor; //Current zoom factor long m_currentInterpolationMode; //Current interpolation mode (M_INTERPOLATION_MODE dispControl) bool m_isFillDisplayEnabled; //Fill Display state(M_FILL_DISPLAY dispControl) bool m_isNoTearingEnabled; //No-Tearing state(M_NO_TEARING dispControl) bool m_isWindowAnnotationsEnabled; //Window Annotations state bool m_isOverlayEnabled; //Overlay show state bool m_isOverlayInitialized; //Overlay initialization state bool m_isHorzScrollVisible; //Is Horizontal scroll bar currently visible bool m_isVertScrollVisible; //Is Vertical scroll bar currently visible long m_standardScrollBarWidth; //Standard horizontal scroll bar size according to current Windows settings long m_standardScrollBarHeight; //Standard vertical scroll bar size according to current Windows settings CRect m_MMRect; //CRect variable RECT m_clientRECT; //RECT variable CPen m_pen; CPen* m_penOld; //CPEN variables char m_chText[80]; //Array of char }; #ifndef _DEBUG // debug version in MDispMFCView.cpp inline CMDispMFCDoc* CMDispMFCView::GetDocument() { return (CMDispMFCDoc*)m_pDocument; } #endif /////////////////////////////////////////////////////////////////////////////