Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello to Everyone.
I have created MFC Ribbon Application in VS2010. I have attached avi with CMFCRibbonStatusBarPane with Autoplay mode. When I have started my application Click on Button For "Play Avi". Avi is running now.

If my Application is having character Set Settings: Multibyte Character Set
And Click on Button For "Opening 20 Documents" Avi is still running while opening documents.

But If My Application is having character set Settings: Unicode
And Click on Button For "Opening 20 Documents" Avi is automatically stopped while opening documents.

Details As Below:::
CStatusbarAnimate CPP: Create Code
	if (!CAnimateCtrl::Create( dwStyle, rect, pStatusBar, 0 ))
		return FALSE;

	m_nPane = nPane;
	return Open( nIDanimation );
MainFrame Header
	CStatusbarAnimate		*m_pAnimate;
	CMFCRibbonStatusBar		m_wndStatusBar;
	CMFCRibbonStatusBarPane		*m_wndStatusValue1;
MainFrame CPP: OnCreate Function
	m_wndStatusValue1 = new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE1, _T(""), TRUE);
	m_wndStatusBar.AddElement(m_wndStatusValue1, _T(""));
	m_wndStatusBar.AddExtendedElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE2, strTitlePane2, TRUE), strTitlePane2);
MainFrame CPP: "Play Avi" Function (Button Click)
CRect rect;
	rect = m_wndStatusValue1->GetRect();
	m_pAnimate = new CStatusbarAnimate;
	m_pAnimate->Create(IDR_AVITEST, 1,rect);

AND "Open 20 Documents" (Button Click)
CRibbonStatusApplicationDoc *pDoc;
	for(int k = 0; k < 20; k++)
		pDoc = (CRibbonStatusApplicationDoc *)((CRibbonStatusApplicationApp *)AfxGetApp())->pDocTemplate->OpenDocumentFile(NULL,true);
Updated 20-Jan-13 20:34pm

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