Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to plash flash file?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to plash flash file?

 Post Reply Post Reply
Author
Message
cxmvip View Drop Down
Newbie
Newbie
Avatar

Joined: 28 June 2007
Location: China
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cxmvip Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 August 2007 at 9:00am
Hello,
 
What class m_wndFlashCtrl is?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
cxmvip View Drop Down
Newbie
Newbie
Avatar

Joined: 28 June 2007
Location: China
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cxmvip Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
cxmvip View Drop Down
Newbie
Newbie
Avatar

Joined: 28 June 2007
Location: China
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cxmvip Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2007 at 3:45am
Thanks very much!!!!!!!!
bird
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.