-
Icon Clean?
When I use killtask() or terminate a prog there is an icon by the clock on the start bar. The prog icon while the prog is running then terminates exits but the other icon to the right by the clock does not. Is there a way to clean that or remove it?
Remove all non running prog icons or process icons?
Thank you in advance.
-
You can do this by running the mouse cursor over the dead icon. I found a function that does this from my KillProcess utility.
Code:
void refreshTray() {
HWND hTaskbar, hNotify, hTray;
RECT rc;
int xPos, yPos;
// Obtain task tray window handle by drilling down
hTaskbar = FindWindow(TEXT("Shell_TrayWnd"), NULL);
hNotify = FindWindowEx(hTaskbar, NULL, TEXT("TrayNotifyWnd"), NULL);
hTray = FindWindowEx(hNotify, NULL, TEXT("ToolbarWindow32"), NULL);
if (hTray == NULL || GetClientRect( hTray, &rc ) == 0) return;
// Simulate mouse moving along task icons
// This will kill dead icons
for (yPos = 0;yPos < rc.bottom; yPos += 4) {
for (xPos = 0;xPos < rc.right; xPos += 4) {
PostMessage( hTray, WM_MOUSEMOVE, 0, MAKELONG(xPos, yPos) );
}
}
}
-
i was doing that by paw. i was hopeing that there was a beter way than to position the cursor over the icon. by paw or proggie. thought there might be a deleteicon() function that i missed. or just messed up the proggie.
thank you again.