Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.11.27;
Скачать: CL | DM;

Вниз

из hicon в hbitmap   Найти похожие ветки 

 
stainer   (2003-10-05 01:45) [0]

Привет знатоки!

Не могу найти api функцию которая делает из hicon в hbitmap!

Спасибо


 
andre ©   (2003-10-05 02:35) [1]

По-моему такой функции нет, я делал так:
var
BM : BitMap;
ii : TIconInfo;
srcDC, destDC : HDC;
_BitMap : HBitMap;

begin
PictureBM := LoadImage (0, openfile, Image_Icon, 0, 0, LR_LOADFROMFILE or LR_CREATEDIBSECTION);
if PictureBM <> 0 then
begin
GetIconInfo (PictureBM, ii);

PicWidth := ii.xHotspot * 2;
PicHeight := ii.yHotspot * 2;
srcDC := CreateCompatibleDC (0);
destDC := CreateCompatibleDC (0);

_BitMap := SelectObject (destDC, ii.hbmColor);
_BitMap := SelectObject (srcDC, ii.hbmMask);

BitBlt (destDC, 0, 0, PicWidth, PicHeight, srcDC, 0, 0, SRCPAINT);
PictureBM := SelectObject (destDC, _BitMap);

DeleteDC (srcDC);
DeleteDC (destDC);

DeleteObject (_BitMap);
end



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

Текущий архив: 2003.11.27;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.022 c
6-90021
Vadim S
2003-09-30 15:12
2003.11.27
TServerSocker не обновляется


4-90172
AGGRESSOR
2003-10-02 12:13
2003.11.27
Undeclared identifier: AbnormalTermination


7-90147
Dark Elf
2003-09-18 11:52
2003.11.27
Коды I/O Errors


3-89705
ruslan_as
2003-11-10 11:39
2003.11.27
Decode в InterBase


1-89989
di2
2003-11-17 14:30
2003.11.27
как запаретить повторное открытие MDIChild-формы?