Click here to Skip to main content
15,885,921 members
Articles / Desktop Programming / MFC

CListCtrlExt and CListViewExt controls

Rate me:
Please Sign up or sign in to vote.
4.78/5 (22 votes)
20 Feb 2012CPOL5 min read 82.8K   8.7K   84  
An enhanced list control based on the standard CListCtrl MFC class.
// MsgHook.h : interface of the CMsgHook class
//
/////////////////////////////////////////////////////////////////////////////

#include <afxtempl.h>

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

#define UM_HIDEEDITOR				WM_USER + 10
/////////////////////////////////////////////////////////////////////////////
// CMsgHook class

class CMsgHook
{
public:
	CMsgHook();
	virtual ~CMsgHook();

	BOOL Detach(void);
	BOOL Attach(HWND hWnd, HWND hParent, HWND hNotify = NULL);
	inline BOOL IsAttached(){return m_hWnd != NULL;}

protected:
	HWND m_hWnd;
	HWND m_hParent;
	HWND m_hNotify;
	BOOL m_bDropDown;
	static HHOOK m_hHook;
	static int m_nInstances;
	static CMap<HWND,HWND&,CMsgHook*,CMsgHook*&>m_MapHookedWindows;  // map of windows to hooks
	static LRESULT CALLBACK CallWndRetProc(int nCode,WPARAM wParam,LPARAM lParam);
};

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

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

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Romania Romania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions