1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| void __fastcall TVCLManipForm::FormPaint(TObject *Sender)
{
TRect WindowRect = this->BoundsRect;
WindowRect = Rect(0, 0, WindowRect.Width(), WindowRect.Height());
HDC DCHandle = GetWindowDC(WindowHandle);
HBRUSH BrushHandle = CreateSolidBrush(clRed);
FrameRect(DCHandle, &WindowRect, BrushHandle);
InflateRect(&WindowRect, -1, -1);
FrameRect(DCHandle, &WindowRect, BrushHandle);
InflateRect(&WindowRect, -1, -1);
FrameRect(DCHandle, &WindowRect, BrushHandle);
DeleteObject(BrushHandle),
ReleaseDC(WindowHandle, DCHandle);
} |
Partager