www.pudn.com > 医学图像处理示例源代码.rar > ImageLABView.h


// ImageLABView.h : interface of the CImageLABView class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_IMAGELABVIEW_H__A5C85A0F_0580_11D3_B6E5_5254AB111C09__INCLUDED_) 
#define AFX_IMAGELABVIEW_H__A5C85A0F_0580_11D3_B6E5_5254AB111C09__INCLUDED_ 
 
#if _MSC_VER >= 1000 
#pragma once 
#endif // _MSC_VER >= 1000 
#include "cg200-32.h" 
#include "mappin.h" 
#define MAXPINNUM         10 
 
class CImageLABView : public CScrollView 
{ 
protected: // create from serialization only 
	CImageLABView(); 
	DECLARE_DYNCREATE(CImageLABView) 
	CStatusBar *pSB; 
public: 
	CMapPin*    m_Pin[MAXPINNUM]; 
	CPoint		m_PinPos[MAXPINNUM]; 
	static CPoint m_PinImagePos[MAXPINNUM]; 
	int			m_pinIconNO[MAXPINNUM]; 
	BOOL		IsPinVisible; 
	int			PinNum; 
	static int	NowPinNo; 
	LPSTR	    lpDesStr; 
	static CString m_Hospital; 
	CString		m_OtherDesStore, m_DesDate; 
	CString		m_Docter,m_Patient,m_Sex,m_Age; 
	CString		m_Room,m_Xray,m_Nozy,m_Nomz,m_Depart; 
	CPoint		m_PopPoint; 
	void ReadDesFile(); 
	void SaveDesFile(); 
	 
// Attributes 
public: 
	CImageLABDoc* GetDocument(); 
	void CheckRect(CPoint &p1,CPoint &p2); 
 
	BOOL       IsSlideShowImage; 
	UINT       m_SlideTimerID; 
 
	CPoint MousePt; 
	static CPoint ScrollOrgPt; 
	CPoint OldScrollOrgPt; 
	CPoint SelectLTPt, SelectRBPt; 
	CSize  ScrollSize; 
 
	BOOL   DashRectDrawed; 
	BOOL   IsLButtonDown; 
	BOOL   SpaceKeyPressed; 
	BOOL   CtrlKeyPressed; 
	BOOL   CapsKeyLocked; 
	BOOL   ShiftKeyPressed; 
	BOOL   IsShowLineGray; 
	BOOL   ISLineSelected; 
    int    ShowScale;    
	double fShowScale; 
	CSize  ImageOffset; 
 
	int    m_nLineSlices; 
	int    m_nPageSlices; 
	DWORD  m_dwMinTime; 
 
	CPen    dashPen, dashRedPen, *pOldPen; 
 
	BOOL    CanManualMove, IsFreePan; 
	BOOL    CreateDCed; 
	CSize   MaxScrollRange; 
 
	CRect    clientRect; 
	CDC      tempDC; 
	CBitmap  bitmap, *pOldbmp; 
 
	// for CG200 image captrue card 
	static HCG200       hcg200;			//handle for CG200 
	static HINSTANCE	hinstDevice; 
 
	BOOL	bFreeze; 
	BOOL	IsScrnImageMemDCOK; 
	CRect	DisplayRect; 
	CRect	VideoRect; 
	CBitmap *pScrnBMP; 
	CDC*	pScrnImageMemDC; 
	CPoint	VideoStart; 
 
	int		ImageW;  
	int     ImageH; 
	int		ImageSize; 
 
	int     CG200Channel; 
	BOOL    IsDesTxtChanged; 
 
// Operations 
public: 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CImageLABView) 
	public: 
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view 
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 
	virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE); 
	protected: 
	virtual void OnInitialUpdate(); // called first time after construct 
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); 
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); 
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); 
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); 
	virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); 
	virtual void PostNcDestroy(); 
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	void CG200Show(BOOL IsShow = true); 
	void  ReSetDisplayPos(); 
	void DrawDIB(CDC *pDC); 
	BOOL GetSelectArea(CPoint &p1, CPoint &p2); 
	virtual ~CImageLABView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
 
// Generated message map functions 
public: 
	int m_PrintNumber; 
	void GetDesFileTime(); 
	int CG200_FLAG; 
	afx_msg void OnContextMenu(CWnd*, CPoint point); 
	//{{AFX_MSG(CImageLABView) 
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 
	afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); 
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point); 
	afx_msg void OnMouseMove(UINT nFlags, CPoint point); 
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point); 
	afx_msg void OnFitimage(); 
	afx_msg void OnUpdateFitimage(CCmdUI* pCmdUI); 
	afx_msg void OnZoomin(); 
	afx_msg void OnUpdateZoomin(CCmdUI* pCmdUI); 
	afx_msg void OnZoomout(); 
	afx_msg void OnUpdateZoomout(CCmdUI* pCmdUI); 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg void OnImageShowlinegrayinfo(); 
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); 
	afx_msg void OnUpdateIndicatorImagepixels(CCmdUI* pCmdUI); 
	afx_msg void OnUpdateIndicatorImagescale(CCmdUI* pCmdUI); 
	afx_msg void OnEditCopy(); 
	afx_msg void OnUpdatePrevimage(CCmdUI* pCmdUI); 
	afx_msg BOOL OnEraseBkgnd(CDC* pDC); 
	afx_msg void OnFreepan(); 
	afx_msg void OnUpdateFreepan(CCmdUI* pCmdUI); 
	afx_msg void OnUpdateImageShowlinegrayinfo(CCmdUI* pCmdUI); 
	afx_msg void OnCaptureCcd(); 
	afx_msg void OnUpdateCaptureCcd(CCmdUI* pCmdUI); 
	afx_msg void OnShowpin(); 
	afx_msg void OnUpdateShowpin(CCmdUI* pCmdUI); 
	afx_msg void OnPinAdd(); 
	afx_msg void OnUpdatePinAdd(CCmdUI* pCmdUI); 
	afx_msg void OnPinDel(); 
	afx_msg void OnUpdatePinDel(CCmdUI* pCmdUI); 
	afx_msg void OnPinChangicon(); 
	afx_msg void OnUpdatePinChangicon(CCmdUI* pCmdUI); 
	afx_msg void OnDescribe(); 
	afx_msg void OnChangechannel(); 
	afx_msg void OnUpdateChangechannel(CCmdUI* pCmdUI); 
	afx_msg void OnPatrimagesave(); 
	afx_msg void OnUpdatePatrimagesave(CCmdUI* pCmdUI); 
	afx_msg void OnFilePrintMysetting(); 
	afx_msg void OnUpdateFilePrintMysetting(CCmdUI* pCmdUI); 
	afx_msg void OnPatrimageCrop(); 
	afx_msg void OnUpdatePatrimageCrop(CCmdUI* pCmdUI); 
	afx_msg void OnPrintNumber(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
#ifndef _DEBUG  // debug version in ImageLABView.cpp 
inline CImageLABDoc* CImageLABView::GetDocument() 
   { return (CImageLABDoc*)m_pDocument; } 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Developer Studio will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_IMAGELABVIEW_H__A5C85A0F_0580_11D3_B6E5_5254AB111C09__INCLUDED_)