The whole day I've been trying to create a horizontal splitter control, but I fail constantly. First I tried to create my own, but I quickly realized I'm too stupid to achieve it. Then I started looking for code to steal here at the board. After some research I reached Earnies site wich have a couple of splitter tutorials. The only problem with them is that the splitter control is located in a dll. I tried to extract the vital parts of the source files, but now I have failed with that too. Everything just crashes :(

Does anyone have any example sources for a simple horizontal splitter control? If so, please post the code here and you'll make my day!
Posted on 2003-09-16 09:17:40 by Delight
Delight,

It looks harder than it actually is... I've been there before too :)

If I remember correctly there are a couple Splitters around (most of them vertical tho) Check out the Masm\Examples SubFolders for a Treeview by Ewayne,,, He used a nice approach with a Dialog... I was stunned the first time I saw that as I never even thought about something like that... Then there is a Splitter written by KetilO in RadAsm's Project folder somewhere which uses the more standard approach... (explained below)



Anyway, the basic outline is:

Register a class called DelightsSplitter where you set up all the needed parts like Horizonatl cursors and such
Create A Window using that class
Intercept the WM_MOUSEDOWN and WM_MOUSEUP by setting SetCapture
Check the WM_MOUSEMOVE for CaptureFlag and Move the SplitterWindow according to lParamLO and lParamHI
Once the WM_MOUSEUP is received move all Windows

As easy as pie :) Don't give up.
Posted on 2003-09-16 09:37:42 by JimmyClif
Hi, Delight.

Here is some small example. (I was post this somewhere before, but I am too lazy to search it, so I will re-attach the file here :) )
It is full solution, horizontal and vertical splitter. You can rewrite some parts to reach your goals.

Regards.
Posted on 2003-09-16 09:39:33 by JohnFound
Thanks guys. I took a break and now i'm fit for fight again :)
Posted on 2003-09-16 12:59:01 by Delight