![]() |
How to plash flash file? |
Post Reply
|
| Author | |
cxmvip
Newbie
Joined: 28 June 2007 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Topic: How to plash flash file?Posted: 01 August 2007 at 6:26am |
|
I want to play the flash file in the tool bar. My code is following:
int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)
{ if (lpCreateControl->bToolBar && lpCreateControl->nID == IDC_ANIMATION) { // Create the flash control. if (!m_wndFlashCtrl.Create("swf",WS_TABSTOP | WS_CHILD | WS_VISIBLE | ACS_AUTOPLAY, CRect(0, 0, 340, 0), this, IDC_ANIMATION,NULL)) { return FALSE; } CString m_st_flashFilePath="";
m_st_flashFilePath.Format("e:\\demo.swf"); m_wndFlashCtrl.LoadMovie(0,m_st_flashFilePath); m_wndFlashCtrl.Play(); CXTPControlCustom* pControlFlash = CXTPControlCustom::CreateControlCustom(&m_wndFlashCtrl);
// Set the vertical draw options to xtpVerticalShow.
// This will draw the animation control when the swf // toolbar is docked vertically. pControlFlash->SetVerticalPositionOption(xtpVerticalShow); lpCreateControl->pControl = pControlFlash;
return TRUE;
} return FALSE; } It cann't play swf file in the toolbar! Please help me!
|
|
|
bird
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 August 2007 at 9:00am |
|
Hello,
What class m_wndFlashCtrl is?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
cxmvip
Newbie
Joined: 28 June 2007 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 August 2007 at 12:00pm |
|
Thanks Oleg. The class m_wndFlashCtrl is one control to play swf file. CShockwaveFlash m_wndFlashCtrl; // Flash control
I insert shockwave flash object into my project.
|
|
|
bird
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 August 2007 at 2:17am |
|
It works for me....
Just change bounding rectangle to set some height:
CRect(0, 0, 340, 40)
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
cxmvip
Newbie
Joined: 28 June 2007 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 August 2007 at 3:45am |
|
Thanks very much!!!!!!!!
|
|
|
bird
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |