Newbie: pywin problem

M

Martin DeMello

Here's a transcript:

Now how do I get the window to display? I thought the call to
CreateWindow would do it, but the window just gets created silently.

martin
 
N

Neil Hodgson

Martin DeMello:
Now how do I get the window to display? I thought the call to
CreateWindow would do it, but the window just gets created silently.

The template stuff is quite complex and I never understand it apart from
when I've had to work with it recently. And its been a couple of years. By
the end of your code you actually have a zero sized view window which is a
direct child of the application frame rather than being inside an MDI
window. If you open a file it will go into this view which will spread out
over the app and not be properly clipped. I'm not sure what you want to
achieve. If it is just opening another window within the environment from
code, calling something in the template would be better. The "Python
Programming on Win32" book gives an example of adding a new document type
and view to PythonWin. There is a mailing list for Win32 Python issues at
http://mail.python.org/mailman/listinfo/python-win32

Neil
 
T

Tom B.

Martin DeMello said:
Here's a transcript:


Now how do I get the window to display? I thought the call to
CreateWindow would do it, but the window just gets created silently.

martin

I would try wxPython at http://wxpython.org/ they have a wrapper for
scintilla and are it is much more Pythonic.

You probably need to do a

somename = view.CreateWindow(fr)
somename.Show(1)

to get your current app to work, but Win32Ui is kinda funny.

Tom Babbitt
 
M

Martin DeMello

Tom B. said:
I would try wxPython at http://wxpython.org/ they have a wrapper for
scintilla and are it is much more Pythonic.

I know :-/ I got a wxPython example up and running in under half an
hour, but I'm hoping to integrate this with a C++/MFC app and have the
python windows open within the main C++ app (MDI style).
You probably need to do a

somename = view.CreateWindow(fr)
somename.Show(1)

to get your current app to work, but Win32Ui is kinda funny.

Nope, didn't work either, and 'somename' appears to be null

martin
 
M

Martin DeMello

Neil Hodgson said:
over the app and not be properly clipped. I'm not sure what you want to
achieve. If it is just opening another window within the environment from

I have a C++/MFC app with an embedded python interpreter (pyacad to be
precise: http://pyacad.sourceforge.net/), and I'm experimenting to see
if I can open a python window as a child of the intellicad window.
code, calling something in the template would be better. The "Python
Programming on Win32" book gives an example of adding a new document type
and view to PythonWin. There is a mailing list for Win32 Python issues at
http://mail.python.org/mailman/listinfo/python-win32

Thanks, I'll sign up.

martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top