?CWnd* pWnd;
?CRect rectWMP;
?pWnd = GetDlgItem(IDC_STATIC);?
?pWnd->GetWindowRect(&rectWMP);
?CWMPPlayer4* player = new? CWMPPlayer4;
?player->Create("",WS_CHILD|WS_VISIBLE,rectWMP,pWnd,IDC_OCX1);
?player->put_URL(_T("E:\\CIMG2137.AVI"));
?
?CWMPControls* control = (CWMPControls*)player->get_controls();
? control->Pause();
執行到最后一行的時候就掛了,我檢查了一下control不為空,查了很多資料也沒對這個問題進行過闡述,各位大蝦有什么好主意沒有。
注:player的各個函數的使用都是正確的,但是從player里面獲取的其他接口的實例使用就有問題了。