B
biku
Unregistered / Unconfirmed
GUEST, unregistred user!
这是一个可以设置窗体边框颜色的函数,大家能帮忙设计一个可以删除该窗体边框颜色的函数吗?
function HighlightWindow(pl_hwnd: Hwnd;cor:tColor):bool;
var
ll_hDC : HDC;
lu_RECT : TRECT;
begin
GetWindowRect(pl_hWnd,lu_RECT);
ll_hDC := GetWindowDC(pl_hWnd);
ll_Pen := CreatePen(ps_solid, 2, cor);
SelectObject(ll_hDC, ll_Pen); //设置新笔
SelectObject(ll_hDC, GetStockObject(HOLLOW_BRUSH));
Rectangle(ll_hDC, 0, 0, lu_RECT.Right - lu_RECT.Left, lu_RECT.Bottom - lu_RECT.Top);
DeleteObject(ll_Pen);
ReleaseDC(pl_hWnd, ll_hDC);
result:=true;
end;
function HighlightWindow(pl_hwnd: Hwnd;cor:tColor):bool;
var
ll_hDC : HDC;
lu_RECT : TRECT;
begin
GetWindowRect(pl_hWnd,lu_RECT);
ll_hDC := GetWindowDC(pl_hWnd);
ll_Pen := CreatePen(ps_solid, 2, cor);
SelectObject(ll_hDC, ll_Pen); //设置新笔
SelectObject(ll_hDC, GetStockObject(HOLLOW_BRUSH));
Rectangle(ll_hDC, 0, 0, lu_RECT.Right - lu_RECT.Left, lu_RECT.Bottom - lu_RECT.Top);
DeleteObject(ll_Pen);
ReleaseDC(pl_hWnd, ll_hDC);
result:=true;
end;