618 lines
14 KiB
C++
618 lines
14 KiB
C++
#include "StdAfx.h"
|
|
#include "CTKViewDlg.h"
|
|
|
|
#define IDC_INPLACE_PRVCTRL 10003
|
|
|
|
#ifndef WM_SHOWFOLDER
|
|
#define WM_SHOWFOLDER (WM_USER+101)
|
|
#endif
|
|
|
|
|
|
IMPLEMENT_DYNAMIC(CTKViewDlg, CDialog)
|
|
|
|
CTKViewDlg::CTKViewDlg(CWnd *pParent /*= NULL*/)
|
|
: CDialog(CTKViewDlg::IDD, pParent)
|
|
{
|
|
m_hSelectItem = NULL;
|
|
m_nType = 0;
|
|
|
|
m_sDefFolder = _T("阀门");
|
|
m_sDefFolderDwg = _T("平面阀门.dwg");
|
|
|
|
m_sDirPath = _T("");
|
|
m_sPathName = _T("");
|
|
m_sCurParentText = _T("");
|
|
m_sCurSltText = _T("");
|
|
m_strSubPath = _T("");
|
|
m_sDwgPath = _T("");
|
|
m_sRcdName = _T("");
|
|
}
|
|
|
|
CTKViewDlg::~CTKViewDlg()
|
|
{
|
|
}
|
|
|
|
void CTKViewDlg::DoDataExchange(CDataExchange *pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
DDX_Control(pDX, IDC_TREE1, m_tree);
|
|
DDX_Control(pDX, IDC_LIST1, m_list);
|
|
}
|
|
|
|
BEGIN_MESSAGE_MAP(CTKViewDlg, CDialog)
|
|
ON_BN_CLICKED(IDOK, &CTKViewDlg::OnBnClickedOk)
|
|
ON_NOTIFY(TVN_SELCHANGING, IDC_TREE1, &CTKViewDlg::OnTvnSelchangingTree1)
|
|
ON_NOTIFY(NM_CLICK, IDC_LIST1, &CTKViewDlg::OnNMClickList1)
|
|
ON_MESSAGE(WM_SHOWFOLDER, &CTKViewDlg::OnShowFOlder)
|
|
END_MESSAGE_MAP()
|
|
|
|
BOOL CTKViewDlg::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
HBITMAP hBit = ::LoadBitmap(_hdllInstance, MAKEINTRESOURCE(IDB_FILETYPE16));
|
|
if (hBit != NULL)
|
|
m_FileTypeBMP.Attach(hBit);
|
|
|
|
m_TreeImage.Create(16, 16, ILC_MASK, 15, 0);
|
|
m_TreeImage.Add(&m_FileTypeBMP, RGB(255, 255, 255));
|
|
|
|
m_tree.SetImageList(&m_TreeImage, TVSIL_NORMAL);
|
|
m_tree.SetIndent(18);
|
|
m_tree.SetItemHeight(18);
|
|
|
|
if (!m_previewCtrl.SubclassDlgItem(IDC_STATIC_PREVIEW, this))
|
|
return FALSE;
|
|
|
|
m_sPathName = GetRootDir() + _T("\\");
|
|
m_sDirPath = m_sPathName;
|
|
|
|
CString sDirPath;
|
|
HTREEITEM hItem;// hItemChild;
|
|
sDirPath = m_sPathName + _T("\\tk\\Customer\\图库中心\\图块库");
|
|
|
|
HTREEITEM hParentItem;
|
|
hParentItem = hItem = m_tree.InsertItem(_T("图块库"), 0, 1);
|
|
ViewIni(hParentItem, sDirPath);
|
|
|
|
sDirPath = m_sPathName + _T("\\tk\\Customer\\图库中心\\用户图库");
|
|
|
|
SetSltDwgFile(m_sDefFolder, m_sDefFolderDwg);
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void CTKViewDlg::SetDefaultFolderShow(LPCTSTR pszFolder, LPCTSTR pszFolderdwg)
|
|
{
|
|
m_sDefFolder = pszFolder;
|
|
m_sDefFolderDwg = pszFolderdwg;
|
|
}
|
|
|
|
void GetSubDir(CString sDirPath, CStringArray &sSubPathArr)
|
|
{
|
|
CFileFind find;
|
|
BOOL bFind = FALSE;
|
|
CString strPathFiles;
|
|
strPathFiles = sDirPath;
|
|
if (strPathFiles.Right(1) != _T("\\"))
|
|
strPathFiles += "\\";
|
|
strPathFiles += _T("*.*");
|
|
|
|
bFind = find.FindFile(strPathFiles);
|
|
while (bFind)
|
|
{
|
|
bFind = find.FindNextFile();
|
|
|
|
if (find.IsDirectory() && !find.IsDots())
|
|
{
|
|
CString sFileName = find.GetFileName();
|
|
sSubPathArr.Add(sFileName);
|
|
}
|
|
}
|
|
}
|
|
|
|
void GetFileNameByDir(CString sDirPath, CString sExt, CStringArray &sFileNameArray)
|
|
{
|
|
sExt.MakeLower();
|
|
CFileFind find;
|
|
BOOL bFind = FALSE;
|
|
CString strPathFiles;
|
|
strPathFiles = sDirPath;
|
|
if (strPathFiles.Right(1) != _T("\\"))
|
|
strPathFiles += _T("\\");
|
|
strPathFiles += _T("*.*");
|
|
|
|
bFind = find.FindFile(strPathFiles);
|
|
while (bFind)
|
|
{
|
|
bFind = find.FindNextFile();
|
|
|
|
CString sFileName = find.GetFileName();
|
|
CString sExtUp = sExt;
|
|
CString sExtLow = sExt;
|
|
sExtUp.MakeUpper();
|
|
sExtLow.MakeLower();
|
|
if (sFileName.Find(sExtUp, 0) >= 0 || sFileName.Find(sExtLow, 0) >= 0)
|
|
{
|
|
sFileName.TrimRight(sExtUp);
|
|
sFileName.TrimRight(sExtLow);
|
|
sFileNameArray.Add(sFileName);
|
|
}
|
|
}
|
|
}
|
|
|
|
void CTKViewDlg::ViewIni(HTREEITEM hParent, CString sIniName)
|
|
{
|
|
CStringArray sSubDir;
|
|
GetSubDir(sIniName, sSubDir);
|
|
int nLen = 0;
|
|
for (nLen = 0; nLen < sSubDir.GetSize(); nLen++)
|
|
{
|
|
if (!m_sDefFolder.IsEmpty() )
|
|
{
|
|
if (sSubDir.GetAt(nLen).CompareNoCase(m_sDefFolder) == 0)
|
|
{
|
|
HTREEITEM hParentNew;
|
|
hParentNew = m_tree.InsertItem(sSubDir.GetAt(nLen), 0, 1, hParent);
|
|
ViewIni(hParentNew, sIniName + _T("\\") + sSubDir.GetAt(nLen));
|
|
}
|
|
}
|
|
else
|
|
{
|
|
HTREEITEM hParentNew;
|
|
hParentNew = m_tree.InsertItem(sSubDir.GetAt(nLen), 0, 1, hParent);
|
|
ViewIni(hParentNew, sIniName + _T("\\") + sSubDir.GetAt(nLen));
|
|
}
|
|
}
|
|
|
|
CStringArray sFileNameArr;
|
|
GetFileNameByDir(sIniName, _T(".dwg"), sFileNameArr);
|
|
for (nLen = 0; nLen < sFileNameArr.GetSize(); nLen++)
|
|
{
|
|
CString strFileName = sFileNameArr[nLen];
|
|
strFileName.TrimLeft();
|
|
strFileName.TrimRight();
|
|
if (strFileName.IsEmpty())
|
|
continue;
|
|
m_tree.InsertItem(sFileNameArr.GetAt(nLen), 3, 4, hParent);
|
|
}
|
|
}
|
|
|
|
void CTKViewDlg::OnBnClickedOk()
|
|
{
|
|
|
|
CDialog::OnOK();
|
|
}
|
|
|
|
CString CTKViewDlg::GetArxDir()
|
|
{
|
|
TCHAR szPath[MAX_PATH];
|
|
::GetModuleFileName(_hdllInstance, szPath, MAX_PATH);
|
|
CString sPath(szPath);
|
|
sPath = sPath.Left(sPath.ReverseFind(_T('\\')));
|
|
return sPath;
|
|
}
|
|
|
|
CString CTKViewDlg::GetRootDir()
|
|
{
|
|
CString arx = GetArxDir();
|
|
CString root = arx.Left(arx.ReverseFind(_T('\\')));
|
|
return root;
|
|
}
|
|
|
|
void CTKViewDlg::GetPathName(CString &sSoftPath)
|
|
{
|
|
sSoftPath = GetRootDir() + _T("\\");
|
|
}
|
|
|
|
void CTKViewDlg::OnTvnSelchangingTree1(NMHDR *pNMHDR, LRESULT *pResult)
|
|
{
|
|
NM_TREEVIEW *pNMTreeView = (NM_TREEVIEW *)pNMHDR;
|
|
HTREEITEM hItem = pNMTreeView->itemNew.hItem;
|
|
if (!hItem)
|
|
return;
|
|
m_hSelectItem = hItem;
|
|
CString strPathName;
|
|
CStringArray sRcdName;
|
|
CString sDwgPath;
|
|
CString sText;
|
|
CString sParentText;
|
|
GetPathName(strPathName);
|
|
|
|
//modify by hrp;
|
|
CString sSubPath;
|
|
HTREEITEM hParentItem = m_tree.GetParentItem(hItem);
|
|
HTREEITEM hChildItem = m_tree.GetChildItem(hItem);
|
|
m_sCurParentText = sParentText = m_tree.GetItemText(hParentItem);
|
|
m_sCurSltText = sText = m_tree.GetItemText(hItem);
|
|
|
|
if (hChildItem != NULL) //点击的是文件甲
|
|
{
|
|
CString sPath;
|
|
while (hItem != NULL)
|
|
{
|
|
sPath = m_tree.GetItemText(hItem);
|
|
m_sDirPath += sPath + _T("\\");
|
|
hItem = m_tree.GetParentItem(hItem);
|
|
}
|
|
m_nType = -1;
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
if (hParentItem == NULL)
|
|
return;
|
|
while (hItem != NULL)
|
|
{
|
|
sText = m_tree.GetItemText(hItem);
|
|
sSubPath = _T("\\") + sText + sSubPath;
|
|
hItem = m_tree.GetParentItem(hItem);
|
|
}
|
|
strPathName = strPathName + _T("\\TK\\Customer\\图库中心") + sSubPath;
|
|
|
|
strPathName.TrimRight(_T("\\"));
|
|
strPathName += _T(".dwg");
|
|
m_strSubPath = sSubPath + _T(".dwg");
|
|
m_nType = 1;
|
|
m_sDwgPath = strPathName;
|
|
m_list.DeleteAllItems();
|
|
AddItemToListCtrl(strPathName);
|
|
|
|
m_list.RedrawWindow();
|
|
}
|
|
|
|
*pResult = 0;
|
|
}
|
|
|
|
BOOL IsOpenFile(CString strFileName, AcApDocument *&pOpenDoc)
|
|
{
|
|
strFileName.MakeLower();
|
|
BOOL bFileAlreadyOpened = FALSE;
|
|
AcApDocumentIterator *pIterator;
|
|
pIterator = acDocManager->newAcApDocumentIterator();
|
|
AcApDocument *pDoc;
|
|
CString strDocName;
|
|
for (; !pIterator->done(); pIterator->step())
|
|
{
|
|
pDoc = pIterator->document();
|
|
strDocName = pDoc->fileName();
|
|
strDocName.MakeLower();
|
|
if (strFileName == strDocName)
|
|
{
|
|
pOpenDoc = pDoc;
|
|
bFileAlreadyOpened = TRUE;
|
|
break;
|
|
}
|
|
}
|
|
delete pIterator;
|
|
return bFileAlreadyOpened;
|
|
}
|
|
|
|
static WORD DibNumColors(VOID FAR *pv)
|
|
{
|
|
INT bits;
|
|
LPBITMAPINFOHEADER lpbi;
|
|
|
|
lpbi = ((LPBITMAPINFOHEADER)pv);
|
|
|
|
if (lpbi->biClrUsed != 0)
|
|
return (WORD)lpbi->biClrUsed;
|
|
bits = lpbi->biBitCount;
|
|
|
|
switch (bits) {
|
|
case 1:
|
|
return 2;
|
|
case 4:
|
|
return 16;
|
|
case 8:
|
|
return 256;
|
|
default:
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
static WORD PaletteSize(VOID FAR *pv)
|
|
{
|
|
LPBITMAPINFOHEADER lpbi;
|
|
WORD NumColors;
|
|
|
|
lpbi = (LPBITMAPINFOHEADER)pv;
|
|
NumColors = DibNumColors(lpbi);
|
|
|
|
return (WORD)(NumColors * sizeof(RGBQUAD));
|
|
}
|
|
|
|
static HBITMAP BitmapFromDib(HANDLE hdib, HPALETTE hpal)
|
|
{
|
|
LPBITMAPINFOHEADER lpbi;
|
|
HPALETTE hpalT;
|
|
HDC hdc;
|
|
HBITMAP hbm;
|
|
|
|
if (!hdib)
|
|
return NULL;
|
|
|
|
lpbi = (LPBITMAPINFOHEADER)GlobalLock(hdib);
|
|
|
|
if (!lpbi)
|
|
return NULL;
|
|
|
|
hdc = GetDC(NULL);
|
|
|
|
if (hpal)
|
|
{
|
|
hpalT = SelectPalette(hdc, hpal, FALSE);
|
|
RealizePalette(hdc); // GDI Bug...????
|
|
}
|
|
|
|
hbm = CreateDIBitmap(hdc,
|
|
(LPBITMAPINFOHEADER)lpbi,
|
|
(LONG)CBM_INIT,
|
|
(LPSTR)lpbi + lpbi->biSize + PaletteSize(lpbi),
|
|
(LPBITMAPINFO)lpbi,
|
|
DIB_RGB_COLORS);
|
|
|
|
if (hpal)
|
|
SelectPalette(hdc, hpalT, FALSE);
|
|
|
|
ReleaseDC(NULL, hdc);
|
|
GlobalUnlock(hdib);
|
|
return hbm;
|
|
}
|
|
|
|
static HANDLE readDibFromMemory(LPVOID pDibSrc)
|
|
{
|
|
LPBITMAPINFOHEADER pbmih = (LPBITMAPINFOHEADER)pDibSrc;
|
|
|
|
DWORD totalSize = pbmih->biSize
|
|
+ pbmih->biSizeImage
|
|
+ (DWORD)PaletteSize(pbmih);
|
|
|
|
HANDLE hdib = GlobalAlloc(GHND, totalSize);
|
|
LPVOID pDibDst = GlobalLock(hdib);
|
|
|
|
CopyMemory(pDibDst, pDibSrc, totalSize);
|
|
|
|
GlobalUnlock(hdib);
|
|
return hdib;
|
|
}
|
|
|
|
void CTKViewDlg::AddItemToListCtrl(CString sDwgName)
|
|
{
|
|
m_list.DeleteAllItems();
|
|
CString sCurParentText = m_sCurParentText;
|
|
CString sCurSltText = m_sCurSltText;
|
|
m_ListImage.DeleteImageList();
|
|
{
|
|
AcDbDatabase *pDb = NULL;
|
|
AcDbBlockTable *pBlockTable = NULL;
|
|
AcDbBlockTableIterator *pBlkItr = NULL;
|
|
AcDbBlockTableRecord *pBlkTlbRcd = NULL;
|
|
CStringArray strNameArray;
|
|
|
|
// 得到一个DWG文件内部的所有块
|
|
|
|
AcApDocument *pDoc = NULL;
|
|
BOOL bIsOpenDocument = FALSE;
|
|
if (bIsOpenDocument = IsOpenFile(sDwgName, pDoc))
|
|
{
|
|
pDb = pDoc->database();
|
|
acDocManagerPtr()->lockDocument(curDoc());
|
|
}
|
|
else
|
|
{
|
|
acDocManagerPtr()->lockDocument(curDoc());
|
|
pDb = new AcDbDatabase(Adesk::kFalse);
|
|
Acad::ErrorStatus res1 = pDb->readDwgFile(sDwgName);
|
|
}
|
|
Acad::ErrorStatus res = pDb->getSymbolTable(pBlockTable, AcDb::kForRead);
|
|
if (res != Acad::eOk)
|
|
{
|
|
if (!bIsOpenDocument)
|
|
delete pDb;
|
|
acDocManagerPtr()->unlockDocument(curDoc());
|
|
return;
|
|
}
|
|
pBlockTable->newIterator(pBlkItr);
|
|
if (pBlkItr == NULL)
|
|
{
|
|
pBlockTable->close();
|
|
delete pBlkItr;
|
|
if (!bIsOpenDocument)
|
|
delete pDb;
|
|
acDocManagerPtr()->unlockDocument(curDoc());
|
|
return;
|
|
}
|
|
// 得到内部块的数量
|
|
int iNum = 0;
|
|
for (; !pBlkItr->done(); pBlkItr->step())
|
|
{
|
|
iNum++;
|
|
}
|
|
delete pBlkItr;
|
|
pBlockTable->newIterator(pBlkItr);
|
|
//ILC_COLOR8
|
|
|
|
m_ListImage.Create(32, 32, ILC_MASK, iNum, 0);
|
|
|
|
iNum = 0;
|
|
for (; !pBlkItr->done(); pBlkItr->step())
|
|
{
|
|
ACHAR *RcdName;
|
|
if (pBlkItr->getRecord(pBlkTlbRcd, AcDb::kForRead) != Acad::eOk)
|
|
continue;
|
|
pBlkTlbRcd->getName(RcdName);
|
|
pBlkTlbRcd->close();
|
|
CString sName = RcdName;
|
|
if (RcdName)
|
|
free(RcdName);
|
|
if (sName.Find(_T("*")) >= 0)
|
|
continue;
|
|
// 根据一个内部块,得到ad对应的ICON
|
|
if (pBlkTlbRcd->hasPreviewIcon())
|
|
{
|
|
AcDbBlockTableRecord::PreviewIcon previewIcon;
|
|
pBlkTlbRcd->getPreviewIcon(previewIcon);
|
|
HANDLE hDib = readDibFromMemory((LPVOID)previewIcon.asArrayPtr());
|
|
HBITMAP hBitmap = BitmapFromDib(hDib, NULL);
|
|
if (hBitmap)
|
|
{
|
|
m_ListImage.Add(CBitmap::FromHandle(hBitmap), RGB(255, 0, 255));
|
|
::DeleteObject(hBitmap);
|
|
strNameArray.Add(sName);
|
|
}
|
|
if (hDib)
|
|
GlobalFree(hDib);
|
|
}
|
|
else
|
|
{
|
|
HICON hIcon = AfxGetApp()->LoadIcon(IDI_ICON1);
|
|
m_ListImage.Add(hIcon);
|
|
strNameArray.Add(sName);
|
|
}
|
|
}
|
|
pBlockTable->close();
|
|
delete pBlkItr;
|
|
if (!bIsOpenDocument)
|
|
delete pDb;
|
|
acDocManagerPtr()->unlockDocument(curDoc());
|
|
|
|
// 插入到ListCtrl中
|
|
int iCount = (int)strNameArray.GetSize();
|
|
//设置listwnd中的说明数组
|
|
m_list.SetImageList(&m_ListImage, TVSIL_NORMAL);
|
|
m_list.SetImageList(&m_ListImage, LVSIL_SMALL);
|
|
|
|
for (int i = 0; i < iCount; i++)
|
|
{
|
|
m_list.InsertItem(i, strNameArray.GetAt(i), i);
|
|
}
|
|
}
|
|
}
|
|
|
|
void CTKViewDlg::OnNMClickList1(NMHDR *pNMHDR, LRESULT *pResult)
|
|
{
|
|
LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
|
|
if (acDocManagerPtr()->documentCount() < 1)
|
|
{
|
|
*pResult = 0;
|
|
return;
|
|
}
|
|
// TODO: Add your control notification handler code here
|
|
CString sCurParentText;
|
|
CString sCurSltText;
|
|
CString sRcdName;
|
|
AcDbObjectId BlockId;
|
|
AcDbBlockTableRecord *pRcd = NULL;
|
|
|
|
sCurParentText = m_sCurParentText;
|
|
sCurSltText = m_sCurSltText;
|
|
// pDlg1->getPreviewCtrl().setBkGroundColor();
|
|
NM_LISTVIEW *pNMListView = (NM_LISTVIEW *)pNMHDR;
|
|
// TODO: Add your control notification handler code here
|
|
int nSelected = pNMListView->iItem;
|
|
|
|
// int nSelected = GetListCtrl().HitTest(point, &uFlags);
|
|
|
|
|
|
m_nSelected = nSelected;
|
|
|
|
sRcdName = m_list.GetItemText(nSelected, 0);
|
|
|
|
if (nSelected >= 0)
|
|
{
|
|
if (_tcscmp(sCurParentText, _T("填充库")) == 0 && wcscmp(sCurSltText, _T("真彩填充")) == 0)
|
|
{
|
|
// CListView::OnLButtonDown(nFlags, point);
|
|
return;
|
|
}
|
|
m_dBlockScale = 1;
|
|
// GetBlockScale(pDlg1->m_sDwgPath,sRcdName,m_dBlockScale);
|
|
m_nMenuType = 1;
|
|
if (sRcdName != m_sRcdName)
|
|
{
|
|
BeginWaitCursor();
|
|
m_previewCtrl.ViewBlock(m_sDwgPath, sRcdName);
|
|
EndWaitCursor();
|
|
m_sRcdName = sRcdName;
|
|
}
|
|
CString sContent = m_previewCtrl.m_sContent;
|
|
}
|
|
|
|
*pResult = 0;
|
|
}
|
|
|
|
HTREEITEM CTKViewDlg::viewItemByText(HTREEITEM hRootItem, CString sText)
|
|
{
|
|
if (hRootItem != NULL)
|
|
{
|
|
CString sItemText;
|
|
HTREEITEM hChldItem;
|
|
hChldItem = m_tree.GetChildItem(hRootItem);
|
|
if (hChldItem == NULL)
|
|
return NULL;
|
|
sItemText = m_tree.GetItemText(hChldItem);
|
|
if (sItemText == sText)
|
|
{
|
|
m_tree.SelectItem(hChldItem);
|
|
return hChldItem;
|
|
}
|
|
while ((hChldItem = m_tree.GetNextItem(hChldItem, TVGN_NEXT)) != NULL)
|
|
{
|
|
sItemText = m_tree.GetItemText(hChldItem);
|
|
if (sItemText == sText)
|
|
{
|
|
m_tree.SelectItem(hChldItem);
|
|
return hChldItem;
|
|
}
|
|
}
|
|
return NULL;
|
|
}
|
|
return NULL;
|
|
}
|
|
|
|
LRESULT CTKViewDlg::OnShowFOlder(WPARAM wparam, LPARAM lparam)
|
|
{
|
|
if (wparam != NULL && lparam != NULL)
|
|
{
|
|
SetSltDwgFile((LPCTSTR)wparam, (LPCTSTR)lparam);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
void CTKViewDlg::SetSltDwgFile(LPCTSTR pszFolder, LPCTSTR pszDwg)
|
|
{
|
|
CString sFolder(_T("")), sDwg(_T(""));
|
|
if (pszFolder) sFolder = pszFolder;
|
|
if (pszDwg) sDwg = pszDwg;
|
|
|
|
int pos = sDwg.ReverseFind(_T('.'));
|
|
if (pos != -1) // 有后缀,去掉
|
|
{
|
|
sDwg = sDwg.Left(pos);
|
|
}
|
|
|
|
HTREEITEM hRootItem = m_tree.GetRootItem(), hItem(NULL);
|
|
|
|
CString sItem(_T(""));
|
|
while (hRootItem)
|
|
{
|
|
sItem = m_tree.GetItemText(hRootItem);
|
|
hItem = viewItemByText(hRootItem, sFolder);
|
|
if (hItem)
|
|
{
|
|
m_tree.Expand(hItem, TVE_EXPAND);
|
|
m_tree.Select(hItem, TVGN_FIRSTVISIBLE);
|
|
hItem = viewItemByText(hItem, sDwg);
|
|
if (hItem)
|
|
{
|
|
m_tree.Expand(hItem, TVE_EXPAND);
|
|
m_tree.Select(hItem, TVGN_FIRSTVISIBLE);
|
|
}
|
|
m_tree.Invalidate();
|
|
m_tree.SetRedraw(TRUE);
|
|
break;
|
|
}
|
|
hRootItem = m_tree.GetNextItem(hRootItem, TVGN_NEXT);
|
|
}
|
|
} |