ON_NOTIFY - how ? |
Post Reply |
Author | |
re.tf
Newbie Joined: 26 August 2005 Location: Brazil Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 13 August 2007 at 12:31pm |
Hi,
I have one class:
class CPaneLog : public CWnd{ DECLARE_DYNAMIC (CPaneLog)public :CPaneLog (); virtual ~CPaneLog();void update() { report_ .Populate(); }void refresh(void) { report_ .ResetContent();populateCtrl ();report_ .Populate(); }protected :DECLARE_MESSAGE_MAP () void populateCtrl(void) {std ::vector<CLogManagement::evt> list = CLogManagement::instance()->get(); for(int i = 0; i < list.size(); i++) {report_ .AddRecord(new CLogRecord((CLogRecordItemIcon::iconType) list[i].type_, list[i].message_, list[i].date_, list[i].guid_)); } }private :CXTPToolBar m_wndToolBar ;CXTPReportControl report_ ;CImageList icons_ ;afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);afx_msg void OnSize(UINT nType, int cx, int cy);// afx_msg void OnRButtonUp(UINT nFlags, CPoint point); afx_msg void OnTbPnLogButtonSave();afx_msg void OnTbPnLogButtonClear();afx_msg void OnTbPnLogButtonRefresh();afx_msg void CPaneLog::OnReportItemRClick(NMHDR * pNotifyStruct, LRESULT * result);};
... BEGIN_MESSAGE_MAP (CPaneLog, CWnd)ON_WM_CREATE ()ON_WM_SIZE ()// ON_WM_RBUTTONUP() ON_COMMAND (ID_TB_PN_LOG_BUTTON_SAVE, &CPaneLog::OnTbPnLogButtonSave)ON_COMMAND (ID_TB_PN_LOG_BUTTON_CLEAR, &CPaneLog::OnTbPnLogButtonClear)ON_COMMAND (ID_TB_PN_LOG_BUTTON_REFRESH, &CPaneLog::OnTbPnLogButtonRefresh)//}}AFX_MSG_MAP ON_NOTIFY (NM_RCLICK, IDC_REPORT, &CPaneLog::OnReportItemRClick)END_MESSAGE_MAP ()void CPaneLog::OnReportItemRClick(NMHDR * pNotifyStruct, LRESULT * result){ MessageBox ("OnReportItemRClick");} ...I did try use:
ON_NOTIFY(NM_RCLICK, IDC_REPORT, &CPaneLog::OnReportItemRClick)
When I click in intem, OnReportItemRClick is not called, don't work, what is wrong?
thanks
|
|
idler
Groupie Joined: 11 July 2007 Location: Russian Federation Status: Offline Points: 11 |
Post Options
Thanks(0)
|
try this notify
XTP_NM_REPORT_HEADER_RCLICK |
|
re.tf
Newbie Joined: 26 August 2005 Location: Brazil Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Hi,
I did try:
ON_NOTIFY (XTP_NM_REPORT_HEADER_RCLICK, IDC_REPORT, &CPaneLog::OnReportItemRClick)but, I have no success...
If any other idea, please let me know...
Thanks
|
|
idler
Groupie Joined: 11 July 2007 Location: Russian Federation Status: Offline Points: 11 |
Post Options
Thanks(0)
|
CPaneLog is parent of IDC_REPORT?
IDC_REPORT must be a child CPaneLog if you want catch XTP_NM_REPORT_HEADER_RCLICK. IDC_REPORT - nID CXTPReportControl?
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |