当我调用完EnumChildWindows后,当前程序给Form里的任何控件赋值操作都会产生错误 why? ( 积分: 100 )

  • 主题发起人 主题发起人 willyxia
  • 开始时间 开始时间
W

willyxia

Unregistered / Unconfirmed
GUEST, unregistred user!
例如:

Procedure TForm1.Button1Click(Sender: TObject);
function EnumChildWindowsProc(h: Integer): Boolean; stdcall;
begin
...
end;
begin
h := findWindow('TFormTest',nil);
EnumChildWindows(h,@EnumChildWindowsProc,Integer(@h));
//showImage在Form1上,下面一句就会报错
ShowImage.Picture.BitMap.LoadFromFile('c:/333.bmp');
end;
 
例如:

Procedure TForm1.Button1Click(Sender: TObject);
function EnumChildWindowsProc(h: Integer): Boolean; stdcall;
begin
...
end;
begin
h := findWindow('TFormTest',nil);
EnumChildWindows(h,@EnumChildWindowsProc,Integer(@h));
//showImage在Form1上,下面一句就会报错
ShowImage.Picture.BitMap.LoadFromFile('c:/333.bmp');
end;
 
已经解决
 
???那你的分怎麼辦?
不要怪我,我剛剛才看到的。
 
多人接受答案了。
 
后退
顶部