Icon extrahieren und abspeichern

Hallo,
das Coding um Icons aus einer DLL und/oder EXE-Datei zu extrahieren, nämlich auf eine PictureBox, habe ich.

Was mir leider fällt ist das Abspeichern als „echtes“ Icon. Mit der VB-Funktion „SavePicture()“, kann man es zwar als .ico abspeichern, es handelt sich hierbei aber nicht um ein „echtes“ Icon sondern eigentlich um ein Bitmap! Das weiterbearbeiten in einem Icon-Editor ist daher auf Anhieb nicht möglich.

Wer weiss wie man’s als ICON abspeichert?!?!

sanx from michL

hallo,

stimmt es gibt auch mit API keine Möglichkeit reine ICON zu speichern.

aber es gibt doch eine möglichkeit, kannst du c++ lesen ?

ICONS.C
/****************************************************************************\ * * FILE: ICONS.C * * PURPOSE: IconPro Project Icon handing Code C file * * COMMENTS: This file contains the icon handling code * * FUNCTIONS: * EXPORTS: * ReadIconFromICOFile - Reads Icon from ICO file * WriteIconToICOFile - Writes Icon to ICO file * MakeIconFromResource - Makes HICON from a resource * ReadIconFromEXEFile - Reads Icon from a EXE or DLL file * IconImageToClipBoard - Puts icon image on clipboard * IconImageFromClipBoard - Gets icon image from clipboard * CreateBlankNewFormatIcon - Makes a new, blank icon image * DrawXORMask - Draws XOR mask using DIBs * DrawANDMask - Draws AND mask using DIBs * GetXORImageRect - Calculates XOR image position * MakeNewANDMaskBasedOnPoint - Calculates new AND mask * ConvertBMPFileToIcon - Converts BMP to Icon * IconImageToBMPFile - Writes an icon image to BMP file * LOCALS: * ReadICOHeader - Reads ICO file header * AdjustIconImagePointers - Adjusts internal pointers * ExtractDlgProc - Dlg Proc for extract dialog * MyEnumProcedure - For EnumResourceNames() * GetIconFromInstance - Extracts Icon from Instance * ChooseIconFromEXEFile - Gets a user’s choice icon from file * WriteICOHeader - Writes ICO file header * CalculateImageOffset - Calcs offset in file of image * DIBToIconImage - Converts DIB to icon image * * Copyright 1995 - 1998 Microsoft Corp. * * * History: * July '95 - Created * ****************************************************************************/

die icon datei wird geschrieben header + 2 bitmap (farb+sw), so ist auch ein icon aufgebaut. willst du den c-coad haben ? man lernt ja nie aus.

volker

[Bei dieser Antwort wurde das Vollzitat nachträglich automatisiert entfernt]

Hallo Volker,
danke für das Angebot … aber C ist bei mir schon etwas länger her und der Aufwand momentan für mich zu gross ein sicherlich kompliziertes C-Coding in VB umzusetzen.

Ich glaube, beim Visual Studio C++ ist ein kleiner Icon-Editor im Source-Code dabei … sollte ich es mir doch anders überlegen!

sanx from michL