Click here to Skip to main content
15,885,278 members
Articles / Desktop Programming / ATL

Streaming IPicture to Compound Document file

Rate me:
Please Sign up or sign in to vote.
4.76/5 (9 votes)
28 Oct 20011 min read 112.1K   3K   53  
Serialization of IPicture object
// CntrItem.h : interface of the CPictureStreamCntrItem class
//

#if !defined(AFX_CNTRITEM_H__E270AD85_D566_410F_8432_168B763FE5D9__INCLUDED_)
#define AFX_CNTRITEM_H__E270AD85_D566_410F_8432_168B763FE5D9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CPictureStreamDoc;
class CPictureStreamView;

class CPictureStreamCntrItem : public COleClientItem
{
	DECLARE_SERIAL(CPictureStreamCntrItem)

// Constructors
public:
	CPictureStreamCntrItem(CPictureStreamDoc* pContainer = NULL);
		// Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
		//  IMPLEMENT_SERIALIZE requires the class have a constructor with
		//  zero arguments.  Normally, OLE items are constructed with a
		//  non-NULL document pointer.

// Attributes
public:
	CPictureStreamDoc* GetDocument()
		{ return (CPictureStreamDoc*)COleClientItem::GetDocument(); }
	CPictureStreamView* GetActiveView()
		{ return (CPictureStreamView*)COleClientItem::GetActiveView(); }

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPictureStreamCntrItem)
	public:
	virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
	virtual void OnActivate();
	protected:
	virtual void OnGetItemPosition(CRect& rPosition);
	virtual void OnDeactivateUI(BOOL bUndoable);
	virtual BOOL OnChangeItemPosition(const CRect& rectPos);
	//}}AFX_VIRTUAL

// Implementation
public:
	~CPictureStreamCntrItem();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif
	virtual void Serialize(CArchive& ar);
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CNTRITEM_H__E270AD85_D566_410F_8432_168B763FE5D9__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions