directshow 显示有黑边的问题!
bool CDXGraph::SetWindow(HWND inWindow){ mVideoWindow->put_Owner((OAHWND)inWindow); mVideoWindow->put_Visible(OATRUE); mVideoWindow->put_AutoShow(OATRUE); mVideoWindow->put_MessageDrain((OAHWND) inWindow); mVideoWindow->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN); return S_OK;}bool CDXGraph::SetDisplayWindow(HWND inWindow){ if (mVideoWindow) { RECT windowRect; GetClientRect(inWindow, &windowRect); HRESULT hr = NULL; LONG lVideoWidth, lVideoHeight, lNewWidth, lNewHeight, lWidth, lHeight; //Read the default video size hr = mBasicVideo->GetVideoSize(&lVideoWidth, &lVideoHeight); if (FAILED(hr)) { mBasicVideo->Release(); mVideoWindow->Release(); return FALSE; } // Ignore the video's original size and stretch to fit bounding rectangle hr = mVideoWindow->SetWindowPosition(0,0,windowRect.right, windowRect.bottom ); if (FAILED(hr)) { return S_FALSE; } return S_OK; } return S_FALSE;}