home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
win
/
prg
/
cenviw
/
iconmany.cmm
< prev
next >
Wrap
Text File
|
1994-11-11
|
701b
|
23 lines
// IconMany.cmm - Demonstrate switching icons
// ver.1
#include <Icon.lib>
#include <WinTools.lib>
// find out how many icons are in Program Manager
IconCount = ExtractIcon(Instance(),"PROGMAN.EXE",-1);
printf("IconMany will minimized and switch its minimized icons among\n");
printf("the %d icons available in Program Manager.\n",IconCount);
printf("Press any key to minimize...");
getch();
ShowWindow(ScreenHandle(),SW_MINIMIZE);
printf("\nPress any key to exit...");
for ( IconIndex = 0; !kbhit(); IconIndex++ ) {
IconIndex = IconIndex % IconCount;
Icon = ExtractIcon(Instance(),"PROGMAN.EXE",IconIndex);
SetMyIcon(Icon);
suspend(500); // wait 1/2 second
}