[python-win32] PyCScrollView with no PyCDocument?

2009-03-09 Thread Greg Ewing
Is there any way of creating a ScrollView without needing a Document? I just want a scrollable user-drawable area, but CreateView insists that I supply a Document. What's more, the only way to create a Document seems to be to use a DocTemplate, and the only way to get one of those is to use a

Re: [python-win32] PyCScrollView with no PyCDocument?

2009-03-09 Thread Mark Hammond
On 9/03/2009 9:49 PM, Greg Ewing wrote: Is there any way of creating a ScrollView without needing a Document? One of the problems with win32ui and the entire MFC world is that you have 3 layers; pywin32 on top of MFC, which is on top of the core win32 ui API (and now appears to be kinda via

Re: [python-win32] PyCScrollView with no PyCDocument?

2009-03-09 Thread Greg Ewing
Mark Hammond wrote: No not only can I no longer answer your question, I'm quite confident I never could :( Alternatively, is there a way of getting a valid DocTemplate without having to put a resource in the executable? Some kind of in-memory resource creation or something? -- Greg

Re: [python-win32] PyCScrollView with no PyCDocument?

2009-03-09 Thread Greg Ewing
Well, I think I've found a workaround. The following hack seems to create something looking enough like a PyCDocument to keep it happy while creating a PyCView: dummy = win32ui.CreateRichEditView().GetDocument() The result of this appears to be a PyCDocument that's wrapping a null pointer.