谁能解决这个问题!!!!!

52vc 2009-04-03 02:52:53
objectinspectorV1.51 老妖的网上有下载
http://www.ccrun.com.cn
经过稍微改动后可以成功的安装于c++ builder 2009 上
此控件大部分的功能都正常,但是,不能显示如caption name hint text 等内容,请教各位解决!!
...全文
221 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
52vc 2009-06-09
  • 打赏
  • 举报
回复
不好意思,好久未来了,终于有个满意的答复了
lovetsfuer 2009-05-22
  • 打赏
  • 举报
回复
的确很高
ccrun.com 2009-05-21
  • 打赏
  • 举报
回复
楼主可以结帖了。
songguozhi 2009-05-20
  • 打赏
  • 举报
回复
僵哥
utin431 2009-05-20
  • 打赏
  • 举报
回复
学习中啦。
jone7319 2009-04-22
  • 打赏
  • 举报
回复
僵哥就是僵哥,不过对我来说可能要叫你僵弟了,哈,我40了!
znnztt 2009-04-17
  • 打赏
  • 举报
回复
学习一下!
CACACACACA 2009-04-08
  • 打赏
  • 举报
回复
楼主若满意请结贴
僵哥 2009-04-07
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 Waiting4you 的回复:]
僵哥太强了,多语言通吃啊
[/Quote]
四个字:一无是处
Waiting4you 2009-04-07
  • 打赏
  • 举报
回复
僵哥太强了,多语言通吃啊
周药师 2009-04-05
  • 打赏
  • 举报
回复
友情UP
僵哥 2009-04-05
  • 打赏
  • 举报
回复
Delphi/C++Builder2007,Delphi/C++Builder2009:
复制OIPKG7.dpk,OIPKG7.res一份命名为OIPKG11.dpk,OIPKG11.res/OIPKG12.dpk,OIPKG12.res
修改OIPKG12.dpk的requires,最好使用UltraEditor之类的进行编辑,或者在IDE当中打开编辑:
OIPKG7原内容
package OIPKG7;
...
requires
vcl,
designdgm,
vcljpg,
dbrtl,
bdertl,
vcldb;
...

修改后
package OIPKG12; //这里也可以写OIPKG2009也可以不改,随个人意愿
...
requires
vcl,
designdgm,
vclimg,//vcljpg,//新版的IDE当中已经集成JPG,所以只需要饮食vclimg这个包即可
dbrtl,
bdertl,
vcldb;
...


其它相关Source的修改:

PropList.pas除以上修改项外,还需要修改(不是非常必要,但是不修改会麻烦,所以建议至少修改标红的部分
[Quote]
procedure TProperty.ValuesList(const Values: TStrings);
...
{$IFDEF VER170}
{$DEFINE SYSCOLOR}
{$ENDIF}
{$IFDEF VER180}
{$DEFINE SYSCOLOR}
{$ENDIF}
{$IFDEF VER185}
{$DEFINE SYSCOLOR}
{$ENDIF}

{$IFDEF VER190}
{$DEFINE SYSCOLOR}
{$ENDIF}
{$IFDEF VER200}
{$DEFINE SYSCOLOR}
{$ENDIF}


const
{$IFDEF SYSCOLOR}
SysColor = clSystemColor;
{$ELSE}
SysColor = $80000000;
{$ENDIF}
[/Quote]

OIDsgn.pas单元
[Quote]
unit OIDsgn;

interface
...
{$IFDEF VER170}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER180}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER185}
{$DEFINE NEWDSGNINTF}
{$ENDIF}

{$IFDEF VER190}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER200}
{$DEFINE NEWDSGNINTF}
{$ENDIF}

[/Quote]

MenuEdit.pas单元
[Quote]
unit MenuEdit;

interface
...
implementation

{$R *.DFM}
{$R MENUEDIT.RES}

...
{$IFDEF VER170}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}
{$IFDEF VER180}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}
{$IFDEF VER185}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}
{$IFDEF VER190}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}
{$IFDEF VER200}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}

[/Quote]

InspReg.pas单元
[Quote]
unit InspReg;

interface
...
{$IFDEF VER170}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER180}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER185}
{$DEFINE NEWDSGNINTF}
{$ENDIF}

{$IFDEF VER190}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER200}
{$DEFINE NEWDSGNINTF}
{$ENDIF}

[/Quote]

AppInsp.pas单元
[Quote]
unit AppInsp;

...
{$IFDEF VER170}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}
{$IFDEF VER180}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}
{$IFDEF VER185}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}

{$IFDEF VER190}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}
{$IFDEF VER200}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}


interface
[/Quote]

在Delphi/C++Builder2009当中使用的时候需要注意TTypeKind也不仅只有原来的几项,至少增加了tkUString,否则在某些时候可能会导致一些属性访问不了或者操作不到。
僵哥 2009-04-05
  • 打赏
  • 举报
回复
unit PropList;

{$IFDEF VER100}
{$DEFINE VERSION3}
{$ENDIF}
{$IFDEF VER110}
{$DEFINE VERSION3}
{$ENDIF}
{$IFDEF VER120}
{$DEFINE VERSION4}
{$ENDIF}
{$IFDEF VER125}
{$DEFINE VERSION4}
{$ENDIF}
{$IFDEF VER140}
{$DEFINE VARIANTS}
{$ENDIF}
{$IFDEF VER150}
{$DEFINE VARIANTS}
{$ENDIF}
{$IFDEF VER170}
{$DEFINE VARIANTS}
{$ENDIF}
{$IFDEF VER180}
{$DEFINE VARIANTS}
{$ENDIF}
{$IFDEF VER185}
{$DEFINE VARIANTS}
{$ENDIF}
{$IFDEF VER190}
{$DEFINE VARIANTS}
{$ENDIF}
{$IFDEF VER200}
{$DEFINE VARIANTS}
{$DEFINE PROP_TKUSTRING}
{$ENDIF}

interface
...
function TProperty.GetStringValue: string;
var
i: Integer;
Val: Longint;
{$IFNDEF VERSION3}
Obj: IUnknown;
{$ENDIF}
begin
if Emulated then
if Custom then Result:=FPropData.GetProc(Instance,Self)
else
if Assigned(OwnerProperty) then
case OwnerProperty.TypeKind of
tkVariant: Result:=VariantName(TVarData(OwnerProperty.AsVariant).VType);
tkSet: Result:=GetEnumName(TypeInfo(Boolean),Integer(AsBoolean));
else Result:='';
end
else Result:=''
else
case TypeKind of
tkString,tkLString,tkWString
{$ifdef PROP_TKUSTRING}
,tkUString
{$endif}

: Result:=GetStrProp(Instance,FPropInfo);
tkChar,tkWChar: Result:=AsChar;
tkInteger:
if PropType=TypeInfo(TCursor) then Result:=CursorToString(AsInteger)
else
if PropType=TypeInfo(TColor) then Result:=ColorToString(AsInteger)
else
if PropType=TypeInfo(TShortCut) then
begin
Result:=ShortCutToText(AsInteger);
if Result='' then Result:='(None)';
end
else
if (PropType<>TypeInfo(TFontCharset)) or not CharsetToIdent(AsInteger,Result) then
Result:=IntToStr(AsInteger);
tkVariant:
if VarType(AsVariant)<>varNull then Result:=AsVariant
else Result:='';
tkEnumeration: Result:=Names[AsInteger];
tkSet:
begin
Result:='[';
Val:=AsInteger;
for i:=MinValue to MaxValue do
begin
if Val and 1 <> 0 then Result:=Result+GetEnumName(CompType,i)+',';
Val:=Val shr 1;
end;
if Result[Length(Result)]=',' then Delete(Result,Length(Result),1);
Result:=Result+']';
end;
tkFloat:
if PropType=TypeInfo(TDateTime) then
if AsFloat<>0 then Result:=DateTimeToStr(AsDateTime)
else Result:=''
else
if PropType=TypeInfo(TDate) then
if AsFloat<>0 then Result:=DateToStr(AsDate)
else Result:=''
else
if PropType=TypeInfo(TTime) then
if AsFloat<>0 then Result:=TimeToStr(AsTime)
else Result:=''
else Result:=FloatToStr(AsFloat);
{$IFNDEF VERSION3}
tkInterface:
begin
Result:='';
if Assigned(Root) then
with Root do
for i:=0 to Pred(ComponentCount) do
begin
Obj:=nil;
if (Components[i].GetInterface(GUID,Obj)) and (Obj=AsInterface) then
Result:=Components[i].Name;
end;
end;
{$ENDIF}
tkClass:
if IsType(TypeInfo(TComponent)) then
begin
if Assigned(AsObject) then Result:=TComponent(AsObject).Name
else Result:='';
end
else Result:=IntToStr(Integer(AsObject));
tkMethod:
if Assigned(FRoot) then Result:=FRoot.MethodName(AsMethod.Code)
else Result:='';
else Result:='';
end;
end;

procedure TProperty.SetStringValue(const Value: string);
var
Val,Enum: string;
P,Result,V: Integer;
M: TMethod;
VV: Variant;
{$IFNDEF VERSION3}
Comp: TComponent;
Obj: IUnknown;
{$ENDIF}
begin
try
if Emulated then
begin
if Custom then FPropData.SetProc(Instance,Self,Value)
else
if Assigned(OwnerProperty) then
case OwnerProperty.TypeKind of
tkVariant:
begin
VV:=OwnerProperty.AsVariant;
TVarData(VV).VType:=VariantType(Value);
OwnerProperty.AsVariant:=VV;
end;
tkSet: AsBoolean:=GetEnumValue(TypeInfo(Boolean),Value)<>0;
end;
end
else
case TypeKind of
tkString,tkLString,tkWString
{$ifdef PROP_TKUSTRING}
,tkUString
{$endif}

: SetStrProp(Instance,FPropInfo,Value);
tkChar,tkWChar:
if Length(Value)>0 then AsChar:=Value[1]
else AsChar:=#0;
tkInteger:
if PropType=TypeInfo(TCursor) then AsInteger:=StringToCursor(Value)
else
if PropType=TypeInfo(TColor) then AsInteger:=StringToColor(Value)
else
if PropType=TypeInfo(TShortCut) then AsInteger:=TextToShortCut(Value)
else
if (PropType=TypeInfo(TFontCharset)) and IdentToCharset(Value,Result) then
AsInteger:=Result
else AsInteger:=StrToInt(Value);
tkVariant: AsVariant:=Value;
tkEnumeration:
begin
V:=Values[Value];
if (V>=MinValue) and (V<=MaxValue) then AsInteger:=V
else raise Exception.Create('');
end;
tkSet:
if Length(Value)>2 then
begin
Val:=Value;
if Val[1]='[' then Delete(Val,1,1);
if Val[Length(Val)]=']' then Delete(Val,Length(Val),1);
Result:=0;
repeat
P:=Pos(',',Val);
if (P=0) and (Val<>'') then Enum:=Val
else Enum:=Copy(Val,1,Pred(P));
Delete(Val,1,P);
V:=GetEnumValue(CompType,Enum);
if V=0 then V:=1
else V:=V shl 1;
Result:=Result or V;
until P=0;
AsInteger:=Result;
end;
tkFloat:
if PropType=TypeInfo(TDateTime) then AsDateTime:=StrToDateTime(Value)
else
if PropType=TypeInfo(TDate) then AsDate:=StrToDate(Value)
else
if PropType=TypeInfo(TTime) then AsTime:=StrToTime(Value)
else AsFloat:=StrToFloat(Value);
tkClass:
if not IsType(TypeInfo(TMenuItem)) then
if IsType(TypeInfo(TComponent)) then
begin
if Assigned(FRoot) then
AsObject:=FRoot.FindComponent(Value);
end
else AsObject:=TObject(StrToInt(Value));
{$IFNDEF VERSION3}
tkInterface:
if Assigned(FRoot) then
begin
Comp:=FRoot.FindComponent(Value);
if Assigned(Comp) then
begin
Obj:=nil;
if Comp.GetInterface(GUID,Obj) then AsInterface:=Obj;
end;
end;
{$ENDIF}
tkMethod:
if Assigned(FRoot) then
begin
M.Code:=FRoot.MethodAddress(Value);
M.Data:=FRoot;
AsMethod:=M;
end;
end;
except
raise EPropertyException.Create(strPropListInvalidValue);
end;
end;
...
end.
surge0321 2009-04-05
  • 打赏
  • 举报
回复
控件是不是有问题
僵哥 2009-04-05
  • 打赏
  • 举报
回复
http://www.ccrun.com.cn or http://www.ccrun.com?

麻烦以后不要写这种标题。
xjq2003 2009-04-03
  • 打赏
  • 举报
回复
共同学习,共同进步
hemiya 2009-04-03
  • 打赏
  • 举报
回复
妖哥网站的控件,有不少在2009中编译不过去,及时有2009版的控件用cb编译有的也有不少的编译警告。
fairchild811 2009-04-03
  • 打赏
  • 举报
回复
没用过,友情up
ccrun.com 2009-04-03
  • 打赏
  • 举报
回复
晕,怎么有两个相同的回复。
ccrun.com 2009-04-03
  • 打赏
  • 举报
回复
先挂个号,预计此帖要打水漂。

604

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder VCL组件使用和开发
社区管理员
  • VCL组件使用和开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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