海康设置osd,哪里出问题了
kciv 2019-10-22 10:53:45 procedure Tfrm_Jsyl.Button23Click(Sender: TObject);
var
SHOWSTRINGCFG:NET_DVR_SHOWSTRING_V30;
osd: string ;
buf: array[0..43] of Char;
s :string;
i: Integer;
begin
SHOWSTRINGCFG.dwSize := sizeof(SHOWSTRINGCFG); // 获取结构体空间大小
// showmessage(inttostr(lUserID));
osd:='video test';
SHOWSTRINGCFG.struStringInfo[0].wShowString:=1; //1为显示
strpcopy(@buf,osd);
// showmessage(buf[0]);
SHOWSTRINGCFG.struStringInfo[0].sString:=buf; -----》这句提示错误了 Incompatible types
SHOWSTRINGCFG.struStringInfo[0].wStringSize:=120;
SHOWSTRINGCFG.struStringInfo[0].wShowStringTopLeftX:=110;
SHOWSTRINGCFG.struStringInfo[0].wShowStringTopLeftY:=200;
NET_DVR_SetDVRConfig(lUserID, NET_DVR_SET_SHOWSTRING_V30,strtoint(Edit_Ch_no.text), @SHOWSTRINGCFG,sizeof(SHOWSTRINGCFG)) ;
showmessage(inttostr(NET_DVR_GetLastError()));
end;
SHOWSTRINGCFG.struStringInfo[0].sString:=buf; -----》这句提示错误了 Incompatible types
以下是NET_DVR_SHOWSTRINGINFO的 结构体,请问如何解决???
{///单字符参数(子结构) }
type
NET_DVR_SHOWSTRINGINFO = record
wShowString: Word;
wStringSize: Word;
{= 该行字符的长度,不能大于44个字符 }
wShowStringTopLeftX: Word;
{= 字符显示位置的x坐标 }
wShowStringTopLeftY: Word;
{= 字符名称显示位置的y坐标 }
sString: Array[0..44-1] of Char;
{= 要显示的字符内容 }
end