XTP_NM_REPORT_SELCHANGED message handle in FormVie |
Post Reply |
Author | |
jhkdiy
Newbie Joined: 26 March 2012 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 26 March 2012 at 2:39am |
Hi, How to handle XTP_NM_REPORT_SELCHANGED message in CFormView ?
I Create a XTPReport Custom control in my dialog, derive from CFormView:
1: in header file :
CXTPReportControl m_wndReportCtrl;
afx_msg void OnRowColChanged(NMHDR * pNotifyStruct, LRESULT * result);
2: in cpp file:
BEGIN_MESSAGE_MAP(CUIDepotCheckBill, CFormView)
//{{AFX_MSG_MAP(CUIDepotCheckBill) ON_NOTIFY(TVN_SELCHANGED, IDC_TREE_BILLTYPE, OnSelchangedTreeBilltype) ON_COMMAND(IDM_COMM_CHECKBILL, OnCommCheckbill) ON_COMMAND(IDM_COMM_PRINT_BILL, OnCommPrintBill) ON_COMMAND(IDM_COMM_DELBILL, OnCommDelbill) ON_WM_SIZE() //}}AFX_MSG_MAP // i want to handle follow message
ON_NOTIFY(XTP_NM_REPORT_SELCHANGED, IDC_REPORT_LIST, OnRowColChanged) ON_MESSAGE(XTPWM_DOCKINGPANE_NOTIFY, OnDockingPaneNotify) ON_MESSAGE(WM_KICKIDLE, OnKickIdle) END_MESSAGE_MAP() 3: init:
void CUIDepotCheckBill::OnInitialUpdate()
{ m_wndReportCtrl.SubClassDlgItem(IDC_REPORT_LIST, this);
....
}
4: adding handle code:
void CUIDepotCheckBill::OnRowColChanged(NMHDR* /*pNotifyStruct*/, LRESULT* /*result*/)
{ MessageBox("SelChanged!", "提示", MB_ICONINFORMATION);
}
when I run application, nothing occur!
Thank's any replay!
|
|
jhkdiy
Newbie Joined: 26 March 2012 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
I find out what happen! Because In my CFormView, I use CXTPDockingPane, and Create three Panes in this form, Now the CXTPRepot control's parent window is Pane, not the CFormView. so report control can not receive any message.
but, how can i solve this problem?
how can i get the DockingPane's CWnd* pointer?
|
|
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 |