How do I do it by hand?
To make the actual divider widget you need to make a custom control, which in Win32 world basically means creating a custom child window. Look at my post in this thread:
http://www.gamedev.net/topic/564692-creating-a-child-window/
However, in your case you need to implement more functionality in the window procedure. You need to paint the splitter in WM_PAINT and so forth. Generally if you've never done this before google "custom Win32 child window" and see what you find.