zapazap@yahoo.com (zapazap) writes:
[color=blue]
> -- Pythonic control of Windows GUI application: tabs and listviews
>
> Dear Snake-charming Gurus,
>
> I have learned to manipulate some controls ("Button", "ComboBox", etc)
> through such means as:
>
> win32gui.SendMessage(hwnd, win32con.BM_GETCHECK, 0 ,0)
> win32gui.SendMessage(hwnd, win32con.CB_GETCOUNT, 0 ,0)
>
> provided by Python Win32 Extensions, and understand that such
> constants as:
>
> win32con.BM_GETCHECK
> win32con.CB_GETCOUNT
>
> corresponding to distinct messages (documented at [1] and [2]) that
> can be sent to such 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.[/color]
These constants are defined in the 'commctrl' module:
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> import commctrl
>>> commctrl[/color][/color][/color]
<module 'commctrl' from 'C:\Python23\lib\site-packages\win32\lib\commctrl.pyc'>[color=blue][color=green][color=darkred]
>>> commctrl.LVM_GETITEMCOUNT[/color][/color][/color]
4100[color=blue][color=green][color=darkred]
>>> commctrl.TCM_GETITEMCOUNT[/color][/color][/color]
4868
Thomas