root / trunk / win / Cadview.h

Revision 561, 2.7 kB (checked in by leo, 2 years ago)

Added support for setting a default view config.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1// CADView.h : interface of the CCADView class
2//
3/////////////////////////////////////////////////////////////////////////////
4
5#ifndef _CADVIEW_H_
6#define _CADVIEW_H_
7
8class View;
9class CCADDoc;
10class CPreviewViewEx;
11
12class CCADView : public CView
13{
14protected: // create from serialization only
15    CCADView();
16    DECLARE_DYNCREATE(CCADView)
17
18// Attributes
19public:
20    CCADDoc* GetDocument();
21    void PrintHeader(BOOL bFooter, HDC hDC, CRect rc, UINT nCurPage, UINT nMaxPage, BOOL bCatalog);
22
23// Operations
24public:
25
26// Overrides
27    // ClassWizard generated virtual function overrides
28    //{{AFX_VIRTUAL(CCADView)
29    public:
30    virtual void OnDraw(CDC* pDC);  // overridden to draw this view
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    //}}AFX_VIRTUAL
41
42// Implementation
43public:
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// Generated message map functions
53protected:
54    HCURSOR m_hCursor;
55
56    BOOL DoPrintPreview(UINT nIDResource, CView* pPrintView, CRuntimeClass* pPreviewViewClass, CPrintPreviewState* pState);
57    //{{AFX_MSG(CCADView)
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    //}}AFX_MSG
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
80inline CCADDoc* CCADView::GetDocument()
81    { return (CCADDoc*)m_pDocument; }
82#endif
83
84/////////////////////////////////////////////////////////////////////////////
85
86//{{AFX_INSERT_LOCATION}}
87// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
88
89#endif // _CADVIEW_H_
Note: See TracBrowser for help on using the browser.