
void ChangeToIconMenu()
{
Handle theIconSuite = nil;
MenuHandle menuHandle;
GetIconSuite(&theIconSuite, cIcon, svAllSmallData);
if (theIconSuite)
{
menuHandle = GetMenuHandle(mIcon);
if (menuHandle)
{
// second byte must be a 1, followed by the icon suite handle
(**menuHandle).menuData[1] = 0x01;
*((long *)&((**menuHandle).menuData[2])) = (long)theIconSuite;
// update display (typically you do this on startup)
DeleteMenu(mIcon);
InsertMenu(menuHandle, 0);
InvalMenuBar();
}
}
}
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help