void HelloWorld::MoveVideo(){
int xCoord = 200;
int yCoord = 200;
int width = 720;
int height = 576;
//CComModule _Module;
//_pAtlModule=&_Module;
//CAxWindow m_wndView; // ActiveX host window class.
//CComPtr<IWMPPlayer4> m_spWMPPlayer; // Smart pointer to IWMPPlayer interface.
AtlAxWinInit();
CComPtr<IAxWinHostWindow> spHost;
HRESULT hr;
RECT rect = {xCoord,yCoord,xCoord + width,yCoord + height};
HWND hwndReturned = m_wndView.Create(CCDirector::sharedDirector()->getOpenGLView()->getHWnd(), rect, 0, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
hr = m_wndView.QueryHost(&spHost);
if ( SUCCEEDED( hr ) )
hr = spHost->CreateControl(CComBSTR(_T("{6BF52A52-394A-11d3-B153-00C04F79FAA6}")), m_wndView, 0);
if ( SUCCEEDED( hr ) )
hr = m_wndView.QueryControl(&m_spWMPPlayer);
m_spWMPControls = m_spWMPPlayer;
m_spSettings = m_spWMPPlayer;
BSTR mode = SysAllocString(L"loop");
m_spSettings->setMode(mode,VARIANT_TRUE);
//m_spSettings->put_autoStart(VARIANT_FALSE);
m_spWMPPlayer->get_enableContextMenu(VARIANT_FALSE);
//BSTR uiMode = SysAllocString(L"none");
//m_spWMPPlayer->put_uiMode(uiMode);
//m_spWMPPlayer->put_windowlessVideo(VARIANT_TRUE);
BSTR bsURL = SysAllocString(L"test.avi");
m_spWMPPlayer->put_URL(bsURL);
//m_wndView.MoveWindow(100,100,480,320);
//VARIANT_BOOL vbFull = VARIANT_TRUE;
//m_spWMPPlayer->get_fullScreen(&vbFull);
//m_spWMPPlayer->get_settings() //拉伸适应窗口
//m_spWMPPlayer->GetSettings().SetAutoStart(FALSE); //禁止自动播放
//m_spWMPPlayer->GetSettings().setMode("loop",true); //循环播放
//m_spWMPPlayer->SetUrl("list.wpl"); //播放列表
//m_spWMPPlayer->GetControls().play(); //播放
}