title: Understanding stack trace for message handling procedure
body: <p>I placed a <code>TApplicationEvents</code> component on my main form and added this event code:</p>
  
  <pre><code>procedure TAniWinMainForm.ApplicationEvents1Message(var Msg: tagMSG;
    var Handled: Boolean);
  begin
      if (ActiveMDIChild is TFormStartDialog) and
         (Msg.Message = WM_KEYDOWN) and (Msg.WParam = VK_F4) then
          Handled := True;
  end;
  </code></pre>
  
  <p>After deploying the application I got reported an <code>EInvalidOp</code> error from an user via the following EurekaLog error report:</p>
  
  <pre><code>Modul Name   : KERNELBASE.dll
  Typ          : EInvalidOp
  
  
  |77A4E60A|ntdll.dll   |           |               |NtCallbackReturn                        |         |
  |74515EAA|win32u.dll  |           |               |NtUserGetPointerInfoList                |         |
  |754595F9|user32.dll  |           |               |GetPointerTouchInfo                     |         |
  |778E3923|msvcrt.dll  |           |               |sqrt                                    |         |
  |778E388D|msvcrt.dll  |           |               |sqrt                                    |         |
  |778E387B|msvcrt.dll  |           |               |_CIsqrt                                 |         |
  |778E3870|msvcrt.dll  |           |               |_CIsqrt                                 |         |
  |75460AC0|user32.dll  |           |               |SendMessageW                            |         |
  |77A235DB|ntdll.dll   |           |               |RtlDeactivateActivationContextUnsafeFast|         |
  |75470090|user32.dll  |           |               |CallWindowProcA                         |         |
  |00CA5549|Program.exe |MAIN.pas   |TMainForm      |ApplicationEvents1Message               |700[1]   |
  |7547BC0B|user32.dll  |           |               |DispatchMessageA                        |         |
  |7547BC00|user32.dll  |           |               |DispatchMessageA                        |         |
  |00D1376A|Program.exe |Program.dpr|               |                                        |1145[477]|
  |772962C2|KERNEL32.DLL|           |               |BaseThreadInitThunk                     |         |
  </code></pre>
  
  <p>I guess the error has nothing to do with my code, but I do not understand what might be going on. 
  Can anyone explain what could lead to this stack trace?
  Shouldn't I see which function is calling CallWindowProcA? </p>