[python-win32] python and Windows Resource Files.

Tim Roberts timr at probo.com
Mon Dec 17 18:58:36 CET 2007


Johri, Mayank (GTI) wrote:
> Tim,
>
> I am using the win32rcparser and win32gui to display the dialog on the
> screen. I have used the example win32rcparser.py for this.
>   

Well, win32rcparser.py reads the RC file, but it doesn't display it on
the screen.

What you're doing is working at the lowest possible level.  If you want
to create a Windows GUI using the raw API, then you might as well write
it in C++.  You're just going to battle the Python/C boundary over and
over.  It is possible to call GetDlgItem to fetch window handles for the
controls in your dialog, and then send Windows messages to fetch their
contents, but it's a lot of work for no particularly good reason.

It would be much better in the long term for you to investigate wxPython
or tkinter or one of the other GUI wrappers, to let you create and
manage your GUI with something approaching Python's class philosophy.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list