PropertyList.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. // PropertyList.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "PropertyList.h"
  5. #include "PathDialog.h"
  6. #include "../cmCacheManager.h"
  7. #include "../cmSystemTools.h"
  8. #define IDC_PROPCMBBOX 712
  9. #define IDC_PROPEDITBOX 713
  10. #define IDC_PROPBTNCTRL 714
  11. #define IDC_PROPCHECKBOXCTRL 715
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CPropertyList
  14. CPropertyList::CPropertyList()
  15. {
  16. m_Dirty = false;
  17. m_curSel = -1;
  18. }
  19. CPropertyList::~CPropertyList()
  20. {
  21. for(std::set<CPropertyItem*>::iterator i = m_PropertyItems.begin();
  22. i != m_PropertyItems.end(); ++i)
  23. {
  24. delete *i;
  25. }
  26. }
  27. BEGIN_MESSAGE_MAP(CPropertyList, CListBox)
  28. //{{AFX_MSG_MAP(CPropertyList)
  29. ON_WM_CREATE()
  30. ON_WM_VSCROLL()
  31. ON_CONTROL_REFLECT(LBN_SELCHANGE, OnSelchange)
  32. ON_WM_LBUTTONUP()
  33. ON_WM_KILLFOCUS()
  34. ON_WM_LBUTTONDOWN()
  35. ON_WM_RBUTTONUP()
  36. ON_WM_MOUSEMOVE()
  37. //}}AFX_MSG_MAP
  38. ON_CBN_KILLFOCUS(IDC_PROPCMBBOX, OnKillfocusCmbBox)
  39. ON_CBN_SELCHANGE(IDC_PROPCMBBOX, OnSelchangeCmbBox)
  40. ON_EN_KILLFOCUS(IDC_PROPEDITBOX, OnKillfocusEditBox)
  41. ON_EN_CHANGE(IDC_PROPEDITBOX, OnChangeEditBox)
  42. ON_BN_CLICKED(IDC_PROPBTNCTRL, OnButton)
  43. ON_BN_CLICKED(IDC_PROPCHECKBOXCTRL, OnCheckBox)
  44. ON_COMMAND(42, OnDelete)
  45. ON_COMMAND(43, OnHelp)
  46. END_MESSAGE_MAP()
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CPropertyList message handlers
  49. BOOL CPropertyList::PreCreateWindow(CREATESTRUCT& cs)
  50. {
  51. if (!CListBox::PreCreateWindow(cs))
  52. return FALSE;
  53. cs.style &= ~(LBS_OWNERDRAWVARIABLE | LBS_SORT);
  54. cs.style |= LBS_OWNERDRAWFIXED;
  55. m_bTracking = FALSE;
  56. m_nDivider = 0;
  57. m_bDivIsSet = FALSE;
  58. return TRUE;
  59. }
  60. void CPropertyList::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
  61. {
  62. lpMeasureItemStruct->itemHeight = 20; //pixels
  63. }
  64. void CPropertyList::DrawItem(LPDRAWITEMSTRUCT lpDIS)
  65. {
  66. CDC dc;
  67. dc.Attach(lpDIS->hDC);
  68. CRect rectFull = lpDIS->rcItem;
  69. CRect rect = rectFull;
  70. if (m_nDivider==0)
  71. m_nDivider = rect.Width() / 2;
  72. rect.left = m_nDivider;
  73. CRect rect2 = rectFull;
  74. rect2.right = rect.left - 1;
  75. UINT nIndex = lpDIS->itemID;
  76. if (nIndex != (UINT) -1)
  77. {
  78. //get the CPropertyItem for the current row
  79. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(nIndex);
  80. //draw two rectangles, one for each row column
  81. if(pItem->m_NewValue)
  82. {
  83. dc.FillSolidRect(rect2,RGB(255,100, 100));
  84. }
  85. else
  86. {
  87. dc.FillSolidRect(rect2,RGB(192,192,192));
  88. }
  89. dc.DrawEdge(rect2,EDGE_SUNKEN,BF_BOTTOMRIGHT);
  90. dc.DrawEdge(rect,EDGE_SUNKEN,BF_BOTTOM);
  91. //write the property name in the first rectangle
  92. dc.SetBkMode(TRANSPARENT);
  93. dc.DrawText(pItem->m_propName,CRect(rect2.left+3,rect2.top+3,
  94. rect2.right-3,rect2.bottom+3),
  95. DT_LEFT | DT_SINGLELINE);
  96. //write the initial property value in the second rectangle
  97. dc.DrawText(pItem->m_curValue,CRect(rect.left+3,rect.top+3,
  98. rect.right+3,rect.bottom+3),
  99. DT_LEFT | DT_SINGLELINE);
  100. }
  101. dc.Detach();
  102. }
  103. int CPropertyList::AddItem(CString txt)
  104. {
  105. int nIndex = AddString(txt);
  106. return nIndex;
  107. }
  108. int CPropertyList::AddPropItem(CPropertyItem* pItem, bool reverseOrder)
  109. {
  110. this->HideControls();
  111. int nIndex;
  112. if(reverseOrder)
  113. {
  114. nIndex = InsertString(0, _T(""));
  115. }
  116. else
  117. {
  118. nIndex = AddString(_T(""));
  119. }
  120. SetItemDataPtr(nIndex,pItem);
  121. m_PropertyItems.insert(pItem);
  122. return nIndex;
  123. }
  124. int CPropertyList::AddProperty(const char* name,
  125. const char* value,
  126. const char* helpString,
  127. int type,
  128. const char* comboItems, bool reverseOrder)
  129. {
  130. CPropertyItem* pItem = 0;
  131. for(int i =0; i < this->GetCount(); ++i)
  132. {
  133. CPropertyItem* item = this->GetItem(i);
  134. if(item->m_propName == name)
  135. {
  136. pItem = item;
  137. if(pItem->m_curValue != value)
  138. {
  139. pItem->m_curValue = value;
  140. pItem->m_HelpString = helpString;
  141. InvalidateList();
  142. }
  143. return i;
  144. }
  145. }
  146. // if it is not found, then create a new one
  147. if(!pItem)
  148. {
  149. pItem = new CPropertyItem(name, value, helpString, type, comboItems);
  150. pItem->m_NewValue = true;
  151. }
  152. return this->AddPropItem(pItem, reverseOrder);
  153. }
  154. int CPropertyList::OnCreate(LPCREATESTRUCT lpCreateStruct)
  155. {
  156. if (CListBox::OnCreate(lpCreateStruct) == -1)
  157. return -1;
  158. m_bDivIsSet = FALSE;
  159. m_nDivider = 0;
  160. m_bTracking = FALSE;
  161. m_hCursorSize = AfxGetApp()->LoadStandardCursor(IDC_SIZEWE);
  162. m_hCursorArrow = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
  163. m_SSerif8Font.CreatePointFont(80,_T("MS Sans Serif"));
  164. return 0;
  165. }
  166. void CPropertyList::OnSelchange()
  167. {
  168. CRect rect;
  169. CString lBoxSelText;
  170. GetItemRect(m_curSel,rect);
  171. rect.left = m_nDivider;
  172. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
  173. if (m_btnCtrl)
  174. m_btnCtrl.ShowWindow(SW_HIDE);
  175. if (m_CheckBoxControl)
  176. m_CheckBoxControl.ShowWindow(SW_HIDE);
  177. if (pItem->m_nItemType==CPropertyList::COMBO)
  178. {
  179. //display the combo box. If the combo box has already been
  180. //created then simply move it to the new location, else create it
  181. m_nLastBox = 0;
  182. if (m_cmbBox)
  183. m_cmbBox.MoveWindow(rect);
  184. else
  185. {
  186. rect.bottom += 100;
  187. m_cmbBox.Create(CBS_DROPDOWNLIST
  188. | CBS_NOINTEGRALHEIGHT | WS_VISIBLE
  189. | WS_CHILD | WS_BORDER,
  190. rect,this,IDC_PROPCMBBOX);
  191. m_cmbBox.SetFont(&m_SSerif8Font);
  192. }
  193. //add the choices for this particular property
  194. CString cmbItems = pItem->m_cmbItems;
  195. lBoxSelText = pItem->m_curValue;
  196. m_cmbBox.ResetContent();
  197. int i,i2;
  198. i=0;
  199. while ((i2=cmbItems.Find('|',i)) != -1)
  200. {
  201. m_cmbBox.AddString(cmbItems.Mid(i,i2-i));
  202. i=i2+1;
  203. }
  204. if(i != 0)
  205. m_cmbBox.AddString(cmbItems.Mid(i));
  206. m_cmbBox.ShowWindow(SW_SHOW);
  207. m_cmbBox.SetFocus();
  208. //jump to the property's current value in the combo box
  209. int j = m_cmbBox.FindStringExact(0,lBoxSelText);
  210. if (j != CB_ERR)
  211. m_cmbBox.SetCurSel(j);
  212. else
  213. m_cmbBox.SetCurSel(0);
  214. }
  215. else if (pItem->m_nItemType==CPropertyList::EDIT)
  216. {
  217. //display edit box
  218. m_nLastBox = 1;
  219. m_prevSel = m_curSel;
  220. rect.bottom -= 3;
  221. if (m_editBox)
  222. m_editBox.MoveWindow(rect);
  223. else
  224. {
  225. m_editBox.Create(ES_LEFT | ES_AUTOHSCROLL | WS_VISIBLE
  226. | WS_CHILD | WS_BORDER,
  227. rect,this,IDC_PROPEDITBOX);
  228. m_editBox.SetFont(&m_SSerif8Font);
  229. }
  230. lBoxSelText = pItem->m_curValue;
  231. m_editBox.ShowWindow(SW_SHOW);
  232. m_editBox.SetFocus();
  233. //set the text in the edit box to the property's current value
  234. m_editBox.SetWindowText(lBoxSelText);
  235. }
  236. else if (pItem->m_nItemType == CPropertyList::CHECKBOX)
  237. {
  238. rect.bottom -= 3;
  239. if (m_CheckBoxControl)
  240. m_CheckBoxControl.MoveWindow(rect);
  241. else
  242. {
  243. m_CheckBoxControl.Create("check",BS_CHECKBOX
  244. | BM_SETCHECK |BS_LEFTTEXT
  245. | WS_VISIBLE | WS_CHILD,
  246. rect,this,IDC_PROPCHECKBOXCTRL);
  247. m_CheckBoxControl.SetFont(&m_SSerif8Font);
  248. }
  249. lBoxSelText = pItem->m_curValue;
  250. m_CheckBoxControl.ShowWindow(SW_SHOW);
  251. m_CheckBoxControl.SetFocus();
  252. //set the text in the edit box to the property's current value
  253. if(lBoxSelText == "ON")
  254. {
  255. m_CheckBoxControl.SetCheck(1);
  256. }
  257. else
  258. {
  259. m_CheckBoxControl.SetCheck(0);
  260. }
  261. }
  262. else
  263. DisplayButton(rect);
  264. }
  265. void CPropertyList::DisplayButton(CRect region)
  266. {
  267. //displays a button if the property is a file/color/font chooser
  268. m_nLastBox = 2;
  269. m_prevSel = m_curSel;
  270. if (region.Width() > 25)
  271. region.left = region.right - 25;
  272. region.bottom -= 3;
  273. if (m_btnCtrl)
  274. m_btnCtrl.MoveWindow(region);
  275. else
  276. {
  277. m_btnCtrl.Create("...",BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD,
  278. region,this,IDC_PROPBTNCTRL);
  279. m_btnCtrl.SetFont(&m_SSerif8Font);
  280. }
  281. m_btnCtrl.ShowWindow(SW_SHOW);
  282. m_btnCtrl.SetFocus();
  283. }
  284. void CPropertyList::OnKillFocus(CWnd* pNewWnd)
  285. {
  286. //m_btnCtrl.ShowWindow(SW_HIDE);
  287. CListBox::OnKillFocus(pNewWnd);
  288. }
  289. void CPropertyList::OnKillfocusCmbBox()
  290. {
  291. m_cmbBox.ShowWindow(SW_HIDE);
  292. Invalidate();
  293. }
  294. void CPropertyList::OnKillfocusEditBox()
  295. {
  296. CString newStr;
  297. m_editBox.ShowWindow(SW_HIDE);
  298. Invalidate();
  299. }
  300. void CPropertyList::OnSelchangeCmbBox()
  301. {
  302. CString selStr;
  303. if (m_cmbBox)
  304. {
  305. m_cmbBox.GetLBText(m_cmbBox.GetCurSel(),selStr);
  306. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
  307. pItem->m_curValue = selStr;
  308. m_Dirty = true;
  309. }
  310. }
  311. void CPropertyList::OnChangeEditBox()
  312. {
  313. CString newStr;
  314. m_editBox.GetWindowText(newStr);
  315. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
  316. if(pItem->m_curValue != newStr)
  317. {
  318. pItem->m_curValue = newStr;
  319. m_Dirty = true;
  320. }
  321. }
  322. void CPropertyList::HideControls()
  323. {
  324. if(m_editBox)
  325. {
  326. m_editBox.ShowWindow(SW_HIDE);
  327. }
  328. if(m_cmbBox)
  329. {
  330. m_cmbBox.ShowWindow(SW_HIDE);
  331. }
  332. if(m_CheckBoxControl)
  333. {
  334. m_CheckBoxControl.ShowWindow(SW_HIDE);
  335. }
  336. if(m_btnCtrl)
  337. {
  338. m_btnCtrl.ShowWindow(SW_HIDE);
  339. }
  340. }
  341. void CPropertyList::OnVScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar )
  342. {
  343. this->HideControls();
  344. CListBox::OnVScroll(nSBCode, nPos, pScrollBar);
  345. }
  346. void CPropertyList::OnCheckBox()
  347. {
  348. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
  349. if(m_CheckBoxControl.GetCheck())
  350. {
  351. pItem->m_curValue = "ON";
  352. }
  353. else
  354. {
  355. pItem->m_curValue = "OFF";
  356. }
  357. m_Dirty = true;
  358. }
  359. void CPropertyList::OnButton()
  360. {
  361. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
  362. //display the appropriate common dialog depending on what type
  363. //of chooser is associated with the property
  364. if (pItem->m_nItemType == CPropertyList::FILE)
  365. {
  366. CString SelectedFile;
  367. CString Filter("All Files (*.*)||");
  368. CFileDialog FileDlg(TRUE, NULL, NULL, NULL,
  369. Filter);
  370. CString initialDir;
  371. CString currPath = pItem->m_curValue;
  372. if (currPath.GetLength() > 0)
  373. {
  374. int endSlash = currPath.ReverseFind('\\');
  375. if(endSlash == -1)
  376. {
  377. endSlash = currPath.ReverseFind('/');
  378. }
  379. initialDir = currPath.Left(endSlash);
  380. }
  381. initialDir.Replace("/", "\\");
  382. FileDlg.m_ofn.lpstrTitle = "Select file";
  383. if (currPath.GetLength() > 0)
  384. FileDlg.m_ofn.lpstrInitialDir = initialDir;
  385. if(IDOK == FileDlg.DoModal())
  386. {
  387. SelectedFile = FileDlg.GetPathName();
  388. m_btnCtrl.ShowWindow(SW_HIDE);
  389. std::string path = SelectedFile;
  390. cmSystemTools::ConvertToUnixSlashes(path);
  391. pItem->m_curValue = path.c_str();
  392. m_Dirty = true;
  393. InvalidateList();
  394. }
  395. }
  396. else if (pItem->m_nItemType == CPropertyList::PATH)
  397. {
  398. CString initialDir = pItem->m_curValue;
  399. // convert back to windos style path
  400. initialDir.Replace("/", "\\");
  401. CString title = "Setting Cache Value: ";
  402. title += pItem->m_propName;
  403. CPathDialog dlg("Select Path", title, initialDir);
  404. if(dlg.DoModal()==IDOK)
  405. {
  406. CString SelectedFile = dlg.GetPathName();
  407. m_btnCtrl.ShowWindow(SW_HIDE);
  408. std::string path = SelectedFile;
  409. cmSystemTools::ConvertToUnixSlashes(path);
  410. pItem->m_curValue = path.c_str();
  411. m_Dirty = true;
  412. InvalidateList();
  413. }
  414. }
  415. }
  416. void CPropertyList::OnLButtonUp(UINT nFlags, CPoint point)
  417. {
  418. if (m_bTracking)
  419. {
  420. //if columns were being resized then this indicates
  421. //that mouse is up so resizing is done. Need to redraw
  422. //columns to reflect their new widths.
  423. m_bTracking = FALSE;
  424. //if mouse was captured then release it
  425. if (GetCapture()==this)
  426. ::ReleaseCapture();
  427. ::ClipCursor(NULL);
  428. CClientDC dc(this);
  429. InvertLine(&dc,CPoint(point.x,m_nDivTop),CPoint(point.x,m_nDivBtm));
  430. //set the divider position to the new value
  431. m_nDivider = point.x;
  432. //redraw
  433. Invalidate();
  434. }
  435. else
  436. {
  437. BOOL loc;
  438. int i = ItemFromPoint(point,loc);
  439. m_curSel = i;
  440. CListBox::OnLButtonUp(nFlags, point);
  441. }
  442. }
  443. void CPropertyList::OnLButtonDown(UINT nFlags, CPoint point)
  444. {
  445. if ((point.x>=m_nDivider-5) && (point.x<=m_nDivider+5))
  446. {
  447. //if mouse clicked on divider line, then start resizing
  448. ::SetCursor(m_hCursorSize);
  449. CRect windowRect;
  450. GetWindowRect(windowRect);
  451. windowRect.left += 10; windowRect.right -= 10;
  452. //do not let mouse leave the list box boundary
  453. ::ClipCursor(windowRect);
  454. if (m_cmbBox)
  455. m_cmbBox.ShowWindow(SW_HIDE);
  456. if (m_editBox)
  457. m_editBox.ShowWindow(SW_HIDE);
  458. CRect clientRect;
  459. GetClientRect(clientRect);
  460. m_bTracking = TRUE;
  461. m_nDivTop = clientRect.top;
  462. m_nDivBtm = clientRect.bottom;
  463. m_nOldDivX = point.x;
  464. CClientDC dc(this);
  465. InvertLine(&dc,CPoint(m_nOldDivX,m_nDivTop),CPoint(m_nOldDivX,m_nDivBtm));
  466. //capture the mouse
  467. SetCapture();
  468. }
  469. else
  470. {
  471. m_bTracking = FALSE;
  472. CListBox::OnLButtonDown(nFlags, point);
  473. }
  474. }
  475. void CPropertyList::OnMouseMove(UINT nFlags, CPoint point)
  476. {
  477. if (m_bTracking)
  478. {
  479. //move divider line to the mouse pos. if columns are
  480. //currently being resized
  481. CClientDC dc(this);
  482. //remove old divider line
  483. InvertLine(&dc,CPoint(m_nOldDivX,m_nDivTop),CPoint(m_nOldDivX,m_nDivBtm));
  484. //draw new divider line
  485. InvertLine(&dc,CPoint(point.x,m_nDivTop),CPoint(point.x,m_nDivBtm));
  486. m_nOldDivX = point.x;
  487. }
  488. else if ((point.x >= m_nDivider-5) && (point.x <= m_nDivider+5))
  489. //set the cursor to a sizing cursor if the cursor is over the row divider
  490. ::SetCursor(m_hCursorSize);
  491. else
  492. CListBox::OnMouseMove(nFlags, point);
  493. }
  494. void CPropertyList::InvertLine(CDC* pDC,CPoint ptFrom,CPoint ptTo)
  495. {
  496. int nOldMode = pDC->SetROP2(R2_NOT);
  497. pDC->MoveTo(ptFrom);
  498. pDC->LineTo(ptTo);
  499. pDC->SetROP2(nOldMode);
  500. }
  501. void CPropertyList::PreSubclassWindow()
  502. {
  503. m_bDivIsSet = FALSE;
  504. m_nDivider = 0;
  505. m_bTracking = FALSE;
  506. m_curSel = 1;
  507. m_hCursorSize = AfxGetApp()->LoadStandardCursor(IDC_SIZEWE);
  508. m_hCursorArrow = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
  509. m_SSerif8Font.CreatePointFont(80,_T("MS Sans Serif"));
  510. }
  511. CPropertyItem* CPropertyList::GetItem(int index)
  512. {
  513. return (CPropertyItem*)GetItemDataPtr(index);
  514. }
  515. void CPropertyList::OnRButtonUp( UINT nFlags, CPoint point )
  516. {
  517. CMenu menu;
  518. CRect rect;
  519. this->GetWindowRect(&rect);
  520. BOOL loc;
  521. m_curSel = ItemFromPoint(point,loc);
  522. menu.CreatePopupMenu();
  523. menu.AppendMenu(MF_STRING | MF_ENABLED, 42, "Delete Cache Entry");
  524. menu.AppendMenu(MF_STRING | MF_ENABLED, 43, "Help For Cache Entry");
  525. menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
  526. rect.TopLeft().x + point.x,
  527. rect.TopLeft().y + point.y, this, NULL);
  528. }
  529. void CPropertyList::OnDelete()
  530. {
  531. if(m_curSel == -1 || this->GetCount() <= 0)
  532. {
  533. return;
  534. }
  535. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
  536. cmCacheManager::GetInstance()->RemoveCacheEntry(pItem->m_propName);
  537. m_PropertyItems.erase(pItem);
  538. delete pItem;
  539. this->DeleteString(m_curSel);
  540. this->HideControls();
  541. this->SetTopIndex(0);
  542. InvalidateList();
  543. }
  544. void CPropertyList::OnHelp()
  545. {
  546. if(m_curSel == -1 || this->GetCount() <= 0)
  547. {
  548. return;
  549. }
  550. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
  551. MessageBox(pItem->m_HelpString, pItem->m_propName, MB_OK|MB_ICONINFORMATION);
  552. }
  553. void CPropertyList::RemoveAll()
  554. {
  555. int c = this->GetCount();
  556. for(int i =0; i < c; ++i)
  557. {
  558. CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(0);
  559. cmCacheManager::GetInstance()->RemoveCacheEntry(pItem->m_propName);
  560. m_PropertyItems.erase(pItem);
  561. delete pItem;
  562. this->DeleteString(0);
  563. }
  564. this->HideControls();
  565. InvalidateList();
  566. }
  567. void CPropertyList::InvalidateList()
  568. {
  569. Invalidate();
  570. m_Dirty = true;
  571. }