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
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