{$ifdef mswindows}\r
windows,messages,wmessages,\r
{$else}\r
{$ifdef mswindows}\r
windows,messages,wmessages,\r
{$else}\r
'', dwstyle, CW_USEDEFAULT, CW_USEDEFAULT,100, 100, hwnd(0), 0, HInstance, nil);\r
//swriteln('about to check result of createwindowex');\r
if hWndMain = hwnd(0) then raise exception.create('CreateWindowEx failed');\r
'', dwstyle, CW_USEDEFAULT, CW_USEDEFAULT,100, 100, hwnd(0), 0, HInstance, nil);\r
//swriteln('about to check result of createwindowex');\r
if hWndMain = hwnd(0) then raise exception.create('CreateWindowEx failed');\r
setwindowlongptr(hwndmain,0,taddrint(self));\r
//swriteln('finished twindowobject.create , hwndmain='+inttohex(taddrint(hwndmain),16));\r
end;\r
setwindowlongptr(hwndmain,0,taddrint(self));\r
//swriteln('finished twindowobject.create , hwndmain='+inttohex(taddrint(hwndmain),16));\r
end;\r
windows.postmessage(hwndmain,msg,wparam,lparam);\r
end;\r
\r
windows.postmessage(hwndmain,msg,wparam,lparam);\r
end;\r
\r
\r
procedure twindowobjectbase.messageloop;\r
var\r
MsgRec : TMsg;\r
begin\r
while GetMessage(MsgRec, hwnd(0), 0, 0) do begin\r
\r
procedure twindowobjectbase.messageloop;\r
var\r
MsgRec : TMsg;\r
begin\r
while GetMessage(MsgRec, hwnd(0), 0, 0) do begin\r
DispatchMessage(MsgRec);\r
if exitloopflag then exit;\r
{if not peekmessage(msgrec,0,0,0,PM_NOREMOVE) then onidle}\r
DispatchMessage(MsgRec);\r
if exitloopflag then exit;\r
{if not peekmessage(msgrec,0,0,0,PM_NOREMOVE) then onidle}\r