Many new features! Have to be used.

This commit is contained in:
meffi@lab313.ru
2014-02-17 23:30:50 +00:00
commit b84a8264a2
22 changed files with 16228 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
unit uEventWaitThread;
interface
uses
Windows, Classes;
type
TEventWaitThread = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
var
CommandEvent: THandle;
implementation
uses
uMain;
{ Important: Methods and properties of objects in VCL can only be used in a
method called using Synchronize, for example,
Synchronize(UpdateCaption);
and UpdateCaption could look like,
procedure TEventWaitThread.UpdateCaption;
begin
Form1.Caption := 'Updated in a thread';
end; }
{ TEventWaitThread }
procedure TEventWaitThread.Execute;
begin
while True do
begin
if WaitForSingleObject(CommandEvent, INFINITE) <> WAIT_OBJECT_0 then
Exit;
PostMessage(frmMain.Handle, WM_COMMANDARRIVED, 0, 0);
end;
end;
end.