This program allows the user to hide-unhide any window that is running on the system. It also gives interesting information about programs' activities. Many programs use hidden windows, that sometimes may cause problems. With WindowUnhidder, you can hide-unhide, enable/disable any window, and get information about process, title, class, parent window, exec path, etc.
The first aim of this program was to find and unhide some windows. Once done, I saw that it could be useful to show all info I can get.
Using the code
The program is ready for use. Most part of the code is in the class
CWindowUnhidderDlg. I know that some more classes could be implemented, but at the beginning it was a little app, and it was not necessary.
The part of the code where windows are searched for is shown here:
char title, titlepadre, clase;
HWND mWnd = NULL;
HWND mWndPad = NULL;
HWND mWndSys = NULL;
mWnd = ::FindWindowEx(NULL,mWnd,NULL,NULL);
while ( mWnd )
::GetWindowText(mWnd, title, 256);
::GetClassName(mWnd, clase, 100);
CString vis = ::IsWindowVisible(mWnd)?'1':'0';
CString ena = ::IsWindowEnabled(mWnd)?'1':'0';
CString Cadena = "";
mWndPad = mWnd;
CString TitPad = "";
mWndPad = ::GetParent(mWndPad);
::GetWindowText(mWndPad, titlepadre, 256);
TitPad = titlepadre;
Cadena = CString(mWndPad?CString((TitPad=="")?
"[no title]":TitPad):"[Desktop]") +
CString(" :: ") + Cadena;
CString Tit = title;
ss << wd;
bool full = m_FullPath.GetCheck() != 0;
proc = GetProcessName(wd,full);
ssw << "#" << uppercase << hex << (int)mWnd;
mWnd = ::GetNextWindow(mWnd,GW_HWNDNEXT);
Points of Interest
It is interesting to see how some programs use hidden windows. I found a funny trick: try to hide the windows (you can sort the columns) with the class "
Progman" or "
Shell_TrayWnd"... you will see what happens with the desktop!
Thanks to Hugo Gonzalez Castro for his help.