|
To:bluejoe
我按照你的想法做了,具体方法是:
建立一个sdi工程,这个工程不支持文档类视图,因而只有一个ChildView视图,我在类CChildView中加入数据成员,
public:
CFlashWnd m_Flash;
然后增加OnCreate消息处理方法:
int CChildView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (m_Flash.Create((CWnd *)this)==-1)
return -1;
CMainFrame *p_Frame=(CMainFrame *)GetParent();
p_Frame->p_Flash=&m_Flash;
return 0;
}
在CMainFrame中加入成员
public:
CFlashWnd *p_Flash;
最后,在重载About菜单方法如下:
void CMainFrame::OnAppAbout()
{
// TODO: Add your command handler code here
p_Flash->SetMovie("1.swf");
p_Flash->Play();
}
问题是,flash不播放,请问到底是什么原因,源代码可以提供,谢谢!
latitude 于 2007-06-25 22:42:41.0 编辑
[回复该贴]
|