No.
But while you're peeking at the message queue you might as well do something useful with it:
procedure BusyBusyBusy;
begin
// Allow threads to synchronize
CheckSynchronize;
Msg.message := 0;
try
// Process cursor update messages for this window so cursor stays responsive
while (PeekMessage(Msg, Handle, WM_SETCURSOR, WM_SETCURSOR, PM_REMOVE)) do
begin
if (Msg.message = WM_QUIT) then
exit;
DispatchMessage(Msg);
end;
// Process paint messages for all windows so UI can repaint itself
while PeekMessage(Msg, 0, WM_PAINT, WM_PAINT, PM_REMOVE) or
PeekMessage(Msg, 0, WM_ERASEBKGND, WM_ERASEBKGND, PM_REMOVE) or
PeekMessage(Msg, 0, DXM_SKINS_POSTREDRAW, DXM_SKINS_POSTREDRAW, PM_REMOVE) or
PeekMessage(Msg, 0, WM_PRINT, WM_PRINT, PM_REMOVE) or
PeekMessage(Msg, 0, WM_PRINTCLIENT, WM_PRINTCLIENT, PM_REMOVE) do
begin
if (Msg.message = WM_QUIT) then
exit;
DispatchMessage(Msg);
end;
PeekMessage(Msg, 0, WM_NULL, WM_NULL, PM_NOREMOVE); // Avoid window ghosting due to unresponsiveness on Vista+
finally
if (Msg.message = WM_QUIT) then
begin
PostQuitMessage(Msg.wParam);
Application.Terminate;
end;
end;
end;
The above was snipped from existing code so might need to be tweaked slightly.