Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Owner draw CTreeCtrl

Owner draw CTreeCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tran Hoang Chuong
    wrote on last edited by
    #1

    Hi all, I'd like to disable the scrollbars of a CTreeCtrl object, and I thought I must use a class derived from CTreeCtrl. But I can't do. Can you help me? Thanks in advance Ngo Khai Hoa

    V S 2 Replies Last reply
    0
    • T Tran Hoang Chuong

      Hi all, I'd like to disable the scrollbars of a CTreeCtrl object, and I thought I must use a class derived from CTreeCtrl. But I can't do. Can you help me? Thanks in advance Ngo Khai Hoa

      V Offline
      V Offline
      VitSoft
      wrote on last edited by
      #2

      Hi !!! CtreeCtrl derived from CWnd. CWnd has Class Members functions for using scroll I think if you write CMyTree.GetScrollBarCtrl(...); you got all what you want. Best regards VitSoft

      1 Reply Last reply
      0
      • T Tran Hoang Chuong

        Hi all, I'd like to disable the scrollbars of a CTreeCtrl object, and I thought I must use a class derived from CTreeCtrl. But I can't do. Can you help me? Thanks in advance Ngo Khai Hoa

        S Offline
        S Offline
        SudhaShriram
        wrote on last edited by
        #3

        You need not derive any class from CTreeCtrl. You just have to set the style TVS_NOSCROLL using ModifyStyle function of the CWnd Class ( CTreeview is derived from CWnd hence inherits that function). Later you will not have the both vertical and horizontal scroll bar for the tree control. Example CTreeCtrl *x = (CTreeCtrl *)GetDlgItem(IDC_TREE1); x->ModifyStyle(0,TVS_NOSCROLL); HTH. Sundaravalli Shriram Tektronix Engineering Development India Ltd, Bangalore - 560001, India.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups