CTreeCtrl move + button to the right

Discussion in 'C++' started by hans_fakie@yahoo.com, May 13, 2006.

  1. Guest

    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
    , May 13, 2006
    #1
    1. Advertising

  2. Jonathan Mcdougall, May 13, 2006
    #2
    1. Advertising

  3. Guest

    hi Jonathan,

    thx for the tipp.
    cu fakie
    , May 13, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John E.
    Replies:
    3
    Views:
    4,440
    masoud bayan
    Mar 25, 2005
  2. Fredrik Lundh
    Replies:
    0
    Views:
    377
    Fredrik Lundh
    Jul 6, 2006
  3. Steve Holden
    Replies:
    0
    Views:
    374
    Steve Holden
    Jul 14, 2006
  4. Eduardo78
    Replies:
    0
    Views:
    240
    Eduardo78
    Nov 3, 2005
  5. Andrew Tomazos
    Replies:
    2
    Views:
    591
    Nobody
    Dec 12, 2011
Loading...

Share This Page