home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
CENVIW9.ZIP
/
PGROUPS.CMM
< prev
next >
Wrap
Text File
|
1994-03-08
|
1KB
|
40 lines
// PGroups.cmm - CEnvi file to demonstrate ProgMan.lib by displaying all
// ver.1 Groups and items within the groups
#include <ProgMan.lib>
if ( !ConnectToProgman() ) {
printf("\aError. Program Manager does not appear to be running.\n"
"Cannot create a DDE link to Program Manager.\n"
"Press any key to exit...");
exit(EXIT_FAILURE);
}
if ( !ProgmanGroups(GroupList,GroupCount) )
printf("\a\nNo Groups returned.\n");
else {
for ( g = 0; g < GroupCount; g++ ) {
if ( !ProgmanGroupItems(GroupList[g],GroupInfo,ItemList) )
printf("\aItem list failure for group \"%s\".\n",GroupList[g]);
else {
printf("\nGroup: %s Path: %s Count %d State %d\n",
GroupInfo.Name,GroupInfo.Path,GroupInfo.Count,GroupInfo.State);
for ( i = 0; i < GroupInfo.Count; i++ ) {
d = ItemList[i];
printf("\n Item Description: \"%s\"\n",d.description);
printf(" Working Directory: \"%s\"\n",d.WorkingDirectory);
printf(" Icon File, ID: \"%s\", %d\n",d.IconFile,d.IconID);
printf(" Col, Row: %d, %d\n",d.Col,d.Row);
printf(" Shortcut Key = %04X\n",d.ShortcutKey);
printf(" Run State = %s\n",d.RunMinimized ? "MINIMIZED" : "NORMAL" );
}
}
}
}
CloseProgmanConnection();
printf("\nPress any key to exit...");
getch();