Link to home
Start Free TrialLog in
Avatar of peterchen092700
peterchen092700

asked on

WTL: Using Splitter Windows

Has anybody a short example on using STL splitter windows? I don't get it working, and don't want to play around forever...

I want to create an SDI application with a vertical splitter, a listview ctrl in both panes.

TIA
Peter
Avatar of jtwine100697
jtwine100697
Flag of United States of America image

> Has anybody a short example on using STL splitter windows?

Are you talking about using "WTL" (Windows Template Library), Atilla (MFC-like framework built with ATL), or straight ATL on your own?  (You say WTL in the subject, but STL in the question text).

In either case, why not use MFC for this, because it already has the support...?

[And be careful of the "size of MFC applications .vs. ATL applications" argument you may encounter: once you get around to writing a full blown ATL application that has similar functionality as an MFC app, the MFC app may be smaller at that point.]

-=- James.
ASKER CERTIFIED SOLUTION
Avatar of jimwasson
jimwasson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you are talking about ATL, there may be some help at: http://www.codeproject.com/atl/atlsplitter.asp

For Attila, I think there is something in the Attila archive, you can get that from: http://www.sellsbrothers.com/attila/

-=- James.
Avatar of BogdyPtr
BogdyPtr

If you want a mfc example of a split view sdi create a new sdi and in step 5 of 6 of app wizard select project style == window explorer and then you have your example.
Avatar of peterchen092700

ASKER

jimwatson: thanks - I got it working!

I had some problems with my implementation (creating the panes in a CSplitterWindow dereived class, the Message Map was missing CHAIN_MSG_MAP, and the OnCreate Handler needs a bHandled=false).


jtwine:
yeeks, WTL, of course (damn new keyboard, or was it a freudian?

>> why not use MFC for this
* A MFC app (statically linked) starts around 360K, an WTL app at 32K. It's just a small tool. And as I'm always impressed with the small-yet-funky Windows apps, size does matter.
* I like WTL
* I don't like MFC
* I want to have fun (well, the geeky kind ;)
* I code ATL (including UI) most of the day. I know I could benefit this could benefit a lotfrom WTL - and I want to use this small project for learning.

Cheers
Peter
Cool.. Glad you got your problem solved.

-=- James.
Peter -- that's great.  Yes, the wizard is a bit remiss.  I had similar problems with an MDI splitter.  Basically the same problem, plus it forgets to derive the view class from CSplitterWindowImpl<> rather than CWindowImpl<>.  Guess the MS folks didn't care much for splitters.