I want to capture image from web cam without showing vedio display box.
I am using avicap32.dll.
When I call capDriverConnect(hMyWindow,index) it shows dialog box with capturing devices.
I already fill combo box with capturing devices.
my code is
HWND InitDevice(HWND m_hWnd,int w,int h,int index)
{
wid=w;
het=h;
hMyWindow=NULL;
if(hMyWindow==NULL)
{
LPCWCHAR webcamname; hMyWindow = capCreateCaptureWindow(webcamname, WS_CHILD | WS_VISIBLE, 0, 0, wid,het,m_hWnd,0);
}
if (hMyWindow == NULL)
{
return FALSE;
}
if(!capSetCallbackOnVideoStream(hMyWindow,NULL))
{
return FALSE;
}
if(!capSetCallbackOnError(hMyWindow,NULL))
{
return FALSE;
}
if(!capSetCallbackOnFrame(hMyWindow,NULL))
{
return FALSE;
}
if(!capSetCallbackOnStatus(hMyWindow,NULL))
{
return FALSE;
}
if(!capSetCallbackOnWaveStream(hMyWindow,NULL))
{
return FALSE;
}
if(!capSetCallbackOnYield(hMyWindow,NULL))
{
return FALSE;
}
if (!capDriverConnect(hMyWindow,index))
{
return FALSE;
}
if (!SetCapturePara())
{
capDriverDisconnect(hMyWindow);
return FALSE;
}
return hMyWindow;
}