I am having a problem with the CMFCToolBarEditBox control. I have added the below code:

MyMFCToolBar.h

Code:
#pragma once
#include "resource.h"

class CMyMFCToolBar : public CMFCToolBar
{
public:
	CMyMFCToolBar(){};
	~CMyMFCToolBar(){};

protected:
	void OnReset()
	{
		CMFCToolBarEditBoxButton TBEButton(ID_EDIT_BOX, GetCmdMgr()->GetCmdImage(ID_EDIT_BOX));

		ReplaceButton(ID_EDIT_BOX, TBEButton);
	};
};
and replaced the class of "wnd_ToolBar" with "CMyMFCToolBar". It is a standard MFC SDI project using the CMFC controls.
I have also added a button to the tool bar resource(IDR_MAINFRAME_256) with the resource ID, "ID_EDIT_BOX".
The problem is that the first time it runs the edit box is visible but inactive. Second time is fine. Also if the tool bar is reset the edit box becomes inactive until the app is rerun.
I assume it is some problem to do with the previous state of the tool bar being stored in the registry, but I at a loss as to how to correct the behaviour. Help appreciated. p.s. I have Googled the problem but nothing so far fixes this issue.