Click here to Skip to main content
15,887,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Guys,
I am trying to switching the GUI(Ribbon or Menu) according to user's choice but i am having flickering issue while switching. As i am new to MDI application ,i don't known what to do. Please guide me. I am using Visual studio 2015. Sorry, if any mistake is there in my Question.
Thanks in advance,

What I have tried:

BOOL bNameValid;
	CViewSelection obj_ViewSelection;
	obj_ViewSelection.DoModal();
	CMDITabInfo mdiTabParams;
	mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_ONENOTE; // other styles available...
	mdiTabParams.m_bActiveTabCloseButton = TRUE;      // set to FALSE to place close button at right of tab area
	mdiTabParams.m_bTabIcons = FALSE;    // set to TRUE to enable document icons on MDI taba
	mdiTabParams.m_bAutoColor = TRUE;    // set to FALSE to disable auto-coloring of MDI tabs
	mdiTabParams.m_bDocumentMenu = TRUE; // enable the document menu at the right edge of the tab area
	EnableMDITabbedGroups(TRUE, mdiTabParams);
	if (bSelectedView == 1)
	{
		m_wndRibbonBar.Create(this);
		m_wndRibbonBar.LoadFromResource(IDR_RIBBON);
	}
	else
	{
		m_wndRibbonBar.LoadFromResource(IDR_MAINFRAME);
	}
	if (!m_wndStatusBar.Create(this))
	{
		TRACE0("Failed to create status bar\n");
		return -1;      // fail to create
	}
Posted
Updated 18-Mar-20 16:43pm

1 solution

Just off the top of my head I would definitely call CMainFrame::EnableDraw(FALSE) before starting the switch and after switch was performed call CMainFrame::EnableDraw(TRUE). This should disable any drawing by main window during switching code
 
Share this answer
 

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