Click here to Skip to main content
15,892,674 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.
// WindowUnhidderDlg.h : header file
//

#if !defined(AFX_WINDOWUNHIDDERDLG_H__41E64F55_FA73_42C9_80A8_9B5D77858492__INCLUDED_)
#define AFX_WINDOWUNHIDDERDLG_H__41E64F55_FA73_42C9_80A8_9B5D77858492__INCLUDED_

#include "ListCtrlEx.h"

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

/////////////////////////////////////////////////////////////////////////////
// CWindowUnhidderDlg dialog

class CWindowUnhidderDlg : public CDialog
{
// Construction
public:
	void ClearData();
	CString GetProcessName(int ProcessID, bool fullpath =false);
	CWindowUnhidderDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CWindowUnhidderDlg)
	enum { IDD = IDD_WINDOWUNHIDDER_DIALOG };
	CButton	m_ParentHandler;
	CButton	m_FullPath;
	CEdit	m_Process;
	CEdit	m_PID;
	CButton	m_ExitButton;
	CButton	m_RefreshButton;
	CEdit	m_Padre;
	CButton	m_Visible;
	CButton	m_Enabled;
	CEdit	m_Title;
	CEdit	m_Class;
	CEdit	m_Handle;
	CListCtrlEx	m_List;
	CString	m_WindowsFound;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CWindowUnhidderDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	int m_margin;
	HICON m_hIcon;
	HWND m_mWnd;

	// Generated message map functions
	//{{AFX_MSG(CWindowUnhidderDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnRefresh();
	afx_msg void OnVisible();
	afx_msg void OnEnabled();
	afx_msg void OnItemchangedList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void SelectParam(HWND param);
};

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

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