GDI+ Inno

-XCX-

Новичок
can anybody tell me how to update (refresh) paint because whenever I try to change arc position until setup is minimized
SendMessage(Wnd,$B000+52, 0, 0); To update it worked but it decrease setup speed

here is my code

function pWFProc(hWindow: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
uIdSubclass: UINT_PTR; RefData: DWORD_PTR): LRESULT;stdcall;
begin
Result := DefSubclassProc(hWindow, Msg, wParam, lParam);
case msg of
WM_SHOWWINDOW:begin
GPPen:=TGPPen.Create(TAlphaColors.Red,8);
WM_ERASEBKGND:
begin
Graphics:=TGPGraphics.Create(wParam);
Graphics.Clear(MakeColor(TAlphacolors.Green,1));
Graphics.Clear(aclTransparent);
Graphics.SetSmoothingMode(SmoothingModeHighQuality);
Graphics.DrawArc(GPPen,100,100,160,160,-90,360) ;
SendMessage(Wnd,$B000+52, 0, 0);
end;
end;
end;
Result := DefSubclassProc(hWindow, Msg, wParam, lParam);
end;

Procedure myfunc(Handle:HWND);stdcall;
begin
SetWindowSubclass(Handle,pWFProc,0,3);
end;
 
Сверху