lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow wcore to coexist with other windows
[lcore.git]
/
wcore.pas
diff --git
a/wcore.pas
b/wcore.pas
index d15e803d40748b51547b8402b685cee4b891aa4b..928486fe97730f15347263baa3c0592372694108 100755
(executable)
--- a/
wcore.pas
+++ b/
wcore.pas
@@
-272,17
+272,22
@@
function MyWindowProc(
var
\r
MsgRec : TMessage;
\r
a:integer;
\r
var
\r
MsgRec : TMessage;
\r
a:integer;
\r
+ handled:boolean;
\r
begin
\r
Result := 0; // This means we handled the message
\r
\r
begin
\r
Result := 0; // This means we handled the message
\r
\r
+ handled := false;
\r
+
\r
{MsgRec.hwnd := ahWnd;}
\r
MsgRec.wParam := awParam;
\r
MsgRec.lParam := alParam;
\r
\r
{MsgRec.hwnd := ahWnd;}
\r
MsgRec.wParam := awParam;
\r
MsgRec.lParam := alParam;
\r
\r
- dotasks;
\r
- case auMsg of
\r
+ if (ahwnd = hwndwcore) then begin
\r
+ dotasks;
\r
+ case auMsg of
\r
{$ifndef threadtimer}
\r
WM_TIMER: begin
\r
{$ifndef threadtimer}
\r
WM_TIMER: begin
\r
+ handled := true;
\r
if msgrec.wparam = timerid_wcore then begin
\r
a := wcore_timehandler;
\r
killtimer(hwndwcore,timerid_wcore);
\r
if msgrec.wparam = timerid_wcore then begin
\r
a := wcore_timehandler;
\r
killtimer(hwndwcore,timerid_wcore);
\r
@@
-294,14
+299,15
@@
begin
{WINMSG_TASK:dotasks;}
\r
\r
WM_CLOSE: begin
\r
{WINMSG_TASK:dotasks;}
\r
\r
WM_CLOSE: begin
\r
- {}
\r
+ handled := true;
\r
end;
\r
WM_DESTROY: begin
\r
end;
\r
WM_DESTROY: begin
\r
- {}
\r
+ handled := true;
\r
end;
\r
end;
\r
- else
\r
- Result := DefWindowProc(ahWnd, auMsg, awParam, alParam)
\r
+ end;
\r
end;
\r
end;
\r
+
\r
+ if not handled then Result := DefWindowProc(ahWnd, auMsg, awParam, alParam)
\r
end;
\r
\r
\r
end;
\r
\r
\r
@@
-367,7
+373,7
@@
var
Msg : TMsg;
\r
begin
\r
Result := FALSE;
\r
Msg : TMsg;
\r
begin
\r
Result := FALSE;
\r
- if PeekMessage(Msg,
hwndwcore
, 0, 0, PM_REMOVE) then begin
\r
+ if PeekMessage(Msg,
0
, 0, 0, PM_REMOVE) then begin
\r
Result := TRUE;
\r
DispatchMessage(Msg);
\r
end;
\r
Result := TRUE;
\r
DispatchMessage(Msg);
\r
end;
\r