[python-win32] PyCSlider notification messages

Mark Hammond skippy.hammond at gmail.com
Tue Mar 17 04:06:37 CET 2009


On 17/03/2009 12:01 PM, Greg Ewing wrote:
> I'm having trouble getting notification messages from
> a Slider control.
>
> According to MS, a Slider is supposed to send WM_HSCROLL
> messages to its parent window when the user changes it,
> but this isn't happening.

Works for me.  In sliderdemo.py, directly after the creation of the 
control I added:

   self.HookMessage(self.OnSliderMove, win32con.WM_HSCROLL)

and the method:

	def OnSliderMove(self, params):
		print "Slider moved"

and I see the print as I slide the slider.

Cheers,

Mark


More information about the python-win32 mailing list