(3分问题)CTreeCtrl *treeCtrl;下面该怎么写呢???
sytd 2001-12-28 09:09:52 CTreeCtrl *treeCtrl;下面该怎么写呢???
以前是用以下代码
但我现在想把CTreeCtrl *treeCtrl;放到*.h中,但不知道怎么写了
CTreeCtrl &treeCtrl=GetTreeCtrl();
// TODO: Add your specialized code here and/or call the base class
DWORD dwStyle=::GetWindowLong(treeCtrl.m_hWnd,GWL_STYLE);
dwStyle|=TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT;
::SetWindowLong(treeCtrl.m_hWnd,GWL_STYLE,dwStyle);
tInsert.hParent=TVI_ROOT;//节点是TVI_ROOT父
tInsert.hInsertAfter=TVI_LAST;
tInsert.item.mask=TVIF_TEXT|TVIF_PARAM;
tInsert.item.pszText="父";//节点文字
tInsert.item.lParam=0;