📄 subject_55982.htm
字号:
<p>
序号:55982 发表者:翟兆睿 发表日期:2003-10-14 14:25:59
<br>主题:CTreeView
<br>内容:我要向我的一个CTreeView中添加一些根节点、子节点,该怎么做
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:翟兆睿 回复日期:2003-10-14 15:32:16
<br>内容:大家帮忙看看阿
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:luo 回复日期:2003-10-14 15:40:53
<br>内容: m_ImageList.Create(16, 16, 0, 12, 12); <BR> <BR> hIcon[0] = AfxGetApp()->LoadIcon(IDI_BLUE);<BR> hIcon[1] = AfxGetApp()->LoadIcon(IDI_CYAN);<BR> hIcon[2] = AfxGetApp()->LoadIcon(IDI_GREEN);<BR> hIcon[3] = AfxGetApp()->LoadIcon(IDI_PURPLE);<BR> hIcon[4] = AfxGetApp()->LoadIcon(IDI_CANCEL);<BR> hIcon[5] = AfxGetApp()->LoadIcon(IDI_YELLOW);<BR> hIcon[6] = AfxGetApp()->LoadIcon(IDI_RED);<BR> hIcon[7] = AfxGetApp()->LoadIcon(IDI_TRADE);<BR> hIcon[8] = AfxGetApp()->LoadIcon(IDI_CANCEL);<BR> hIcon[9] = AfxGetApp()->LoadIcon(IDI_BUY);<BR> hIcon[10] = AfxGetApp()->LoadIcon(IDI_SELL);<BR> hIcon[11] = AfxGetApp()->LoadIcon(IDI_BLACK);<BR> for (n = 0; n < 12; n++) {<BR> m_ImageList.Add(hIcon[n]);<BR> }<BR> m_Tree.SetImageList(&m_ImageList, TVSIL_NORMAL);<BR> TV_INSERTSTRUCT tvinsert;<BR> tvinsert.hParent = NULL;<BR> tvinsert.hInsertAfter = TVI_LAST;<BR> tvinsert.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE |<BR> TVIF_TEXT;<BR> tvinsert.item.hItem = NULL; <BR> tvinsert.item.state = 0;<BR> tvinsert.item.stateMask = 1;<BR> tvinsert.item.cchTextMax = 6;<BR> tvinsert.item.iSelectedImage = 11;<BR> tvinsert.item.cChildren = 0;<BR> tvinsert.item.lParam = 0;<BR> // top level<BR> tvinsert.item.pszText = "委托";<BR> tvinsert.item.iImage = 2;<BR> m_hOrder = m_Tree.InsertItem(&tvinsert);<BR> tvinsert.item.iImage = 3;<BR> tvinsert.item.pszText = "成交";<BR> m_hTrade = m_Tree.InsertItem(&tvinsert);<BR> tvinsert.item.iImage = 4;<BR> tvinsert.item.pszText = "撤单";<BR> m_hQuash = m_Tree.InsertItem( &tvinsert );<BR> tvinsert.item.iImage = 5;<BR> tvinsert.item.pszText = "买盘";<BR> m_hBuy = m_Tree.InsertItem( &tvinsert );<BR> tvinsert.item.iImage = 0;<BR><BR> tvinsert.item.pszText = "卖盘";<BR> m_hSell = m_Tree.InsertItem( &tvinsert );<BR><BR> tvinsert.item.pszText = "持仓";<BR> tvinsert.item.iImage = 1;<BR> m_hHold = m_Tree.InsertItem( &tvinsert );<BR><BR> tvinsert.item.pszText = "平仓";<BR> tvinsert.item.iImage = 6;<BR> m_hLevel = m_Tree.InsertItem( &tvinsert );<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:翟兆睿 回复日期:2003-10-14 15:47:09
<br>内容:有没有较完整的例子呢?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:luo 回复日期:2003-10-14 16:17:08
<br>内容:例子来自于VC6.0技术内幕
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -