반응형
//Keyboard Buffer를 Clear한다.
procedure EmptyKeyQueue;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE or PM_NOYIELD) do;
end;
//Mouse Buffer를 Clear한다.
procedure EmptyMouseQueue;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE or PM_NOYIELD) do;
end;
procedure EmptyKeyQueue;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE or PM_NOYIELD) do;
end;
//Mouse Buffer를 Clear한다.
procedure EmptyMouseQueue;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE or PM_NOYIELD) do;
end;
반응형