Using win32gui.SendMessage and SysListView32 control

jUrner at arcor.de jUrner at arcor.de
Sun Dec 3 16:44:56 EST 2006


geskerrett at hotmail.com schrieb:

> Hope someone can steer me in the right direction.
>
> I am trying to use python to collect the values from a Win32
> application's control.
> I can successfull query an retreive the values ListBox, Edit and
> Buttons, however, the application uses a control called a
> 'SysListView32' Control.  MSDN says that this descends from CListView
> control and the msdn website reference for this control is;
> http://msdn2.microsoft.com/en-gb/library/ms670560.aspx
> (scroll to the message constants)
>
> This page seems to imply that the control can be queried with messages,
> however, my problem seems to be that pywin32.win32con does not define a
> constant for the LVM series of messages.
>
>

All the relevant message ids are in comCtl.h a 340k file. This might
explain why
win32con does only cover some ids. Best is to download and install the
platform sdk,
wich you may get for free from Microsoft. It comes shipped along with
all the headers
and the complete documentation for all the apis windows offers the
dedicated programmer.

http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en


And ...just a hint, check the ctypes module, wich will give you full
access to all the
apis windows has to offer and lets you translate C code almost 1:1 to
python. 

Regards Jürgen




More information about the Python-list mailing list