access violation in WM_PAINT not caught

前端 未结 6 817
伪装坚强ぢ
伪装坚强ぢ 2020-12-17 01:30

To test this problem I have written a minimal windows application. If I force an access violation in the WM_PAINT handler this exception never gets to the debug

6条回答
  •  自闭症患者
    2020-12-17 01:51

    DispatchMessage seems to now contain a SEH try catch block that inhibits exceptions generated by window procs.

    You can still catch these exceptions in the debugger - depending on your visual studio version you need to open the debug->exceptions dialog and tick the "Break when an exception is thrown" column for all Win32 exceptions, or at least exception 0xc0000005

提交回复
热议问题