title: Exception in WindowProc
body: <p>Is it possible to catch error inside <code>WindowProc</code> callback? <code>try</code> / <code>catch</code> doesnt work. Looks like <code>__try</code> <code>__except</code> and also hardware exception (<code>AV</code>, for example) doesnt work also.</p>
  
  <hr>
  
  <p><strong>Update:</strong></p>
  
  <p>I figured out that indeed this is possible to throw exception in <code>WindowProc</code> callback and catch it with <code>catch</code> block outside <code>WindowProc</code>. Tested and works on <code>Windows XP x86</code>. I found releated question <a href="https://stackoverflow.com/questions/2631452/64bit-exceptions-in-wndproc-silently-fail">64bit exceptions in WndProc silently fail</a> The problem seems only exist on <code>Windows 7 x64</code> (and according to that question on other x64 Windows versions too).</p>
  
  <p>So the question is it possible somehow to throw exception in <code>WindowProc</code> and catch it with <code>catch</code> block outside <code>WindowProc</code>? I installed microsoft hotfix, set <code>DisableUserModeCallbackFilter</code> to 1 in registry and best I get is <code>FATAL_USER_CALLBACK_EXCEPTION</code>, not my exception.</p>