AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Load AVI from resource

Ein Thema von WojTec · begonnen am 23. Aug 2014 · letzter Beitrag vom 23. Aug 2014
Antwort Antwort
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Load AVI from resource

  Alt 23. Aug 2014, 12:28
Delphi-Version: XE4
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;
  Mit Zitat antworten Zitat
Benutzerbild von Sir Rufo
Sir Rufo

Registriert seit: 5. Jan 2005
Ort: Stadthagen
9.454 Beiträge
 
Delphi 10 Seattle Enterprise
 
#2

AW: Load AVI from resource

  Alt 23. Aug 2014, 13:19
Did you have had a look at the docs?

Delphi-Referenz durchsuchenTAnimate.ResName
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ‎ea 0a 4c 14 0d b6 3a a4 c1 c5 b9 dc 90 9d f0 e9 de 13 da 60)
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#3

Re: Load AVI from resource

  Alt 23. Aug 2014, 14:24
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:
if StrToIntDef(ResName, -1) <> -1 then
  Animate.ResId := StrToInt(ResName)
else
   Animate.ResName := ResName
;
This still don't working
  Mit Zitat antworten Zitat
Benutzerbild von Sir Rufo
Sir Rufo

Registriert seit: 5. Jan 2005
Ort: Stadthagen
9.454 Beiträge
 
Delphi 10 Seattle Enterprise
 
#4

AW: Load AVI from resource

  Alt 23. Aug 2014, 14:50
You have to get a ModuleHandle and not a FileHandle.

To do so load the library MSDN-Library durchsuchenLoadLibrary and pass that handle to the component.
TAnimate Sample
(But first you have to set the handle and then the Id or Name)
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ‎ea 0a 4c 14 0d b6 3a a4 c1 c5 b9 dc 90 9d f0 e9 de 13 da 60)

Geändert von Sir Rufo (23. Aug 2014 um 14:53 Uhr)
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#5

Re: Load AVI from resource

  Alt 23. Aug 2014, 15:16
Acha! Library handle, not file handle. This was main reason it want not to work. Thanks
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:54 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz