Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Window Unhidder

, 14 Feb 2006
A utility to list and hide/unhide all application windows.
#if !defined(AFX_LISTCTRLEX_H__2B9243D2_7494_4761_8A7D_157B360F4D9C__INCLUDED_)
#define AFX_LISTCTRLEX_H__2B9243D2_7494_4761_8A7D_157B360F4D9C__INCLUDED_

#include <vector>

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ListCtrlEx.h : header file
//
using namespace std;

typedef int (*CallBack) (CString, CString);
/////////////////////////////////////////////////////////////////////////////
// CListCtrlEx window

class CListCtrlEx : public CListCtrl
{
// Construction
public:
	CListCtrlEx();

// Attributes
public:

// Operations
public:
	BOOL AddColumn(
		LPCTSTR strItem,int nItem,
		int tam = 0,
		int nFmt = LVCFMT_LEFT,
		int nSubItem = -1,
		int nMask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM);
	BOOL AddItem(int nItem,int nSubItem,LPCTSTR strItem,int nImageIndex = -1);
	BOOL AddItem(int nItem,int nSubItem,string strItem,int nImageIndex = -1);
	BOOL DelItem(int nItem);
	BOOL DelAll();

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

// Implementation
public:
	BOOL SelectItem(int intem);
	virtual void SetColumnSortCallback(int item, CallBack cb);
	bool m_doSort;
	bool OrdenacionAnterior;
	int TipoOrdenacion;
	virtual ~CListCtrlEx();
	vector<CallBack> m_SortCallbacks;
protected:

	// Generated message map functions
protected:
	//{{AFX_MSG(CListCtrlEx)
	afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};
int IntComp(CString s1, CString s2);

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

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

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

Share

About the Author

JJimenezShaw
Software Developer (Senior)
Spain Spain
Javier Jimenez Shaw. Born in Madrid in 1975. Civil engineer, is working developing financial algorithms for exotic products.

| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 14 Feb 2006
Article Copyright 2006 by JJimenezShaw
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid