首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

怎么让directshow捕获的视频显示在Panel上

2012-03-01 
如何让directshow捕获的视频显示在Panel上HRESULTTForm1::SetupVideoWindow(void){HRESULThr//Setthevide

如何让directshow捕获的视频显示在Panel上
HRESULT   TForm1::SetupVideoWindow(void)
{
        HRESULT   hr;

        //   Set   the   video   window   to   be   a   child   of   the   main   window
        hr   =   g_pVW-> put_Owner((OAHWND)Handle);
        if   (FAILED(hr))
                return   hr;

        //   Set   video   window   style
        hr   =   g_pVW-> put_WindowStyle(WS_CHILD   |   WS_CLIPCHILDREN);
        if   (FAILED(hr))
                return   hr;

        //   Use   helper   function   to   position   video   window   in   client   rect
        //   of   main   application   window
        ResizeVideoWindow();

        //   Make   the   video   window   visible,   now   that   it   is   properly   positioned
        hr   =   g_pVW-> put_Visible(OATRUE);
        if   (FAILED(hr))
                return   hr;

        return   hr;
}


现在他显示的是在一个子窗体中,如何让它显示在Panel上

[解决办法]
Handle --> Panel1-> Handle

热点排行