Click here to Skip to main content
15,881,746 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 225.8K   6K   134  
An article about COM Library.
#if !defined(AFX_COMPONENT1WND_H__0A03741B_A726_47BE_9D4B_5ADBC32074BB__INCLUDED_)
#define AFX_COMPONENT1WND_H__0A03741B_A726_47BE_9D4B_5ADBC32074BB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Component1Wnd.h : header file
//
#include "ComponentWndMenu.h"
/////////////////////////////////////////////////////////////////////////////
// CComponent1Wnd window

class CComponent1Wnd : public CWnd
{
// Construction
public:   
	IUnknown*    m_pComponent1sIUnknown; // is used in order to point to itself whenever from the menu the user chooses AddRef/Release functions

public:
	CComponent1Wnd();
    CComponentWndMenu m_WndMenu;
// Attributes
public:

// Operations
public:

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

// Implementation
public:
	virtual ~CComponent1Wnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CComponent1Wnd)
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
	afx_msg void OnMove(int x, int y);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG
	 afx_msg LRESULT OnRelease(WPARAM wParam,LPARAM lParam);
    DECLARE_MESSAGE_MAP()

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

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

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

#endif // !defined(AFX_COMPONENT1WND_H__0A03741B_A726_47BE_9D4B_5ADBC32074BB__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