In the Win32 API, scrollbars have no 'mousemove event'. The only message you get from a vertical scrollbar is WM_VSCROLL
.
If you want your scrollbars to have special behavior, you have to subclass them and override the handling of Mouse Messages. As it says in MSDN (Scroll Bar Controls in Win32):
If, however, you wish to alter the
standard look or function of the
scroll bar, you can either subclass
the scroll bars on your window or
create a stand-alone control.
You can find examples of code which does this by by searching for 'subclass scrollbar'.
Edit
What I'm trying to do is use the edge
of the scrollbar to make my sub window
resizable, is this possible?
The scrollbar is not the way to do it. Instead, define a window, a few pixels wide, just to the right of the scrollbar (and as tall). Set the cursor for that window to be a "resize" cursor (so the user will know to click and drag):
When that window gets a WM_LBUTTONDOWN message, it should start tracking the mouse, resizing and redrawing your control whenever the mouse moves. When the window gets WM_LBUTTONUP, it should stop tracking and leave your control at its new size.
Here's some code that will get you started on the mouse-tracking functions. It's for drawing lines, but the process is similar.