C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[38297] 댈파이 소스 인데 c++빌더 소스로점 바꿔 주세요 ㅠ
이성제 [14dia] 1125 읽음    2004-12-06 20:13
unit drvedit;

interface



procedure Register;

implementation

uses classes,dsgnintf,sysutils,vfw,video;

// Property Editor for driver selection   in Video-Cap
type TDrivereditor= class (TPropertyEditor)
  function GetAttributes:TPropertyAttributes;override;
  procedure GetValues(Proc: TGetStrProc);override;
  function GetValue:string;override;
  procedure SetValue(const Value: string);override;
end;

function TDriverEditor.GetAttributes:TPropertyAttributes;
begin
result :=[paRevertable,paValueList];
end;


procedure TDriverEditor.GetValues(Proc: TGetStrProc);
var i:integer;
    name:array[0..80] of char;
    ver :array[0..80] of char;
    s:string;

begin
for i:= 0 to 9 do
  begin
   if capGetDriverDescription( i,name,80,ver,80) then
      s:=strpas(name)
   else
      s:='' ;
   proc(s);
  end;

end;



function TDriverEditor.GetValue:string;

var  n:array[0..80] of char;
     ver :array[0..80] of char;
     s:string;


begin
with Getcomponent(0) as TVideoCap do
   begin
    if capGetDriverDescription( DriverIndex,n,80,ver,80) then
      s:=strpas(n)
    else
      s:='' ;
   end;
   result:= s;               //fVideoDrivername;
end;



procedure TDriverEditor.SetValue(const Value: string);
begin
  with Getcomponent(0) as TVideoCap do
    SetDrivername( value) ;
  Modified;
end;






procedure Register;
begin

  RegisterPropertyEditor(TypeInfo(string),TVideoCap,'DriverName',TDriverEditor);
end;

end.

+ -

관련 글 리스트
38297 댈파이 소스 인데 c++빌더 소스로점 바꿔 주세요 ㅠ 이성제 1125 2004/12/06
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.