home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
CENVIW9.ZIP
/
WINLIST.CMM
< prev
next >
Wrap
Text File
|
1994-03-08
|
861b
|
30 lines
//**************************************************
//*** WinList.cmm Display a list of all windows ***
//*** ver.1 and all their child windows ***
//**************************************************
#include <Window.lib>
#include <WinTools.lib>
ShowWindowAndChildren(0,GetDesktopWindow());
ShowWindowAndChildren(ChildDepth,ParentHandle)
{
printf("\n%*d",7 * ChildDepth,ParentHandle);
if ( Title = GetWindowTitle(ParentHandle) )
printf(" %s",Title);
// Do this same routine for each child window of this window
for ( ChildWindow = GetWindow(ParentHandle,GW_CHILD); ChildWindow;
ChildWindow = GetWindow(ChildWindow,GW_HWNDNEXT) )
ShowWindowAndChildren(ChildDepth+1,ChildWindow);
}
GetDesktopWindow()
{
return DynamicLink("USER","GETDESKTOPWINDOW",UWORD16,PASCAL);
}
getch();