CodePudding user response:
Involves the VCL update, should use thread that the SynchronizeCodePudding user response:
No code of textual fault description is meaningless,CodePudding user response:
Is Canvase.Roughly as follows:
Void StartGifPlay (HDC HDC, WORD x, WORD y, STR TMemoryStream * and bool bStream)//play GIF animation
{
Cs. Hdc=Hdc;////Hdc to form a frmShow - & gt; Img - & gt; Canvas - & gt; Handle;
ShowImg BeginThread (0, 0, (TThreadFunc), (LPVOID) (& amp; Cs), 0, 0);//open the new process to play the GIF
}
Long __fastcall ShowImg (LPVOID pParam)
{
Cs * PCS=* (Cs) pParam;
HDC dc PCS - & gt; Hdc.
MovetoEx (dc, 0, 0);
Lineto (dc, 100100); <===this two drawing code is invalid, interface effect see
return 0;
}
=========
If the drawing code are placed outside the thread is no problem,