-- Pythonic control of Windows GUI application: tabs and list views

Tim Golden tim.golden at viacom-outdoor.co.uk
Mon Jan 26 04:15:19 EST 2004


>-----Original Message-----
>From: zapazap at yahoo.com [mailto:zapazap at yahoo.com]

[.. snip explanation of sending messages to Windows controls ..]

>For the "List-View" and "Tab" controls then, I expected to find the
>constants
>
>    win32con.LVM_GETCHECK       
>    win32con.TCM_GETITEMCOUNT   
>
>corresponding to the distinct messages documented at [3] and [4]. 
>Unfortunately the module win32com module does not have any LVM_* or
>TCM_* attributes, and I have not found reference to such constants in
>the Extensions documentation.

To answer this question most directly, the TCM_GETITEMCOUNT etc. 
message constants will ultimately just be numeric values. If 
win32con doesn't have them (and it doesn't have everything) 
then just Google around to find out where they're defined. 
If you already have a recent win32 sdk knocking around, 
you'll find them in one of the header files (*.h).

As a hint from someone who's had to do this quite a lot,
Googling for (eg) const TCM_GETITEMCOUNT is likely to
get you something useful, as both Delphi & VB have
a lot of adherents on the web, and someone in those
communities is bound to have done the same kind of
thing that you're trying. In this case, the first hit
is:

http://www.vbaccelerator.com/home/VB/Utilities/ActiveX_Documenter/ActiveX_Do
cumenter_Source_zip_cTabCtrl_ctl.asp

which seems to have some useful constants.

As an aside, have you look at this and related posts by
Simon Brunning? I honestly don't know if it's directly
of use, but it may throw up some clues.

http://www.brunningonline.net/simon/blog/archives/000664.html

TJG



________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________




More information about the Python-list mailing list