Autor Beitrag
NeMeZ
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25

Win7
Delphi10
BeitragVerfasst: So 22.10.06 13:40 
Wie kann ich .res in EXE einbinden? Ich habe viele Themen darüber gelesen, aber es klapt bei mir nicht.
Kann jemand mir helfen? Hab' ein Beispiel heir...
Einloggen, um Attachments anzusehen!


Zuletzt bearbeitet von NeMeZ am Di 24.10.06 17:52, insgesamt 1-mal bearbeitet
_frank_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 343
Erhaltene Danke: 1

Win XP
Delphi 3 Prof / Turbo Delphi Explorer
BeitragVerfasst: So 22.10.06 23:00 
also der fehler liegt ziemlich sicher in der folgenden Zeile:
ausblenden Delphi-Quelltext
1:
hFind:=FindResource(HInstance, 'test', 'test.wav');					


warum nicht einfach per

ausblenden Delphi-Quelltext
1:
2:
uses mmsystem;
PlaySound(PChar('sou1'), hInstance, snd_ASync or snd_Resource);

?

wenn du unbedingt per FindResource machen willst...der FindResource-Befehlt hat als letzten Parameter eine RT_*-Konstante, habe aber bei mir (D3) keine RT_Sound drinstehen...

weiteres zu Resourcendateien:

rfe.sf.net
www.fw-web.de/downlo...hi/units/resload.zip

Gruß Frank