Print Page | Close Window

XTP_NM_REPORT_SELCHANGED message handle in FormVie

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19601
Printed Date: 15 May 2024 at 11:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: XTP_NM_REPORT_SELCHANGED message handle in FormVie
Posted By: jhkdiy
Subject: XTP_NM_REPORT_SELCHANGED message handle in FormVie
Date 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!



Replies:
Posted By: jhkdiy
Date Posted: 27 March 2012 at 2:32am

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? 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net