//we have to get the window procedure while the structurelock\r
//is still held as the window could be destroyed from another thread\r
//otherwise.\r
- if window <> nil then begin
+ if window <> nil then begin\r
windowproc := window.windowproc;\r
- end else begin
- windowproc := nil;
- end;
+ end else begin\r
+ windowproc := nil;\r
+ end;\r
finally\r
structurelock.release;\r
end;\r
\r
function PeekMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): WINBOOL;\r
begin\r
- result := getmessageinternal(lpmsg,hwnd,wmsgfiltermin,wmsgfiltermax,PM_REMOVE,true);\r
+ result := getmessageinternal(lpmsg,hwnd,wmsgfiltermin,wmsgfiltermax,wRemoveMsg,true);\r
end;\r
\r
function SetEvent(hEvent:THevent):WINBOOL;\r