Thank you for the prompt reply.
Sorry if my last message was not clear but I am well aware of basic multi threading concepts in MFC.
As stated in my first message:
PLEASE NOTE THAT I AM NOT CREATING AND DESTROYING THIS BUTTON ACROSS THE THREAD BOUNDARY BUT BY SENDING A MESSAGE TO THE MAIN FRAME.
In other words, the button is created and destroyed IN THE MAIN THREAD OF THE APPLICATION.
What trigs the creation and destruction of the button is a message send from a worker thread to the main thread via SendMessage.
Anyway, the answer I was looking for was the one I found shortly after posting.
m_wndStatusBar.SetPaneControl(&m_MyButton, ID_PANE_BUTTON, true);
m_wndStatusBar.SetPaneControl(&m_MyButton, ID_PANE_BUTTON, false);
That way the control is not destroyed by the satus bar during removal.
Thus avoiding the crash.