| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #include "stdafx.h"
- #include "PropertyGridInplaceEdit.h"
- #include "PropertyGridInplaceButton.h"
- #include "PropertyGridInplaceList.h"
- #include "PropertyGridItem.h"
- #include "PropertyGridItemStringButton.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CPropertyGridItemStringButton ::CPropertyGridItemStringButton (CString strCaption, LPCTSTR strValue, HWND hNotifyWnd , UINT nNotifyMsg )
- : CPropertyGridItem(strCaption)
- {
- ASSERT(hNotifyWnd);
- m_hNotifyWnd = hNotifyWnd;
- m_nNotifyMsg = nNotifyMsg;
- }
- CPropertyGridItemStringButton::CPropertyGridItemStringButton(UINT nID, LPCTSTR strValue, HWND hNotifyWnd , UINT nNotifyMsg )
- : CPropertyGridItem(nID)
- {
- ASSERT(hNotifyWnd);
- m_hNotifyWnd = hNotifyWnd;
- m_nNotifyMsg = nNotifyMsg;
- }
- CPropertyGridItemStringButton::~CPropertyGridItemStringButton()
- {
- }
- void CPropertyGridItemStringButton::OnInplaceButtonDown()
- {
- // 向指定窗口发送消息
- ::SendMessage(m_hNotifyWnd, m_nNotifyMsg, 0, 0);
- }
- void CPropertyGridItemStringButton::OnLButtonDblClk()
- {
- // 向指定窗口发送消息
- //::SendMessage(m_hNotifyWnd, m_nNotifyMsg, 0, 0);
- }
|