Well this is embarrassing. After one good night sleep and more reading in CodeProject articles i realized that the library of BCGSoft was never loaded with
HMODULE m_hResDll = LoadLibrary(_T("xxx.dll"));
So now it recognizes the class but the problem remains. Now it trows exception because CBCGPTabbedControlBar is not derived from CBGPDockingControlBar
...
if (pClassRefRequested != NULL &&
!pClassRef->IsDerivedFrom(pClassRefRequested))
{
AfxThrowArchiveException(CArchiveException::badClass, m_strFileName);
}
...
After serious testing i saw that the problem was elsewhere. The problem was that when its reading from LoadState its looking for a object of this type CBCGPTabbedControlBar and because it cant find it (the Frame isn't created by the usual way with CSingleDocTemplate )it gives the exception.
After creating new class derived from CBCGPTabbedControlBar and using the function CBCGPDockingControlBar::SetTabbedControlBarRTC i managed to fix the problem.
And i didn't need the LoadLibrary(_T(xxx.dll));