procedure InvertTracker(hwndDest: HWND);<br>//画边框<br>var<br> hdcDest : HWND;<br> hPen : HWND;<br> hOldPen : HWND;<br> hOldBrush : HWND;<br> cr : HWND;<br> rc : TRect;<br>begin<br> GetWindowRect(hwndDest, rc);<br> hdcDest := GetWindowDC(hwndDest);<br> SetROP2(hdcDest,R2_NOT);<br> cr := clBlack;<br> hPen := CreatePen(PS_INSIDEFRAME,2,cr);<br><br> hOldPen := SelectObject(hdcDest, hPen);<br> hOldBrush := SelectObject(hdcDest, GetStockObject(NULL_BRUSH));<br> Rectangle(hdcDest, 0, 0, rc.Right - rc.Left, rc.Bottom - rc.Top);<br> SelectObject(hdcDest, hOldBrush);<br> SelectObject(hdcDest, hOldPen);<br><br> ReleaseDC(hwndDest, hdcDest);<br> DeleteObject(hPen);<br>end;