diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-26 18:53:44 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-26 18:53:44 (GMT) |
commit | 2c1fb789d7a182ab0df53aad474a657d59d894b0 (patch) | |
tree | 3f4db8d752a6f3a218e92ad470efb97b5e7421c7 /Source/MFCDialog/PropertyList.cpp | |
parent | 6e5af0e6ccbb0f2c0a4aec00003ea0ce68ea2f95 (diff) | |
download | CMake-2c1fb789d7a182ab0df53aad474a657d59d894b0.zip CMake-2c1fb789d7a182ab0df53aad474a657d59d894b0.tar.gz CMake-2c1fb789d7a182ab0df53aad474a657d59d894b0.tar.bz2 |
ENH: add help for cache entries
Diffstat (limited to 'Source/MFCDialog/PropertyList.cpp')
-rw-r--r-- | Source/MFCDialog/PropertyList.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp index 92f701e..1dda079 100644 --- a/Source/MFCDialog/PropertyList.cpp +++ b/Source/MFCDialog/PropertyList.cpp @@ -44,6 +44,7 @@ BEGIN_MESSAGE_MAP(CPropertyList, CListBox) ON_BN_CLICKED(IDC_PROPBTNCTRL, OnButton) ON_BN_CLICKED(IDC_PROPCHECKBOXCTRL, OnCheckBox) ON_COMMAND(42, OnDelete) + ON_COMMAND(43, OnHelp) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -123,6 +124,7 @@ int CPropertyList::AddPropItem(CPropertyItem* pItem) int CPropertyList::AddProperty(const char* name, const char* value, + const char* helpString, int type, const char* comboItems) { @@ -136,6 +138,7 @@ int CPropertyList::AddProperty(const char* name, if(pItem->m_curValue != value) { pItem->m_curValue = value; + pItem->m_HelpString = helpString; m_Dirty = true; Invalidate(); } @@ -154,13 +157,14 @@ int CPropertyList::AddProperty(const char* name, pItem = *p; pItem->m_Removed = false; pItem->m_curValue = value; + pItem->m_HelpString = helpString; Invalidate(); } } // if it is not found, then create a new one if(!pItem) { - pItem = new CPropertyItem(name, value, type, comboItems); + pItem = new CPropertyItem(name, value, helpString, type, comboItems); } return this->AddPropItem(pItem); @@ -615,6 +619,7 @@ void CPropertyList::OnRButtonUp( UINT nFlags, CPoint point ) m_curSel = ItemFromPoint(point,loc); menu.CreatePopupMenu(); menu.AppendMenu(MF_STRING | MF_ENABLED, 42, "Delete Cache Entry"); + menu.AppendMenu(MF_STRING | MF_ENABLED, 43, "Help For Cache Entry"); menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, rect.TopLeft().x + point.x, rect.TopLeft().y + point.y, this, NULL); @@ -629,6 +634,12 @@ void CPropertyList::OnDelete() Invalidate(); } +void CPropertyList::OnHelp() +{ + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + MessageBox(pItem->m_HelpString); +} + void CPropertyList::RemoveAll() { int c = this->GetCount(); |