Got it working by using a second wrapper (an activeX control). The code for adding the child control then, looks like this:
Code:
void CreateChild ()
{
m_axWnd.reset(new CAxWindow());
if (!m_axWnd.get())
{
return;
}
CRect rc;
GetClientRect(&rc);
m_axWnd->Create(m_hWnd, rc, NULL, WS_CHILD|WS_VISIBLE);
_bstr_t clsStr = my_CLSID;
m_axWnd->CreateControl(clsStr);
}
...and the control can be added OnInitDialog and it will be persistent.