Click here to Skip to main content
15,892,517 members
Articles / Programming Languages / C++

COM from scratch - PART TWO

Rate me:
Please Sign up or sign in to vote.
4.85/5 (44 votes)
17 Apr 200414 min read 228.3K   6K   134  
An article about COM Library.
// Component3Wnd.h: interface for the CComponent3Wnd class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_COMPONENT3WND_H__547D7202_7845_4BCF_86EC_94878CE828C5__INCLUDED_)
#define AFX_COMPONENT3WND_H__547D7202_7845_4BCF_86EC_94878CE828C5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ComponentWndMenu.h"



class CComponent3Wnd : public CWnd
{
// Construction
public:   
	IUnknown*    m_pComponent3sIUnknown; // is used in order to point to itself whenever from the menu the user chooses Release function
    IUnknown*    m_pComponent2sIUnknown;
	IUnknown*    m_pComponent1sIUnknown;
	CComponentWndMenu m_WndMenu;
public:
	CComponent3Wnd();
   
// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CComponent3Wnd)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CComponent3Wnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CComponent3Wnd)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu);
	afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnPaint();
	//}}AFX_MSG
DECLARE_MESSAGE_MAP()

public:
	
	bool m_bMenuHasOpend;
	long m_cRef;
	COLORREF m_color_hittest;
private:
	UINT m_nItemID;
};

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

//{{AFX_INSERT_LOCATION}}

#endif // !defined(AFX_COMPONENT3WND_H__547D7202_7845_4BCF_86EC_94878CE828C5__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
Denmark Denmark
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions