Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Implement CreateAnonymousThread with BCC32.

Author: h.mohri

C++Builder 10.2 BCC32 can not write lambda. 
So write an implementation in Invoke() with TCppInterfacedObject<>.

[crayon-674020551f950298921221/]

Event prepared for calling with TThread::Synchronize().

[crayon-674020551f958846394048/]

Call TThread::CreateAnonymousThread() with a TButton event.

Place the TButton and TActivityIndicator

[crayon-674020551f95a955433286/]

Build execution.

When you click the Button1, until the thread is finished "ActivityIndicator1->Animate = true";

 

Exit mobile version