Solved

CSliderCtrl notification messages.

Posted on 2006-07-13
3
661 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
Comment Utility
Following may be of use for you :
http://www.codeproject.com/miscctrl/CustomDrawCSliderCtrl.asp

-MAHESH
0
 
LVL 22

Expert Comment

by:mahesh1402
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now