Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi All,
Recently i migrated my project to VS2010 from VS2005 post migration I am not able to see the windows properly.Earlier tool bar and command bar was alligned in the same line but now the Windows appear to be distorted and has background window image Coomand BAr and tool bar is overlapped . I am using WTL71 libraries.Below is the some lines of code

C++
LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/ )
{
	::hFrameWnd = m_hWnd;

	// create command bar window
	HWND	hWndCmdBar = m_CmdBar.Create(m_hWnd, rcDefault, NULL, ATL_SIMPLE_CMDBAR_PANE_STYLE);


	// attach menu
	m_CmdBar.AttachMenu(GetMenu());

	// load command bar images
	m_CmdBar.LoadImages(IDR_MAINFRAME);

	// remove old menu
	SetMenu(NULL);

	HWND	hWndToolBar = CreateSimpleToolBarCtrl(m_hWnd, IDR_MAINFRAME, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE);

	CreateSimpleReBar(ATL_SIMPLE_REBAR_NOBORDER_STYLE);

	//============================================
	// calculate exact band size;
	// overcome minning RB_GETBANDMARGINS message, added only for XP
	CToolBarCtrl	Toolbar(hWndCmdBar);
	int				nBtnCount = Toolbar.GetButtonCount();
	RECT				ItemRect;
	Toolbar.GetItemRect(nBtnCount - 1, &ItemRect);

	int	cxBandWidth = ItemRect.right + BANDHEADERSIZE;

	//============================================
	AddSimpleReBarBand(hWndCmdBar, 0, FALSE, cxBandWidth);
	AddSimpleReBarBand(hWndToolBar, 0, FALSE);

	CreateSimpleStatusBar();

	RECT	rect = { 0, 0, 1, 1 };

	m_hWndClient = m_wndTSheetCtrl.Create(m_hWnd, rect, NULL,

Does ATL_SIMPLE_CMDBAR_PANE_STYLE and ATL_SIMPLE_TOOLBAR_PANE_STYLE has some issues in VS2010 ?
Please advise.
Thank you.
Posted
Updated 29-Jul-13 20:45pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900