Srodne teme
Kliknite za generisanje liste srodnih tema...
Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

ExtractAssociatedIcon - any other way to do it?

[es] :: Pascal / Delphi / Kylix :: ExtractAssociatedIcon - any other way to do it?

[ Pregleda: 2344 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

anon68680

Član broj: 68680
Poruke: 528
*.info-net.co.yu.



+14 Profil

icon ExtractAssociatedIcon - any other way to do it?07.10.2005. u 13:02 - pre 225 meseci
kako da extractujem icon iz .exe filea a da ne koristim ExtractAssociatedIcon? imam nekih problema sa tom komandom ne izvlaci ikonice kako valja..
btw zna li ko u cemu je problem sa krstaricom? mogu samo preko jave da se konektujem...znam da ovo nema veze sa topicom ali eto svejedno...
 
Odgovor na temu

Srki_82
Srdjan Tot
Me @ My Home
Ljubljana

Član broj: 28226
Poruke: 1403
82.208.201.*

ICQ: 246436949


+10 Profil

icon Re: ExtractAssociatedIcon - any other way to do it?07.10.2005. u 13:28 - pre 225 meseci
Citat:
Delphi help:

The ExtractIconEx function retrieves the handle of an icon from the specified executable file, dynamic-link library (DLL), or icon file.

HICON ExtractIconEx(

LPCSTR lpszFile,
int nIconIndex,
HICON FAR * phiconLarge,
HICON FAR * phiconSmall,
UINT nIcons
);


Parameters

lpszFile

Pointer to a null-terminated string specifying the name of an executable file, DLL, or icon file.

nIconIndex

Specifies the index of the icon to retrieve. If this value is 0, the function returns the handle of the first icon in the specified file. If this value is -1 and phIconLargeand phiconSmall are both NULL, the function returns the total number of icons in the specified file.

phiconLarge

Pointer to an array of handles of large icons returned. This parameter can be NULL.

phiconSmall

Pointer to an array of handles of small icons returned. This parameter can be NULL.

nIcons

Specifies the count of the number of icons to extract.



Return Values

If the function succeeds, the return value is the handle to an icon. If the file specified was not an executable file, DLL, or icon file, the return value is 1. If no icons were found in the file, the return value is NULL.


offtopic:
Krstarica radi ok.
 
Odgovor na temu

anon68680

Član broj: 68680
Poruke: 528
*.info-net.co.yu.



+14 Profil

icon Re: ExtractAssociatedIcon - any other way to do it?07.10.2005. u 14:23 - pre 225 meseci
mislio sam na pricaonicu.. servisi su pukli,opova na main kanalima nema itd...
 
Odgovor na temu

anon68680

Član broj: 68680
Poruke: 528
*.info-net.co.yu.



+14 Profil

icon Re: ExtractAssociatedIcon - any other way to do it?07.10.2005. u 14:49 - pre 225 meseci
anyway opet problem...evo o cemu se radi. pravim neki program za igraonice. i sad radim na nekoj opciji koja izvlaci iz desktopa sve .lnk filove dolazi do njihovih .exe i iz njih izvlaci ikonice. ikonica se cuva u \icons\nazivexefile.exe.ico e sad kad kompajliram program i pokusham da izvucem ikonicu on crashuje i javlja 'icon not valid' a neam blage zasto. evo koda:

Code:

procedure Tform2.geticon(exe: string);
var
hLarge,
hSmall: hIcon;
begin
ExtractIconEx(pChar(exe), -1, hLarge, hSmall, 1); //uzima ikonicu iz exefilea
      icon.Handle:=hsmall; //ucitava iconicu
      icon.SaveToFile(ExtractFilePath(Application.ExeName) + 'icons\' +
      ExtractFileName(exe) + '.ico'); //cuva je u icons\
      icon.ReleaseHandle; //nisam siguran da je ovo uopste potrebno...
      edit7.Text:=ExtractFilePath(Application.ExeName) + 'icons\' + ExtractFileName(exe) + '.ico'; // u edit7 upisuje putanju do ikonice
end;

????
 
Odgovor na temu

[es] :: Pascal / Delphi / Kylix :: ExtractAssociatedIcon - any other way to do it?

[ Pregleda: 2344 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Srodne teme
Kliknite za generisanje liste srodnih tema...
Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.