HWND VFWAPI capCreateCaptureWindow( LPCSTR lpszWindowName, //捕获窗口的名称 DWORD dwStyle, // 捕获窗口的窗口风格 int x, // 捕获窗口的左上角坐标 int y, int nWidth, //捕获窗口的宽和高 int nHeight, HWND hWnd, //捕获窗口的父窗口句柄 int nID //捕获窗口的ID值 );
HWND hWnd=capCreateCaptureWindow(_T("AviCap_FrameGrabber_lite"), WS_CHILD|WS_CLIPSIBLINGS, x, y, 640, 480, pParentWnd?pParentWnd->GetSafeHwnd():NULL, 0xffff);
切记: int nID //捕获窗口的ID值
要设置为0xffff,否则运行不会有问题,但是编译时会出现:User breakpoint called from code at 0x7c921230