source: trunk/MFCtooling/TestProg/CntrItem.h @ 373

Last change on this file since 373 was 32, checked in by sherbold, 14 years ago
File size: 1.3 KB
Line 
1// CntrItem.h : interface of the CTestProgCntrItem class
2//
3
4#pragma once
5
6class CTestProgDoc;
7class CTestProgView;
8
9class CTestProgCntrItem : public COleClientItem
10{
11        DECLARE_SERIAL(CTestProgCntrItem)
12
13// Constructors
14public:
15        CTestProgCntrItem(CTestProgDoc* pContainer = NULL);
16                // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE
17                //  IMPLEMENT_SERIALIZE requires the class have a constructor with
18                //  zero arguments.  Normally, OLE items are constructed with a
19                //  non-NULL document pointer
20
21// Attributes
22public:
23        CTestProgDoc* GetDocument()
24                { return reinterpret_cast<CTestProgDoc*>(COleClientItem::GetDocument()); }
25        CTestProgView* GetActiveView()
26                { return reinterpret_cast<CTestProgView*>(COleClientItem::GetActiveView()); }
27
28        public:
29        virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
30        virtual void OnActivate();
31        protected:
32        virtual void OnGetItemPosition(CRect& rPosition);
33        virtual void OnDeactivateUI(BOOL bUndoable);
34        virtual BOOL OnChangeItemPosition(const CRect& rectPos);
35        virtual BOOL CanActivate();
36
37// Implementation
38public:
39        ~CTestProgCntrItem();
40#ifdef _DEBUG
41        virtual void AssertValid() const;
42        virtual void Dump(CDumpContext& dc) const;
43#endif
44        virtual void Serialize(CArchive& ar);
45};
46
Note: See TracBrowser for help on using the repository browser.