如何保存pb中调用摄像头后取得的图像?老是不成功(没反应)?急

sydzy_1972 2009-04-14 06:50:26
我的代码为
//cb_start
string lpszName
ulong ll
long l
ll=handle(parent)
lpszName='照片采集'
lhand= capCreateCaptureWindowA(lpszName,262144+12582912+1073741824+268435456,2,20,400,400,ll,0)
if lhand<> 0 then
Send(lhand, WM_CAP_SET_CALLBACK_VIDEOSTREAM,0,0);
Send(lhand, WM_CAP_SET_CALLBACK_ERROR, 0,0);
Send(lhand, WM_CAP_SET_CALLBACK_STATUSA, 0,0);
Send(lhand, WM_CAP_DRIVER_CONNECT, 0,0);
Send(lhand, WM_CAP_SET_SCALE,1,0);
Send(lhand, WM_CAP_SET_PREVIEWRATE, 66, 0);
Send(lhand, WM_CAP_SET_OVERLAY, 1, 0);
Send(lhand, WM_CAP_SET_PREVIEW, 1, 0);
end if
//cb_save
//lhand=
string s
s="e:\save.bmp"
if lhand<>0 then
Send(lhand,WM_CAP_SAVEDIB,0,s)
end if
...全文
1394 17 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
Powertion 2012-08-23
  • 打赏
  • 举报
回复
newease的方法pb9 xp下没有生成保存文件
feiwo_ms 2010-04-25
  • 打赏
  • 举报
回复
我在pb 10.5中实验的结果是保存的图像名只取给定字符串的第一个字母,且没有后缀。这是怎么回事?
蓝天白云pu 2009-09-20
  • 打赏
  • 举报
回复
为什么不可以保存为JPG文件啊,只能保存为BMP
lao_bulls 2009-08-07
  • 打赏
  • 举报
回复
顶。
31737951 2009-08-06
  • 打赏
  • 举报
回复
接贴率低 啊
jjyyyyyyjj 2009-08-06
  • 打赏
  • 举报
回复
头昏中...........
www_huabo 2009-07-04
  • 打赏
  • 举报
回复
楼上,我用你贴的代码为何打开后是黑屏,保存后c:\save.bmp的大小为0.视频是可以的
newease 2009-04-15
  • 打赏
  • 举报
回复
楼主的结贴率太低了,应当注意啊,呵呵
newease 2009-04-15
  • 打赏
  • 举报
回复
用 api 调用 摄像头 源码 添加了保存代码 用 api 调用 摄像头 源码
//定义变量
uint lhand



//定义常数
long WM_USER=1024
long WM_CAP_START = WM_USER
long WM_CAP_STOP = WM_CAP_START + 68
long WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10
long WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11
long WM_CAP_SAVEDIB = WM_CAP_START + 25
long WM_CAP_GRAB_FRAME = WM_CAP_START + 60
long WM_CAP_SEQUENCE = WM_CAP_START + 62
long WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20
long WM_CAP_SEQUENCE_NOFILE =WM_CAP_START+ 63
long WM_CAP_SET_OVERLAY =WM_CAP_START+ 51
long WM_CAP_SET_PREVIEW =WM_CAP_START+ 50
long WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START +6
long WM_CAP_SET_CALLBACK_ERROR=WM_CAP_START +2
long WM_CAP_SET_CALLBACK_STATUSA= WM_CAP_START +3
long WM_CAP_SET_CALLBACK_FRAME= WM_CAP_START +5
long WM_CAP_SET_SCALE=WM_CAP_START+ 53
long WM_CAP_SET_PREVIEWRATE=WM_CAP_START+ 52



//定义api
function ulong capCreateCaptureWindowA(string lpszWindowName,ulong dwStyle,long x ,long y ,long nWidth ,long nHeight

,ulong ParentWin ,long nId ) LIBRARY 'AVICAP32.DLL'



//初始化代码
string lpszName
ulong l1
l1=handle(w_main)



lpszName='摄像头界面...'
lhand=capCreateCaptureWindowA(lpszName,262144+12582912+1073741824 + 268435456 ,0,0,200,200,l1,0)
if lhand <> 0 then
send(lhand, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0)
send(lhand, WM_CAP_SET_CALLBACK_ERROR, 0, 0)
send(lhand, WM_CAP_SET_CALLBACK_STATUSA, 0, 0)
send(lhand, WM_CAP_DRIVER_CONNECT, 0, 0)
send(lhand, WM_CAP_SET_SCALE, 1, 0)
send(lhand, WM_CAP_SET_PREVIEWRATE, 66, 0)
send(lhand, WM_CAP_SET_OVERLAY, 1, 0)
send(lhand, WM_CAP_SET_PREVIEW, 1, 0)
end if



//保存到文件
string s
s='c:\save.avi'
if lhand<>0 then
Send(lhand,WM_CAP_FILE_SET_CAPTURE_FILEA,0, s);
Send(lhand,WM_CAP_SEQUENCE, 0, 0) //开始捕捉
end if



//停止保存
send(lhand, WM_CAP_STOP, 0, 0)



//保存为图片
string s
s='c:\save.bmp'
if lhand <> 0 then
Send(lhand,WM_CAP_SAVEDIB,0,s);
end if



//没有摄像头的可以去下载一个如下的软件,可以虚拟摄像头(此软件可以放一个电影,代替正常摄像头的摄像内容)
Vandate Virtual Camera 虚拟摄像头
hxbkkk 2009-04-15
  • 打赏
  • 举报
回复
合并成uo_custom.sru导入即可
hxbkkk 2009-04-15
  • 打赏
  • 举报
回复
type cb_2 from uo_commandbutton within uo_custom
integer x = 1609
integer y = 716
integer width = 320
integer taborder = 80
boolean enabled = false
string text = "快照"
end type

event clicked;call super::clicked;//QiuHu-MLS writed at 2005/08/24
string s_map
s_map='c:\save.bmp'
if FileExists(s_map) then FileDelete(s_map)
if lhand <> 0 then
Send(lhand,WM_CAP_SAVEDIB,0,s_map);
p_1.visible = true
st_1.visible = false
p_1.picturename = s_map
send(lhand, WM_CAP_DRIVER_DISCONNECT, 0, 0)
lhand =0
this.enabled = false
cb_1.enabled = true
end if

end event

type cb_1 from uo_commandbutton within uo_custom
integer x = 1230
integer y = 716
integer width = 320
integer taborder = 70
string text = "摄像头获取"
end type

event clicked;call super::clicked;//QiuHu-MLS writed at 2005/08/24
string lpszName,s
ulong l1
setpointer(hourglass!)
p_1.visible = false
st_1.visible = true
l1=handle(st_1)
lpszName='本地视频'
//lhand=capCreateCaptureWindowA(lpszName,262144+12582912+1073741824 + 268435456,0,0,UnitsToPixels(st_1.width,XUnitsToPixels!),UnitsToPixels(st_1.height,YUnitsToPixels!),l1,0)
lhand=capCreateCaptureWindowA(lpszName,262144+12582912+1073741824 + 268435456 ,-5,-30,320,240,l1,0)
if lhand <> 0 then
send(lhand, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0)
send(lhand, WM_CAP_SET_CALLBACK_ERROR, 0, 0)
send(lhand, WM_CAP_SET_CALLBACK_STATUSA, 0, 0)
send(lhand, WM_CAP_DRIVER_CONNECT, 0, 0)
send(lhand, WM_CAP_SET_SCALE, 1, 0)
send(lhand, WM_CAP_SET_PREVIEWRATE, 66, 0)
send(lhand, WM_CAP_SET_OVERLAY, 1, 0)
send(lhand, WM_CAP_SET_PREVIEW, 1, 0)
cb_2.enabled = true

end if
setpointer(arrow!)



end event

type st_1 from statictext within uo_custom
integer x = 421
integer y = 84
integer width = 699
integer height = 616
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
boolean enabled = false
alignment alignment = center!
boolean border = true
boolean focusrectangle = false
end type

type p_1 from picture within uo_custom
integer x = 1230
integer y = 84
integer width = 699
integer height = 616
boolean enabled = false
boolean border = true
boolean focusrectangle = false
end type

type sle_addr from singlelineedit within uo_custom
integer x = 325
integer y = 700
integer width = 869
integer height = 104
integer taborder = 60
integer textsize = -9
integer limit = 50
end type

type sle_phone from singlelineedit within uo_custom
integer x = 325
integer y = 572
integer width = 869
integer height = 104
integer taborder = 50
integer textsize = -9
integer limit = 50
end type

type sle_id from singlelineedit within uo_custom
integer x = 325
integer y = 448
integer width = 869
integer height = 104
integer taborder = 40
integer textsize = -9
integer limit = 20
end type

type sle_name from singlelineedit within uo_custom
integer x = 325
integer y = 84
integer width = 869
integer height = 104
integer taborder = 10
integer textsize = -9
integer limit = 8
end type

type ddlb_type from dropdownlistbox within uo_custom
event ue_keydown pbm_keydown
integer x = 325
integer y = 332
integer width = 869
integer height = 376
integer taborder = 30
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
boolean sorted = false
boolean vscrollbar = true
string item[] = {"身份证","学生证","教师证","军官证","老年证","驾驶证"}
borderstyle borderstyle = stylelowered!
end type

event selectionchanged;send(handle(this),256,9,0)
return 1
end event

type ddlb_sex from dropdownlistbox within uo_custom
integer x = 325
integer y = 212
integer width = 869
integer height = 376
integer taborder = 20
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
boolean sorted = false
string item[] = {"男","女"}
borderstyle borderstyle = stylelowered!
end type

event selectionchanged;send(handle(this),256,9,0)
return 1
end event

type st_12 from statictext within uo_custom
integer x = 59
integer y = 728
integer width = 283
integer height = 60
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "地 址:"
boolean focusrectangle = false
end type

type st_11 from statictext within uo_custom
integer x = 59
integer y = 604
integer width = 274
integer height = 60
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "电话号码:"
boolean focusrectangle = false
end type

type st_10 from statictext within uo_custom
integer x = 59
integer y = 480
integer width = 274
integer height = 60
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "证件号码:"
boolean focusrectangle = false
end type

type st_9 from statictext within uo_custom
integer x = 59
integer y = 356
integer width = 274
integer height = 60
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "证件类型:"
boolean focusrectangle = false
end type

type st_8 from statictext within uo_custom
integer x = 59
integer y = 240
integer width = 283
integer height = 60
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "性 别:"
boolean focusrectangle = false
end type

type st_7 from statictext within uo_custom
integer x = 59
integer y = 120
integer width = 283
integer height = 60
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "姓 名:"
boolean focusrectangle = false
end type

type gb_2 from groupbox within uo_custom
integer x = 14
integer width = 1947
integer height = 1008
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "会员信息资料"
end type
hxbkkk 2009-04-15
  • 打赏
  • 举报
回复
type cb_7 from commandbutton within uo_custom
integer x = 110
integer y = 856
integer width = 425
integer height = 104
integer taborder = 120
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "关闭摄像头[&D]"
end type

event clicked;

if lhand <> 0 then
send(lhand,wm_cap_driver_disconnect,0,0)
send(lhand,wm_close,0,0)
lhand = 0
end if
end event

type cb_6 from commandbutton within uo_custom
integer x = 521
integer y = 864
integer width = 343
integer height = 104
integer taborder = 120
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "录像[&L]"
end type

event clicked;string s
s = gs_cd_path + string(datetime(today(),now()),"yyyymmddhhmmss") + ".avi"

if lhand <> 0 then
send(lhand,wm_cap_file_set_capture_filea,0,s)
send(lhand,wm_cap_sequence,0,0)
end if

end event

type cb_5 from commandbutton within uo_custom
integer x = 1632
integer y = 888
integer width = 366
integer height = 104
integer taborder = 110
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "压缩设置[&S]"
end type

event clicked;

if lhand > 0 then
send(lhand,wm_cap_dlg_videocompression,0,0)
end if

return
end event

type cb_4 from commandbutton within uo_custom
integer x = 891
integer y = 868
integer width = 343
integer height = 104
integer taborder = 100
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "格式设置"
end type

event clicked;

if lhand > 0 then
send(lhand,wm_cap_dlg_videoformat,0,0)
end if

return
end event

type cb_3 from commandbutton within uo_custom
integer x = 1253
integer y = 864
integer width = 343
integer height = 104
integer taborder = 90
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "源设置[&Y]"
end type

event clicked;

if lhand > 0 then
send(lhand,wm_cap_dlg_videosource,0,0)
end if

return
end event

hxbkkk 2009-04-15
  • 打赏
  • 举报
回复
type cb_10 from commandbutton within uo_custom
integer x = 1248
integer y = 1096
integer width = 343
integer height = 104
integer taborder = 140
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "保存"
end type

event clicked;blob lb_s
integer li_File
li_File = FileOpen("c:\save.bmp",StreamMode!, read!, LockWrite!)
FileRead ( li_File,lb_s)
updateblob xkz_jbzl set photo=:lb_s where zhao = '0404A40001';
messagebox('',sqlca.sqlerrtext)
commit;
Fileclose ( li_File)

end event

type cb_9 from commandbutton within uo_custom
integer x = 841
integer y = 1056
integer width = 343
integer height = 104
integer taborder = 130
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "数据库"
end type

event clicked;// selectblob tp into :lbb_dk_blob from ld_dktpb where dkbm =:lm_s_dkbm;
// setpicture(p_3,lbb_dk_blob)
blob lb_s
integer li_File
selectblob photo into :lb_s from xkz_jbzl where zhao = '0404A40001';
setpicture(p_1,lb_s)


end event

type cb_8 from commandbutton within uo_custom
integer x = 402
integer y = 1036
integer width = 343
integer height = 104
integer taborder = 120
integer textsize = -9
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "文件"
end type

event clicked;//string s_map
//s_map='c:\save.bmp'
//p_1.visible = true
//st_1.visible = false
//p_1.picturename = s_map
string lm_add_hkbm
string docname, named
integer value,li_f,i
integer li_fileptr,li_loops
long ll_filelen,ll_bytes_read
Blob lbb_Read,lbb_Total
value = GetFileOpenName( "选择图形文件 ", + docname, named, "jpg ", + "jpg Files(*.jpg),*.jpg,"+"Bmp Files (*.BMP),*.BMP,"+"gif files (*.gif),*.gif")
IF value = 1 THEN
ll_filelen = FileLength(docname) //获取文件长度, 必须在打开之前
li_fileptr = FileOpen(docname,STREAMMODE!,READ!,LOCKREAD!)
If li_fileptr = -1 Then
Beep(2)
MessageBox( "错误", "图形文件打开错误! ")
Return
End If
IF ll_filelen > 32765 THEN
li_loops = ( (ll_filelen - 1) / 32765 ) + 1
ELSE
li_loops = 1
END IF

For i = 1 to li_loops
ll_bytes_read = FileRead(li_fileptr,lbb_Read)
lbb_Total = lbb_Total + lbb_Read
Next
updateblob xkz_jbzl set photo=:lbb_Total where zhao = '0404A40001';
messagebox('',sqlca.sqlerrtext)
commit;
FileClose (li_fileptr)

SetPicture(p_1,lbb_Total)
end if


end event

hxbkkk 2009-04-15
  • 打赏
  • 举报
回复



long wm_cap_savedatdib = 1049
long wm_cap_dlg_videoformat = 1065
long wm_cap_dlg_videosource = 1066
long wm_cap_dlg_videodisplay = 1067
long wm_cap_get_videoformat = 1068
long wm_cap_set_videoformat = 1069
long wm_cap_dlg_videocompression = 1070
long cf_bitmap = 2
long wm_close = 16
ulong scrcopy = 32
string gs_pic_path
string gs_cd_path
string gs_path
string gs_ds_pic
string gs_ds_cd
string gs_cd_rq
long gl_pic_sj = 0
end variables

forward prototypes
public subroutine of_clear ()
end prototypes

public subroutine of_clear ();sle_name.text = ''
sle_id.text = ''
sle_phone.text = ''
sle_addr.text = ''
end subroutine
on uo_custom.create
this.cb_10=create cb_10
this.cb_9=create cb_9
this.cb_8=create cb_8
this.cb_7=create cb_7
this.cb_6=create cb_6
this.cb_5=create cb_5
this.cb_4=create cb_4
this.cb_3=create cb_3
this.cb_2=create cb_2
this.cb_1=create cb_1
this.st_1=create st_1
this.p_1=create p_1
this.sle_addr=create sle_addr
this.sle_phone=create sle_phone
this.sle_id=create sle_id
this.sle_name=create sle_name
this.ddlb_type=create ddlb_type
this.ddlb_sex=create ddlb_sex
this.st_12=create st_12
this.st_11=create st_11
this.st_10=create st_10
this.st_9=create st_9
this.st_8=create st_8
this.st_7=create st_7
this.gb_2=create gb_2
this.Control[]={this.cb_10,&
this.cb_9,&
this.cb_8,&
this.cb_7,&
this.cb_6,&
this.cb_5,&
this.cb_4,&
this.cb_3,&
this.cb_2,&
this.cb_1,&
this.st_1,&
this.p_1,&
this.sle_addr,&
this.sle_phone,&
this.sle_id,&
this.sle_name,&
this.ddlb_type,&
this.ddlb_sex,&
this.st_12,&
this.st_11,&
this.st_10,&
this.st_9,&
this.st_8,&
this.st_7,&
this.gb_2}
end on

on uo_custom.destroy
destroy(this.cb_10)
destroy(this.cb_9)
destroy(this.cb_8)
destroy(this.cb_7)
destroy(this.cb_6)
destroy(this.cb_5)
destroy(this.cb_4)
destroy(this.cb_3)
destroy(this.cb_2)
destroy(this.cb_1)
destroy(this.st_1)
destroy(this.p_1)
destroy(this.sle_addr)
destroy(this.sle_phone)
destroy(this.sle_id)
destroy(this.sle_name)
destroy(this.ddlb_type)
destroy(this.ddlb_sex)
destroy(this.st_12)
destroy(this.st_11)
destroy(this.st_10)
destroy(this.st_9)
destroy(this.st_8)
destroy(this.st_7)
destroy(this.gb_2)
end on

event destructor;if lhand <> 0 then
send(lhand, WM_CAP_DRIVER_DISCONNECT, 0, 0)
lhand =0
end if
end event

event constructor;ddlb_sex.selectitem(1)
ddlb_type.selectitem(1)
end event

hxbkkk 2009-04-15
  • 打赏
  • 举报
回复
$PBExportHeader$uo_custom.sru
forward
global type uo_custom from userobject
end type
type cb_10 from commandbutton within uo_custom
end type
type cb_9 from commandbutton within uo_custom
end type
type cb_8 from commandbutton within uo_custom
end type
type cb_7 from commandbutton within uo_custom
end type
type cb_6 from commandbutton within uo_custom
end type
type cb_5 from commandbutton within uo_custom
end type
type cb_4 from commandbutton within uo_custom
end type
type cb_3 from commandbutton within uo_custom
end type
type cb_2 from uo_commandbutton within uo_custom
end type
type cb_1 from uo_commandbutton within uo_custom
end type
type st_1 from statictext within uo_custom
end type
type p_1 from picture within uo_custom
end type
type sle_addr from singlelineedit within uo_custom
end type
type sle_phone from singlelineedit within uo_custom
end type
type sle_id from singlelineedit within uo_custom
end type
type sle_name from singlelineedit within uo_custom
end type
type ddlb_type from dropdownlistbox within uo_custom
end type
type ddlb_sex from dropdownlistbox within uo_custom
end type
type st_12 from statictext within uo_custom
end type
type st_11 from statictext within uo_custom
end type
type st_10 from statictext within uo_custom
end type
type st_9 from statictext within uo_custom
end type
type st_8 from statictext within uo_custom
end type
type st_7 from statictext within uo_custom
end type
type gb_2 from groupbox within uo_custom
end type
end forward

global type uo_custom from userobject
integer width = 1970
integer height = 1360
long backcolor = 67108864
string text = "none"
long tabtextcolor = 33554432
long picturemaskcolor = 536870912
cb_10 cb_10
cb_9 cb_9
cb_8 cb_8
cb_7 cb_7
cb_6 cb_6
cb_5 cb_5
cb_4 cb_4
cb_3 cb_3
cb_2 cb_2
cb_1 cb_1
st_1 st_1
p_1 p_1
sle_addr sle_addr
sle_phone sle_phone
sle_id sle_id
sle_name sle_name
ddlb_type ddlb_type
ddlb_sex ddlb_sex
st_12 st_12
st_11 st_11
st_10 st_10
st_9 st_9
st_8 st_8
st_7 st_7
gb_2 gb_2
end type
global uo_custom uo_custom

type prototypes
function ulong capCreateCaptureWindowA(string lpszWindowName,ulong dwStyle,long li_x ,long li_y ,long nWidth ,long nHeight ,ulong ParentWin ,long nId ) LIBRARY 'AVICAP32.DLL'
end prototypes

type variables
Private:
uint lhand
Constant long WM_USER=1024
Constant long WM_CAP_START = WM_USER
Constant long WM_CAP_STOP = WM_CAP_START + 68
Constant long WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10
Constant long WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11
Constant long WM_CAP_SAVEDIB = WM_CAP_START + 25
Constant long WM_CAP_GRAB_FRAME = WM_CAP_START + 60
Constant long WM_CAP_SEQUENCE = WM_CAP_START + 62
Constant long WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20
Constant long WM_CAP_SEQUENCE_NOFILE =WM_CAP_START+ 63
Constant long WM_CAP_SET_OVERLAY =WM_CAP_START+ 51
Constant long WM_CAP_SET_PREVIEW =WM_CAP_START+ 50
Constant long WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START +6
Constant long WM_CAP_SET_CALLBACK_ERROR=WM_CAP_START +2
Constant long WM_CAP_SET_CALLBACK_STATUSA= WM_CAP_START +3
Constant long WM_CAP_SET_CALLBACK_FRAME= WM_CAP_START +5
Constant long WM_CAP_SET_SCALE=WM_CAP_START+ 53
Constant long WM_CAP_SET_PREVIEWRATE=WM_CAP_START+ 52




680

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder API 调用
社区管理员
  • API 调用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧