+ // detect if this is still the handle we passed before or
+ // if the static-control made a copy of the bitmap!
+ if (m_currentHandle != 0 && oldHandle != m_currentHandle)
+ {
+ // the static control made a copy and we are responsible for deleting it
+ DeleteObject(oldHandle);
+ }
+ m_currentHandle = (HGDIOBJ)handle;