Greg Ewing wrote:
> Roger Upole wrote:
>
>> You instantiate the MFC view object without a document, but in order
>> to actually create a window and do anything useful with it, it needs
>> a valid document.
>
> Are you absolutely sure about that?
>
> At the MFC level, I can't see anything to stop you from
> instantiating a CView and calling its Create method without
> ever mentioning a CDocument.
>
> The RichEditView kludge ends up creating a PyDocument object
> wrapping a null pointer, and MFC seemed to be happy with
> whatever pywin32 build 212 and earlier did with that.
>
Not exactly happy, no. In debug mode it triggers any number of
asserts. In a release build without the asserts, it becomes possible
to trigger crashes by calling any methods on the view that need
access to the associated document.
Roger
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32