Application dynamically adds tabs to tabcontrol based on user actions. I would like to implement a Firefox-style technique to close (delete) the active tab.
Each tab has a text title and an icon from an imagelist. When the tab is active (selected), I would like to display a small red "X" on the right side. When the user clicks the "X" resources would be freed and the tab deleted from the tabcontrol collection.
I presume, I would have to draw it using GDI+ and compare coordinates in mouseup event?
Simpler way? Code sample?