2025-11-27 16:46:48 +09:00

65 lines
3.8 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\froman Times New Roman;}{\f3\froman Times New Roman;}}
{\colortbl\red0\green0\blue0;\red0\green0\blue128;\red128\green0\blue128;}
\deflang1033\pard\plain\f2\fs36\cf2\b Extended Tree Control class
\par
\par \plain\f2\fs28\cf1 COXTreeCtrl
\par \plain\f2\fs20
\par \plain\f2\fs24\b Description:
\par \plain\f2\fs20
\par This class is a extension of a tree control
\par It has the following features:
\par \pard\li360\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f2\fs20 {\pntext\f1\'b7\tab}multicolumn support
\par {\pntext\f1\'b7\tab}multiple selections
\par {\pntext\f1\'b7\tab}entry row selection mode
\par {\pntext\f1\'b7\tab}bitmap support for each column
\par {\pntext\f1\'b7\tab}editable subitems
\par {\pntext\f1\'b7\tab}hide/unhide items
\par {\pntext\f1\'b7\tab}disable items
\par {\pntext\f1\'b7\tab}veritcal and horizontal grid lines
\par {\pntext\f1\'b7\tab}set font for individual item/subitem
\par {\pntext\f1\'b7\tab}set color for individual item/subitem
\par {\pntext\f1\'b7\tab}additional edit modes like for any item/subitem:
\par \pard\plain\f2\fs20 \tab = dropdown combobox
\par \tab = date picker (see COXCalendar control)
\par
\par
\par
\par COXTreeCtrl is derived from CListCtrl not from CTreeCtrl. That means that if you want to use dialog editor to create resource for your CDialog or CFormView derived class you have to use CListCtrl with "Report" and "OwnerDraw Fixed" style set. It also means that CListCtrl emulates CTreeCtrl functionality although not to full extent (see function reference for details). COXTreeCtrl lets you operate with standard structures and types that have to do with CTreeCtrl, but you still can use CListCtrl stuff to work with control (it could be useful feature if you really need to do some fancy stuff with COXTreeCtrl).
\par
\par Taking into account all mentioned above, this is not a big surprise that you have to use special technique to utilize COXTreeCtrl control. And all in all you possibly cannot do that just changing the name of class from CTreeCtrl to COXTreeCtrl. Below you will find description of common steps that you have to take to implement COXTreeCtrl in your application :
\par
\par
\par \pard\qc\plain\f2\fs20\b COXTreeCtrl with Dialog Resource
\par \pard\plain\f2\fs20
\par If you want to use it in a dialog or FormView and you are using dialog resource, then the best way is to create a list control , set up "Report" style and "OwnerDraw Fixed" style in resource editor and map it to COXTreeCtrl member variable (using subclassing or ClassWizard and DDX/DDV technique)
\par
\par
\par \pard\qc\plain\f2\fs20\b Initializing and populating of COXTreeCtrl
\par \pard\plain\f2\fs20 \tab
\par As soon as control is created you can populate it with columns, items and set different styles to make it look the way you want. You can insert and delete columns, items and subitems at any time after control's creation.
\par
\par
\par \pard\qc\plain\f2\fs20\b COXTreeCtrl styles
\par \pard\plain\f2\fs20
\par You can set different style to COXTreeCtrl control to get the functionality you need. This control supports next standard styles:
\par TVS_SHOWSELALWAYS
\par TVS_EDITLABELS
\par TVS_SHOWSELALWAYS
\par TVS_EDITLABELS
\par
\par Also we introduce extended styles:
\par
\par TVOXS_MULTISEL\tab multiple selection
\par TVOXS_COLUMNHDR\tab column header
\par TVOXS_ROWSEL\tab row selection mode
\par TVOXS_HGRID\tab \tab horizontal grid
\par TVOXS_VGRID\tab \tab vertical grid
\par TVOXS_FLGRID\tab \tab full length grid lines
\par TVOXS_PICKANYWHERE\tab select tree control item clicking anywhere within grid of control
\par
\par Of course, all styles can be modified at run-time
\par
\par
\par
\par }