[python-win32] Dereferencing lParam pointer

Ulrich Mierendorff ulrich.mierendorff at gmx.net
Wed Feb 24 22:43:34 CET 2010


Hi,
I am doing some win32 programming with python and want to modify a 
statusbar of a window. In my code I use

win32gui.SetWindowLong(statusbar_window, win32con.GWL_WNDPROC, 
mystatusbarproc)

to set a custom window procedure.

In "def mystatusbarproc(window, message, wParam, lParam)" I wait for the 
commctrl.SB_SETPARTS message: 
http://msdn.microsoft.com/en-us/library/bb760757%28VS.85%29.aspx

The lParam parameter for this message is (according to the 
documentation) a "Pointer to an integer array".
I thought, python would automatically dereference the pointer for me, so 
that I have a list, but
print lParam
returns values like "1236036" (the type is "int").
That looks like a memory address to me, but I am not sure. Is there a 
way to get the array/list?

-Ulrich





More information about the python-win32 mailing list