请教,为什么TAnimate不能打开有的AVI文件?

learnman 2002-09-29 01:01:52
我在WIN98用Tanimate控件打不开有的AVI文件(--A文件),出现“can not open avi”,比较DELPHI自带的COOL.AVI、SPEEDIS.AVI(--B文件),发现是A和B格式不同
我又在WINXP下比较一下,A文件是16位,MS-CRAM算法压缩;B文件是8位(未压缩)或24位(IR32压缩),
查找DELPHI的源码后
因为TANIMATE的源码有一段:
procedure TAnimate.CreateParams(var Params: TCreateParams);
const
CenterStyles: array[Boolean] of DWORD = (0, ACS_CENTER);
TimerStyles: array[Boolean] of DWORD = (0, ACS_TIMER);
TransparentStyles: array[Boolean] of DWORD = (0, ACS_TRANSPARENT);
begin
InitCommonControl(ICC_ANIMATE_CLASS);
inherited CreateParams(Params);
{ In versions of COMCTL32.DLL earlier than 4.71 the ANIMATE common control
requires that it be created in the same instance address space as the AVI
resource. }
if GetComCtlVersion < ComCtlVersionIE4 then
Params.WindowClass.hInstance := GetActualResHandle;
CreateSubClass(Params, ANIMATE_CLASS);
with Params do
begin
Style := Style or CenterStyles[FCenter] or TimerStyles[FTimers] or
TransparentStyles[FTransparent];
WindowClass.style := WindowClass.style and not (CS_HREDRAW or CS_VREDRAW);
{ Make sure window class is unique per instance if running a version of
COMCTl32.DLL which doesn't support loading an AVI resource from a separate
address space. }
if GetComCtlVersion < ComCtlVersionIE4 then
StrFmt(WinClassName, '%s.%.8X:%.8X', [ClassName, HInstance, GetCurrentThreadID]);
end;
end;

中间的注释是BORLAND的

万望指教,DELPHI的Tanimate控件如何打开类似的AVI文件,其机制如何??
...全文
75 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

5,388

社区成员

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

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