X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/968c333d05db5d5ecf3599f8e304c67e64f21159..ffb12fba43635d1d31d7dd073cd4d1ea7d8f4ebd:/unitwindowobject.pas?ds=inline diff --git a/unitwindowobject.pas b/unitwindowobject.pas index 1c0d32d..414f975 100644 --- a/unitwindowobject.pas +++ b/unitwindowobject.pas @@ -118,7 +118,7 @@ begin '', dwstyle, CW_USEDEFAULT, CW_USEDEFAULT,100, 100, hwnd(0), 0, HInstance, nil); //swriteln('about to check result of createwindowex'); if hWndMain = hwnd(0) then raise exception.create('CreateWindowEx failed'); - //swriteln('about to store reference to self in extra windo memory'); + //swriteln('about to store reference to self in extra window memory'); setwindowlongptr(hwndmain,0,taddrint(self)); //swriteln('finished twindowobject.create , hwndmain='+inttohex(taddrint(hwndmain),16)); end; @@ -141,6 +141,7 @@ begin windows.postmessage(hwndmain,msg,wparam,lparam); end; +{$ifdef mswindows} function twindowobjectbase.ProcessMessage : Boolean; var MsgRec : TMsg; @@ -157,13 +158,16 @@ procedure twindowobjectbase.processmessages; begin while processmessage do; end; +{$endif} procedure twindowobjectbase.messageloop; var MsgRec : TMsg; begin while GetMessage(MsgRec, hwnd(0), 0, 0) do begin + {$ifdef mswindows} TranslateMessage(MsgRec); + {$endif} DispatchMessage(MsgRec); if exitloopflag then exit; {if not peekmessage(msgrec,0,0,0,PM_NOREMOVE) then onidle}