Solved

CSliderCtrl notification messages.

Posted on 2006-07-13
3
676 Views
Last Modified: 2013-11-20
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
Comment
Question by:r2far
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 250 total points
ID: 17100927
Following may be of use for you :
http://www.codeproject.com/miscctrl/CustomDrawCSliderCtrl.asp

-MAHESH
0
 
LVL 22

Expert Comment

by:mahesh1402
ID: 17100996
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
 
LVL 4

Author Comment

by:r2far
ID: 17101462
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
lucky13 challenge 11 145
Window placement 17 83
FizzBuzz challenge 9 81
Way to decrease size of apk file 9 69
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question