3,245
社区成员
发帖
与我相关
我的任务
分享
RECT rc;
this->GetClientRect(&rc);//获得客户区的坐标
m_MediaPlayer.MoveWindow(&rc, true);//控件并没有占有整个窗口?
m_MediaPlayer.ShowWindow(SW_HIDE);//想隐藏窗口,但是仍然没有效果
BOOL CScreenCapDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetWindowPos(NULL,0,0,192,288,SWP_SHOWWINDOW);//位置
//初始化Flash控件的位置
RECT rc;
this->GetClientRect(&rc);//获得客户区的坐标
m_MediaPlayer.MoveWindow(&rc, true);
m_MediaPlayer.ShowWindow(SW_HIDE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
//在view中
void CDB_LED_PLAYER_V1View::OnVideoplayer()
{
CDB_LED_PLAYER_V1Doc* pDoc = GetDocument();
pDoc->m_isMediaPlaying=TRUE;
TCHAR szFileFilter[]= _T("Mp4 File(*.mp4)|*.mp4|Media File(*.asf)|*.asf=|Wave File(*.wav)|*.wav|AVI File(*.avi)|*.avi|Wma File(*.wma)|*.wma|All File(*.*)|*.*||");
CFileDialog fileDialog( TRUE,NULL,NULL,NULL,szFileFilter,this);
if (fileDialog.DoModal() == IDOK)
{
pDoc->mediafileName=fileDialog.GetPathName();
//CString fileName=fileDialog.GetPathName();
m_pScreenCapDlg->m_MediaPlayer.put_URL(pDoc->mediafileName);
}
}