Python, MFC and the good old Hello World
aleaxit at yahoo.com
Thu Feb 22 10:05:02 CET 2001
"Timo Becker" <Timo.Becker at INOSOFT.de> wrote in message
news:971jbf$mptke$1 at ID-76757.news.dfncis.de...
> Thanks for your help, Mark.
> > I'm afraid I don't have the time to do and test this - but check out
> "pywin\framework\intpyapp.py" - that is
> > where you can find Pythonwin's main frame and app code.
> Radim Polásek just told me that PythonWin comes with a helloapp.py in the
> demos/app directory (I must have been blind :-)) which is almost a one to
> one translation of the code I posted.
Emphasis on the "almost" -- e.g., it does NOT use a frame as
its "frame", which your code did (and so did my translation
thereof) -- it uses a generic window; it ignores the show
parameter with which the program is invoked, forcing instead
the use of SW_SHOWNORMAL (the OS compensates for this specific
application bug in some versions, e.g. on NT4 SP4, but not on
all versions), which your code and my translation thereof did
> > Note that if you dont have significant MFC experience or existing code
> must interface with, wxPython
> > would be a better choice.
> I just started using MFC under C++ and only wanted to find out how much i
> can transfer of that new knowledge to Python. Most time I use Python
> as COM Servers and don't mind about a gui at all.
Unless you *already* have substantial legacy MFC code or knowledge,
I second the suggestion -- go for wxPython instead (or, Tkinter,
or, Dynamic HTML, ...). The MFC architecture, besides not being
portable, is "legacy" even from Microsoft's viewpoint.
More information about the Python-list