access violation in WM_PAINT not caught

前端 未结 6 824
伪装坚强ぢ
伪装坚强ぢ 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 02:07

    Starting from XP, the Vector Exception Handling functionality can be used. It has priority over all other kinds of exceptions. In my example, it correctly caught the Access Violation in the WM_PAINT message. Unfortunately, it also catches all other kinds of exceptions, which I should probably solve by checking for the exception code.

提交回复
热议问题