• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 722
  • Last Modified:

CSliderCtrl notification messages.

So I have a custom CSliderCtrl in which I do all the drawing for it.  The problem is that my custom drawn thumb is slightly bigger then the standard thumb so when you move the thumb it leaves graphics artifacts since the entire thumb area is not getting invalidated.

I need to get a message (within the CSliderCtrl itself and not its parent) everytime the thumb moves so I can invalidate the appropriate areas.  I have tried OnChildNotify() and ON_WM_VSCROLL_REFLECT(), neither seems to get regular messages as the thumb moves.  I have even tried catching WM_VSCROLL and WM_HSCROLL in PreTranslateMessage.  Obviously I am not aware of what messages are truly sent by a CSliderCtrl.

So how can I have the CSliderCtrl know when it's thumb has moved?
0
r2far
Asked:
r2far
  • 2
1 Solution
 
mahesh1402Commented:
Following may be of use for you :
http://www.codeproject.com/miscctrl/CustomDrawCSliderCtrl.asp

-MAHESH
0
 
mahesh1402Commented:
Essentially, the parent window is sent WM_HSCROLL messages with relevant notifications including TB_THUMBTRACK.
You tried to handle WM_HSCROLL for parent window ?

-MAHESH
0
 
r2farAuthor Commented:
Well I had completely overriden painting with OnPaint().  But I suppose I will use custom draw for the sake of getting that 'core functionality'.

Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now