Вверх ↑
Ответов: 9906
Рейтинг: 351
#1: 2008-04-17 21:22:07 ЛС | профиль | цитата
Ну так что, прозрачность в PaintBox добавлять будем, или нет
В принципе, можно и такое прилепить...

function THIPaintBox._OnMessage;
var P:TPoint;
begin
Result := false;
case Msg.message of
WM_NCHITTEST:
begin
if not Control.Transparent then exit;
P.x := loword(Msg.lParam); P.y := hiword(Msg.lParam);
if not ScreenToClient(Control.handle, P) then exit;
if (P.x < 0)or(P.x >= bmp.width)or(P.y < 0)or(P.y >= bmp.height) then exit;
if Bmp.Pixels[0,0]<>Bmp.Pixels[P.x,P.y] then exit;
Rslt := HTTRANSPARENT;
Result := True;
Exit;
end;
end;
Result := Inherited _OnMessage(Msg,Rslt);
end;
карма: 9

0