Date: 02-16-2022
Return to Index
'https://msdn.microsoft.com/en-us/library/dd757708%28v=vs.85%29.aspx
created by gbSnippets
'http://www.powerbasic.com/support/pbforums/showthread.php?t=49845&highlight=AVIcap32.dll
'Compilable Example: (Jose Includes)
#Compiler PBWin 10
#Compile Exe
#Dim All
#Include "win32api.inc"
#Include "vfw.inc"
Function PBMain () As Long
Local hDlg As Dword
Dialog New Pixels, 0, "TestDlg", 0, 0, 320, 240, %WS_SysMenu Or %DS_Center To hDlg
Dialog Show Modal hDlg Call CBProc
End Function
CallBack Function CBProc
Static hCap As Dword
Select Case As Long Cb.Msg
Case %WM_Destroy
sendmessage hCap, %WM_CAP_DRIVER_DISCONNECT, 0, 0
Case %WM_InitDialog
hcap = capCreateCaptureWindow("Test CapWindow", ByVal (%WS_Child Or %WS_Visible), ByVal 0, ByVal 0, ByVal 320, ByVal 240, ByVal Cb.Hndl, ByVal 1001)
SendMessage hCap, %WM_CAP_DRIVER_CONNECT, 0, 0
SendMessage hCap, %WM_CAP_SET_SCALE, %True, 0
SendMessage hCap, %WM_CAP_SET_PREVIEWRATE, 30, 0
SendMessage hCap, %WM_CAP_SET_PREVIEW, %True, 0
End Select
End Function
http://www.garybeene.com/sw/gbsnippets.htm