Are you sure the frame is triggering OnFileNew? If so, set a breakpoint in the function, then track it to where it was called. If necessary, redefine the function that calls it, and do the same except creating a new document. That should do it.
source
share