Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - XTP_NM_REPORT_SELCHANGED message handle in FormVie
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

XTP_NM_REPORT_SELCHANGED message handle in FormVie

 Post Reply Post Reply
Author
Message
jhkdiy View Drop Down
Newbie
Newbie


Joined: 26 March 2012
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jhkdiy Quote  Post ReplyReply Direct Link To This Post Topic: XTP_NM_REPORT_SELCHANGED message handle in FormVie
    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!
Back to Top
jhkdiy View Drop Down
Newbie
Newbie


Joined: 26 March 2012
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jhkdiy Quote  Post ReplyReply Direct Link To This Post 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? 
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.156 seconds.