In older versions of Windows (pre-Windows 7), you could force the tray area to refresh/redraw to do this. But I am not sure it will still work on Windows 7.
Edit/Update
------------
This is in response to your comment. There are two cases where a rogue icon is left behind:
1) When the app exits without explicitly removing the icon. This now invalidates the icon handle. By forcing a refresh of the inner toolbar window, this icon will be auto-removed. You can see this if you move your mouse around the orphan icon.
2) The app crashes and goes into a zombie state without the process actually terminating. In this case there's not much you can do in a documented manner. But if you want to go the undocumented route, take a look at this article I wrote a few years ago:
http://www.codeproject.com/KB/applications/ShellTrayInfo.aspx[
^]
It's not been tested on Windows 7 so I have no idea how that'll pan out on that OS.