diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-16 10:24:18 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-16 10:24:18 +0000 |
commit | 1eb2ef96b0f341b5448b48c9eee850325b6dac06 (patch) | |
tree | e4fec02d69e3c5844497b94015a9e2cbf7a22786 /src/corelib/gfx_msgqueue.inc | |
parent | 889ca9eaeef166823fbab9de6bed9a58aa38bd54 (diff) | |
download | fpGUI-1eb2ef96b0f341b5448b48c9eee850325b6dac06.tar.xz |
* Implemented correct MouseEnter and MouseExit detection
under Winodws. Windows doesn't have such OS level events.
* Added some safety net code around fpgSendMessage and
fpgDeliverMessage methods.
Diffstat (limited to 'src/corelib/gfx_msgqueue.inc')
-rw-r--r-- | src/corelib/gfx_msgqueue.inc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/corelib/gfx_msgqueue.inc b/src/corelib/gfx_msgqueue.inc index c60bda2b..e498d7a9 100644 --- a/src/corelib/gfx_msgqueue.inc +++ b/src/corelib/gfx_msgqueue.inc @@ -156,7 +156,12 @@ begin m.Dest := Dest; m.Params := aparams; - m.Dest.Dispatch(m) + try + m.Dest.Dispatch(m) + except + on E: Exception do + {$IFDEF DEBUG}writeln('fpgSendMessage Caught Exception: ' + E.Message){$ENDIF}; + end; end; procedure fpgSendMessage(Sender, Dest: TObject; MsgCode: integer); overload; @@ -170,7 +175,12 @@ begin m.Sender := Sender; m.Dest := Dest; - m.Dest.Dispatch(m) + try + m.Dest.Dispatch(m) + except + on E: Exception do + {$IFDEF DEBUG}writeln('fpgSendMessage Caught Exception: ' + E.Message){$ENDIF}; + end; end; procedure fpgDeliverMessage(var msg: TfpgMessageRec); @@ -178,7 +188,14 @@ begin if msg.MsgCode = FPGM_KILLME then msg.Dest.Free else - msg.Dest.Dispatch(msg); + begin + try + msg.Dest.Dispatch(msg); + except + on E: Exception do + {$IFDEF DEBUG}writeln('fpgDeliverMessage Caught Exception: ' + E.Message){$ENDIF}; + end; + end; end; procedure fpgDeliverMessages; |