`
vpfs45vpfs
  • 浏览: 14975 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

Flex3 做界面与 VC交互

 
阅读更多

  Flex3 代码  height="290" creationComplete="init()" xmlns:local="*" borderColor="#063D64"> height="21" id="title"/> height="21" click="minsizeHandle()"/> height="21" click="closeHandle()"/> height="80" source="@Embed('xx.jpg')" />      height="1"/>          新建一个对话框工程,添加ShockwaveFlash控件,为控件创建一个实例成员和交互代码 ShockwaveFlash m_FlashCtrl; //对话框初始化swf CString szFlashPath(m_FlashCtrl.GetModulePath()); szFlashPath += "test.swf"; m_FlashCtrl.LoadMovie(0, szFlashPath); MoveWindow(0, 0, 400, 290); m_FlashCtrl.MoveWindow(0, 0, 400, 290); //消息映射,与flash交互 BEGIN_EVENTSINK_MAP(CUIShowDlg, CDialog) ON_EVENT(CUIShowDlg, IDC_FLASH, 150, OnFsCommand, VTS_BSTR VTS_BSTR) END_EVENTSINK_MAP() void CUIShowDlg::OnFsCommand(LPCTSTR command, LPCTSTR args) { if( ! strcmp(command, "login") ) { CString strCmd = "Helloworld"; m_FlashCtrl.CallFunction(strCmd.GetBuffer(0)); } else if( ! strcmp(command, "logout") ) { } else if( ! strcmp(command, "title") ) { if( ! strcmp(args, "mouseDown") ) { SendMessage(WM_NCLBUTTONDOWN, HTCAPTION, 0); } } else if( ! strcmp(command, "close") ) { this->EndDialog(0); } else if( ! strcmp(command, "minsize") ) { this->ShowWindow(SW_SHOWMINIMIZED); } else { } }
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics