![]() |
Delphi-Version: XE4
Load AVI from resource
Just lame question, how to load AVI from resource of another file to TAnimate component? I have this and don't working:
Delphi-Quellcode:
:?:
var
Handle: THandle; begin Handle := CreateFile('C:\Windows\System32\shell32.dll', GENERIC_READ, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); Animate1.ResHandle := Handle; Animate1.ResName := '165'; end; |
AW: Load AVI from resource
|
Re: Load AVI from resource
Yes, this is resource name, aren't they? I checked that in this DLL sample AVI is identified by 165, and I don't know if it's numeric name or real integer :?
Delphi-Quellcode:
This still don't working :(
if StrToIntDef(ResName, -1) <> -1 then
Animate.ResId := StrToInt(ResName) else Animate.ResName := ResName ; |
AW: Load AVI from resource
You have to get a ModuleHandle and not a FileHandle.
To do so load the library ![]() ![]() (But first you have to set the handle and then the Id or Name) |
Re: Load AVI from resource
Acha! Library handle, not file handle. This was main reason it want not to work. Thanks :-D
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:13 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz