小弟刚学delphi,从http://www.pudn.com/downloads37/sourcecode/windows/database/detail124076.html下来一题库与试卷系统研究学习,但BYSJ.dpr编译到ZJID:=GetMidStr(SDZJ_CT.Selected.Text,'',' '); 就停止了,出现如下提示:
[错误] Main_Form.pas(731): Undeclared identifier: 'GetMidStr'
[错误] Main_Form.pas(780): Incompatible types: 'Integer' and 'TTreeNode'
[错误] Main_Form.pas(1413): Undeclared identifier: 'Wait'
[错误] Main_Form.pas(1548): Undeclared identifier: 'Wait'
[错误] Main_Form.pas(3036): Undeclared identifier: 'wait'
[错误] Main_Form.pas(3378): Undeclared identifier: 'Wait'
[致命错误] BYSJ.dpr(16): Could not compile used unit 'Main_Form.pas'貌似与下面有关:
在设计时因TTreeView里有一个StateIndex和StateImages,而纵观TTreeView的代码可以知道它只是发布了一下TCustomTreeView定义并实现好的属性和方法而已。因此我们也选择TCustomTreeView为TCheckTree控件的祖先类。
重要的实现技术为:
procedure TCheckTree.WMPaint( var Msg: TWMPaint );
var
I: Integer;
begin
for I := 0 to Items.Count - 1 do
begin
if not(Items[ I ].StateIndex in [Ord(csUnknown)..Ord(csPartiallyChecked)]) then
Items[ I ].StateIndex := Ord(csUnchecked) //这里我修改了
end;
inherited;
end;
function TCheckTree.GetItemState( Node:TTreeNode ): TCheckCheckState;
begin
Result := TCheckCheckState( Node.StateIndex );
end;
procedure TCheckTree.SetItemState( Node:TTreeNode; Value: TCheckCheckState );
begin
if TCheckCheckState( Node.StateIndex ) <> Value then
ChangeNodeCheckState( Node, Value );
end;
procedure TCheckTree.StateChange( Node: TTreeNode; NewState: TCheckCheckState );
begin
if Assigned( FOnStateChange ) then
FOnStateChange( Self, Node, NewState );
end;反复演当,就是通不过,都快崩溃了,请大侠指点迷津!在下成分感谢!
[错误] Main_Form.pas(731): Undeclared identifier: 'GetMidStr'
[错误] Main_Form.pas(780): Incompatible types: 'Integer' and 'TTreeNode'
[错误] Main_Form.pas(1413): Undeclared identifier: 'Wait'
[错误] Main_Form.pas(1548): Undeclared identifier: 'Wait'
[错误] Main_Form.pas(3036): Undeclared identifier: 'wait'
[错误] Main_Form.pas(3378): Undeclared identifier: 'Wait'
[致命错误] BYSJ.dpr(16): Could not compile used unit 'Main_Form.pas'貌似与下面有关:
在设计时因TTreeView里有一个StateIndex和StateImages,而纵观TTreeView的代码可以知道它只是发布了一下TCustomTreeView定义并实现好的属性和方法而已。因此我们也选择TCustomTreeView为TCheckTree控件的祖先类。
重要的实现技术为:
procedure TCheckTree.WMPaint( var Msg: TWMPaint );
var
I: Integer;
begin
for I := 0 to Items.Count - 1 do
begin
if not(Items[ I ].StateIndex in [Ord(csUnknown)..Ord(csPartiallyChecked)]) then
Items[ I ].StateIndex := Ord(csUnchecked) //这里我修改了
end;
inherited;
end;
function TCheckTree.GetItemState( Node:TTreeNode ): TCheckCheckState;
begin
Result := TCheckCheckState( Node.StateIndex );
end;
procedure TCheckTree.SetItemState( Node:TTreeNode; Value: TCheckCheckState );
begin
if TCheckCheckState( Node.StateIndex ) <> Value then
ChangeNodeCheckState( Node, Value );
end;
procedure TCheckTree.StateChange( Node: TTreeNode; NewState: TCheckCheckState );
begin
if Assigned( FOnStateChange ) then
FOnStateChange( Self, Node, NewState );
end;反复演当,就是通不过,都快崩溃了,请大侠指点迷津!在下成分感谢!
解决方案 »
- PlaySound问题,谢谢帮忙
- 怎样实现计算机的锁屏?要求能屏蔽ctr+alt+del,帮顶给分!
- 讨论:Delphi2006中内存管理器的问题
- 关于使用idtcpclient和idtcpserver的一点疑问
- 如何汉化cxgrid5,谢谢各位大侠
- 请问:WIN98下DELPHI6.0可以装SQL SERVER2000吗?
- ****怎样取出stringgrid中某个单元格的颜色??********
- 我的程序在家里都在正常编译,运行,但到了公司就不行,还出错?
- 为什么可以(一个很菜的问题)
- IdFTP.List经常死掉
- delphi开发地理信息系统请教
- 当系统建立vpn连接后,请问怎么样指定某一个应该程序通过vpn线路连接,而其它的程序还是通过原来的线程连接
加个uses GetMidStr函数所在的页面就可以了
还有wait没有定义 自己去找找在哪