X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/d8999eeb3210dd13358a5c76fcc9722df1ef8d2e..9eaeac69829469108bce954ccce0710bbdb27fb3:/wcore.pas?ds=inline diff --git a/wcore.pas b/wcore.pas index 1c063ad..e79fc10 100755 --- a/wcore.pas +++ b/wcore.pas @@ -58,6 +58,7 @@ procedure addtask(ahandler:ttaskevent;aobj:tobject;awparam,alparam:longint); procedure disconnecttasks(aobj:tobject); procedure exitmessageloop; procedure processmessages; +procedure wcoreinit; var onshutdown:procedure(s:ansistring); @@ -312,11 +313,8 @@ var lpszMenuName : nil; lpszClassName : 'wcoreClass'); -procedure messageloop; -var - MsgRec : TMsg; +procedure wcoreinit; begin - if Windows.RegisterClass(MyWindowClass) = 0 then halt; //writeln('about to create wcore handle, hinstance=',hinstance); hwndwcore := CreateWindowEx(WS_EX_TOOLWINDOW, @@ -339,6 +337,14 @@ begin {$endif} +end; + +procedure messageloop; +var + MsgRec : TMsg; + +begin + while GetMessage(MsgRec, 0, 0, 0) do begin TranslateMessage(MsgRec); DispatchMessage(MsgRec);