Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - ON_NOTIFY - how ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ON_NOTIFY - how ?

 Post Reply Post Reply
Author
Message
re.tf View Drop Down
Newbie
Newbie


Joined: 26 August 2005
Location: Brazil
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote re.tf Quote  Post ReplyReply Direct Link To This Post Topic: ON_NOTIFY - how ?
    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
Back to Top
idler View Drop Down
Groupie
Groupie


Joined: 11 July 2007
Location: Russian Federation
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote idler Quote  Post ReplyReply Direct Link To This Post Posted: 14 August 2007 at 1:42am
try this notify

XTP_NM_REPORT_HEADER_RCLICK

Back to Top
re.tf View Drop Down
Newbie
Newbie


Joined: 26 August 2005
Location: Brazil
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote re.tf Quote  Post ReplyReply Direct Link To This Post Posted: 14 August 2007 at 8:04am
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
Back to Top
idler View Drop Down
Groupie
Groupie


Joined: 11 July 2007
Location: Russian Federation
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote idler Quote  Post ReplyReply Direct Link To This Post Posted: 21 August 2007 at 4:29am
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?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.