I have CExtThemeSwitcherToolControlBar in my SDI frame window. Code looks like this:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CExtNCW < CFrameWnd >::OnCreate(lpCreateStruct) == -1)
return -1;
VERIFY( g_CmdManager->ProfileSetup( strMainProfile, GetSafeHwnd() ) );
VERIFY( g_CmdManager->UpdateFromMenu( strMainProfile, IDR_MAINFRAME ) );
if (!m_wndMenuBar.Create( _T( "Menubar name" ), this, ID_VIEW_MENUBAR)||
!m_wndMenuBar.LoadMenuBar(IDR_MAINFRAME))
return -1;
m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
CMenu *menu = m_wndMenuBar.GetMenu();
if (! m_wndToolBarUiLook.Create( NULL, this, ID_VIEW_UI_LOOK_BAR))
return -1;
if (! m_wndToolBarUiLook.ThemeSwitcherInit()) // this fails
return -1;
CExtToolControlBar::FrameEnableDocking(this);
DockControlBar(&m_wndMenuBar);
// m_wndToolBarUiLook.EnableDocking(CBRS_ALIGN_ANY);
// DockControlBar(&m_wndToolBarUiLook);
RecalcLayout();
return 0;
}
It works in debug build, but m_wndToolBarUiLook.ThemeSwitcherInit() fails in release mode. For debug mode I’m usinf MFC and Prof-uis ad unicode DLL, in release mode all libraries are static unicode. I’ve tried it with prof-uis 2.87 with custom prof-uis.h and with original 2.89, both do the same. In other project which is using MBCS static libraries it works. Do you have idea what could be wrong?
I’ve tried to debug it with 2.87, it was failing at
HINSTANCE hInstResourceCommands =
g_ResourceManager->FindResourceHandle(
RT_TOOLBAR,
nToolBarResourceID,
NULL,
&hRsrcCommands
);
with nToolBarResourceID==IDB_EXT_PM_16x16