Hi, Im developing an SDI with no File/View support app with MFC using Visual Studio 2010 RC and I need to add a dialogBar with some owner drawn buttons, so I'm following this tutorial (and the links to the MSDN it provides):

http://www.codeproject.com/KB/toolba...vedDlgBar.aspx

I derived the class and drawn the dialogbar resource like it said there and in fact my bar seems to be created but for some reason its not showing! I'm reading in the MSDN doccumentation that the resorce must have the visible attribute "unchecked" or even not having it at all, but in the resource editor you just can change it to true/false. I opened the .rc file with a text editor and deleted WS_VISIBLE , rebuild, execute...and still nothing happens.

I tried in 2 kind of wizard generated projects , one checking "Use a classic menu" and "menu bar and toolbar"

The first one just not shows the dialogbar without any errors, warning or assertions/exceptions, but the in the second option an assertion is triggered
[code]
DockControlBar(&m_myDlgBar);

Code:
m_myDlgBar.EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM);
	m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_myDlgBar);// ---------------------------------------->CRASHES HERE
	DockPane(&m_wndMenuBar);
	DockPane(&m_wndToolBar);
(in winfrm2.cpp)
Code:
void CFrameWnd::DockControlBar(CControlBar* pBar, CDockBar* pDockBar, LPCRECT lpRect)
{
	ENSURE_ARG(pBar != NULL);
	// make sure CControlBar::EnableDocking has been called
	ASSERT(pBar->m_pDockContext != NULL);

	if (pDockBar == NULL)
	{
		for (int i = 0; i < 4; i++)
		{
			if ((dwDockBarMap[i][1] & CBRS_ALIGN_ANY) ==
				(pBar->m_dwStyle & CBRS_ALIGN_ANY))
			{
				pDockBar = (CDockBar*)GetControlBar(dwDockBarMap[i][0]);
				ASSERT(pDockBar != NULL);
				// assert fails when initial CBRS_ of bar does not
				// match available docking sites, as set by EnableDocking()
				break;
			}
		}
	}
	ENSURE_ARG(pDockBar != NULL); <----------------------------------------------THAT ONE
	ASSERT(m_listControlBars.Find(pBar) != NULL);
	ASSERT(pBar->m_pDockSite == this);
	// if this assertion occurred it is because the parent of pBar was not initially
	// this CFrameWnd when pBar's OnCreate was called
	// i.e. this control bar should have been created with a different parent initially

	pDockBar->DockControlBar(pBar, lpRect);
}
I've been researching a little and a "Dockbar" object it supposed to be created when you call the enableDocking methods...

I don't know what to do! This last case doesn't matter that much because i will probably stick with the classic menu (I don't need any toolbar/menubar in my project), but I think maybe posting it would help to clarify somehow(?)

So what do you suggest? Maybe is Visual Studio fault? Need to format the computer?Throwing it out of the window perhaps?I have no clue ...

Thank in advance for your help!