| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | #ifndef _CADVIEW_H_ |
|---|
| 6 | #define _CADVIEW_H_ |
|---|
| 7 | |
|---|
| 8 | class View; |
|---|
| 9 | class CCADDoc; |
|---|
| 10 | class CPreviewViewEx; |
|---|
| 11 | |
|---|
| 12 | class CCADView : public CView |
|---|
| 13 | { |
|---|
| 14 | protected: |
|---|
| 15 | CCADView(); |
|---|
| 16 | DECLARE_DYNCREATE(CCADView) |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | public: |
|---|
| 20 | CCADDoc* GetDocument(); |
|---|
| 21 | void PrintHeader(BOOL bFooter, HDC hDC, CRect rc, UINT nCurPage, UINT nMaxPage, BOOL bCatalog); |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | public: |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | public: |
|---|
| 30 | virtual void OnDraw(CDC* pDC); |
|---|
| 31 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); |
|---|
| 32 | protected: |
|---|
| 33 | virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); |
|---|
| 34 | virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); |
|---|
| 35 | virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); |
|---|
| 36 | virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); |
|---|
| 37 | virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); |
|---|
| 38 | virtual void OnEndPrintPreview(CDC* pDC, CPrintInfo* pInfo, POINT point, CPreviewViewEx* pView); |
|---|
| 39 | virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | public: |
|---|
| 44 | virtual ~CCADView(); |
|---|
| 45 | #ifdef _DEBUG |
|---|
| 46 | virtual void AssertValid() const; |
|---|
| 47 | virtual void Dump(CDumpContext& dc) const; |
|---|
| 48 | #endif |
|---|
| 49 | |
|---|
| 50 | View* m_pView; |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | protected: |
|---|
| 54 | HCURSOR m_hCursor; |
|---|
| 55 | |
|---|
| 56 | BOOL DoPrintPreview(UINT nIDResource, CView* pPrintView, CRuntimeClass* pPreviewViewClass, CPrintPreviewState* pState); |
|---|
| 57 | |
|---|
| 58 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); |
|---|
| 59 | afx_msg void OnDestroy(); |
|---|
| 60 | afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); |
|---|
| 61 | afx_msg void OnCaptureChanged(CWnd *pWnd); |
|---|
| 62 | afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); |
|---|
| 63 | afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); |
|---|
| 64 | afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); |
|---|
| 65 | afx_msg void OnMButtonDown(UINT nFlags, CPoint point); |
|---|
| 66 | afx_msg void OnTimer(UINT nIDEvent); |
|---|
| 67 | afx_msg void OnFilePrintPreview(); |
|---|
| 68 | |
|---|
| 69 | afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult); |
|---|
| 70 | afx_msg LONG OnSetStep(UINT lParam, LONG wParam); |
|---|
| 71 | afx_msg LONG OnAutoPan(UINT lParam, LONG wParam); |
|---|
| 72 | afx_msg LONG OnChangeCursor(UINT lParam, LONG wParam); |
|---|
| 73 | |
|---|
| 74 | DECLARE_MESSAGE_MAP() |
|---|
| 75 | |
|---|
| 76 | friend class CPreviewViewEx; |
|---|
| 77 | }; |
|---|
| 78 | |
|---|
| 79 | #ifndef _DEBUG // debug version in CADView.cpp |
|---|
| 80 | inline CCADDoc* CCADView::GetDocument() |
|---|
| 81 | { return (CCADDoc*)m_pDocument; } |
|---|
| 82 | #endif |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | #endif // _CADVIEW_H_ |
|---|