![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Иконка дочернего mdi окна [D7, WinXP]
Квэнди © (2006-06-15 15:13:00)Здравствуйте. Подскажите пожалуйста каким образом можно извлечь иконку дочернего mdi окна ?
Игорь Шевченко (2006-06-15 15:17:00) [1]
var
Icon: TIcon;
IconHandle: THandle;
begin
.....
IconHandle := GetClassLong(AWindowHandle, GCL_HICONSM);
if IconHandle = 0 then
IconHandle := GetClassLong(AWindowHandle, GCL_HICON);
if IconHandle = 0 then
IconHandle := SendMessage(AWindowHandle, WM_GETICON, ICON_SMALL, 0);
if IconHandle = 0 then
Iconhandle := SendMessage(AWindowHandle, WM_GETICON, ICON_BIG, 0);
if IconHandle = 0 then
IconHandle := Application.Icon.Handle;
if IconHandle <> 0 then begin
Icon := TIcon.Create;
Icon.Handle := IconHandle;
try
DrawIconEx(AButton.Glyph.Canvas.Handle, 0, 0, Icon.Handle,
AButton.Glyph.Width, AButton.Glyph.Height, 0, 0, DI_NORMAL);
finally
Icon.ReleaseHandle;
Icon.Free;
end;
end;
...
end;