CTreeCtrl move + button to the right

H

hans_fakie

Hello everybody,

I created a CTreeCtrl and I'd like to move the expand button to the
right.

here's my code
CTreeCtrl tree;
tree->Create(WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP |
TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT |
TVS_SINGLEEXPAND | TVS_SHOWSELALWAYS |
TVS_TRACKSELECT,
CRect(10, 10, 200, 240), this, 0x1221);

HTREEITEM hTree, hText;

hTree = tree->InsertItem("Root", TVI_ROOT);

hCompany = tree->InsertItem("Item 1", hTree);
tree->InsertItem("SubItem 1", hText);
tree->InsertItem("SubItem 2", hText);
tree->InsertItem("SubItem 3", hText);

but with this code the expand button appears at the right. Is it
possible to move the expand button to the right that it looks like
this:

Root - Normally it looks like this: - Root
Item 1 + + Item 1

I have no idea how to move the +/- expand button to the right, so that
it appears at the right of the text and not at the left of the text.

Thanks in Advance

cu fakie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top