Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ VS2010 Application
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
        DWORD dwStyle =WS_CHILD|WS_VISIBLE|ACS_AUTOPLAY|ACS_TRANSPARENT|ACS_CENTER;
	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);
	}
Posted 20-Jan-13 20:12pm
Edited 20-Jan-13 20:34pm
14K
v2

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 495
1 OriginalGriff 339
2 ChintanShukla 305
3 Richard Deeming 235
4 RyanDev 230
0 Sergey Alexandrovich Kryukov 8,858
1 OriginalGriff 7,451
2 CPallini 2,603
3 Richard MacCutchan 2,095
4 Abhinav S 1,893


Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100