how can i create Multi-Column Tree View controls ?
is it too hard ?
Posted on 2004-07-23 08:11:40 by Criminal2
Well, I worked out a few of the kinks from the superclassing and it is working much smoother now. First I made the Draw function self contained so at the top of the WndProc you have simply to call it and check the return, it does everything else. Second, I eliminated the need for any variables to be declared, class and window memory now hold everything including the oldprocs. Lastly I moved the header control to the main window so that the top item is displayed properly and added a TVM_SETHDRFONT message to set the font for the header control. The header is positioned properly once it's font is set, you do not need to do this explicitly if you are using the DEFGUIFONT. Finally I fixed up some minor bugs. All in all it's just about slick enough to use right now, but there are probably more bugs to work out, it is very difficult if not impossible to resize the control for the moment, I am still working that out.
Posted on 2004-07-26 11:24:55 by donkey
i'm very impressed from your technique.

where can i find more information about Ownerdraw subclassed controls ?
Posted on 2004-07-26 15:45:39 by Criminal2
Hi Criminal2,

I think,though I am not sure, that there is an example in Iczelion's tutorials of superclassing. Super classing a control is a bit different that subclassing as it allows you more flexibility in the creation stage of the window, for example you have access to WM_CREATE and WM_NCCREATE. It is a very powerful technique if used properly, however like subclassing it can be overused.This particular control should really be a custom control because the Treeview lacks the ability to properly react to the WS_CLIPCHILDREN style and therefore the header obscures the first item, making it necessary to move it out of the treeview. For owner drawn controls there are several examples on this board.
Posted on 2004-07-26 20:11:00 by donkey
Well, last installment on this one I think. I haven't fully tested it because I had hoped for at least a couple of bug reports. The parts that I did test seem to work OK. I thought that it would be a good idea to add an analogue to the grid lines in a listview so I added the message TVM_SETEXTENDEDLISTVIEWSTYLE, currently it has only one available style TVS_EX_GRIDLINES, but I did it this way to allow it to be expandable and intuitively follow the listview messages.
Posted on 2004-07-28 05:48:10 by donkey
wow it's looks very cool,
congratulations donkey.
Posted on 2004-07-28 07:13:28 by Criminal2