PythonWin gurus - PyCDC.DrawText() help - bad doc?

Conrad cwren1 at cfl!
Fri Oct 24 17:54:38 CEST 2003


I have some simple printing I need to do from Python
on Windows, so I opted for the excellent PyCDC methods.

I got stumped when I realized that I actually needed
something other than left-justified printing for this
project. PyCDC.DrawText appears to offer what I need,
but the doc at:



s,rc,forat = DrawText()

Formats text in the given rectangle

Return Value
Height of text in pixels


This looks more than a little odd to me.
For one, the text specifies what is probably
a return type of int (height in pixels),
but the template (s,rc,forat = DrawText())
shows a totally different type of return.
Additionally, DrawText apparently takes no
aguments. Very odd.

I would have expected something more like
the DrawFrameControl doc, which looks like


DrawFrameControl(rect, typ, state)

Draws a frame control of the specified type and style.


rect : (left, top, right, bottom)

    Specifies the bounding rectangle, in logical units.

typ : int

state : int

    MFC References



Does anyone out there have an example of
using DrawText to right or center justify
text? And who do I contact regarding the
suspect doc?

Many thanks,


More information about the Python-list mailing list