Autor Beitrag
Biarchiv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 688



BeitragVerfasst: Do 26.02.09 12:33 
Hallo,

wie kann ich per LoadFromResource die kompletten Icons in einen Stream kopieren?

Die-Iconresource sollte immer die erste sein, nur hat die keinen Namen.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 26.02.09 12:41 
Sollte da nicht der Typ Icon und der Name MAINICON sein?

// EDIT:
Jedenfalls sollten dir die API-Ressourcenroutinen helfen:
msdn.microsoft.com/e...ibrary/ms648037.aspx
Und die anderen ressourcenbezogenen Routinen, die da aufgeführt sind.

// EDIT2:
Ach ja, vielleicht hilft dir ja auch der Quelltext dieses Ressourceneditors:
www.wilsonc.demon.co...10resourceeditor.htm
Da siehst du wie diese Routinen verwendet werden.
Biarchiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 688



BeitragVerfasst: Sa 28.02.09 13:06 
Hallo,

Danke mal.

Ich verstehte folgende Hilfe nicht richtig:
Zitat:
1. load embedded.exe into memory getting its hInstance;
2. enumerate all(!) RT_ICON resources and RT_GROUP_ICON 'MAINICON';
3. copy every icon from 2nd step into loader.exe with
WriteFromStreamToResource() using appropriate resource type (see below).