Click here to Skip to main content
15,893,814 members
Articles / Desktop Programming / MFC

Window Unhidder

Rate me:
Please Sign up or sign in to vote.
4.69/5 (15 votes)
14 Feb 20061 min read 39.8K   1.5K   40  
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


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

Comments and Discussions