Вниз
Скачать: CL | DM;

Выцепить Маленькую иконку из файла...   Найти похожие ветки 

← →
alxx ©   (2002-05-20 15:51) [0]

Если я использую GetAssociatedIcon - она мне выдает иконку заданного номера. А как мне вытащить именно маленькую 16х16, которая отображается, например в Explorer"e?


← →
MBo ©   (2002-05-20 15:57) [1]

попробуй
This code extracts small and large icons from application and draws them.
uses ShellAPI;

procedure TForm1.Button1Click(Sender: TObject);
var
LargeIcon: HIcon;
SmallIcon: HIcon;
IconCount: Integer;
I: Integer;
FileName: PChar;
begin
FileName := "C:\Windows\RegEdit.exe";
IconCount := ExtractIconEx(FileName, -1, LargeIcon, SmallIcon, 0);
for I := 0 to Pred(IconCount) do
begin
ExtractIconEx(FileName, I, LargeIcon, SmallIcon, 1);
DrawIcon(Canvas.Handle, 5 + I * 36, 5, LargeIcon);
DrawIconEx(Canvas.Handle, 5 + I * 36, 50, SmallIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, 0, DI_NORMAL);
end;
end;



← →
alxx ©   (2002-05-20 16:05) [2]

Спасибо, сейчас попробую...


← →
alxx ©   (2002-05-20 16:12) [3]

Да! Все круто. А я блин последние пару часов с этим мучался. Оказывается надо смотреть See Also.
Еща раз спасибо.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.008 c
4-97458
poiZon
2002-03-27 15:24
2002.05.30
Hook


1-97248
Programmer1
2002-05-20 15:36
2002.05.30
Смена шрифта


3-97207
Snake
2002-05-06 16:12
2002.05.30
Не работает Locate!


3-97188
MaXie
2002-05-08 12:45
2002.05.30
Вещественный тип имеет привязку к раскладке клавиатуры?


1-97230
Glonia Zbanov
2002-05-20 15:24
2002.05.30
Taskbar




   Наверх