Print Page | Close Window

CXTPReportControl inside pane causes problems!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=9758
Printed Date: 13 May 2025 at 5:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPReportControl inside pane causes problems!
Posted By: znakeeye
Subject: CXTPReportControl inside pane causes problems!
Date Posted: 01 March 2008 at 4:35pm
I have a report control in a pane. Now I want to handle double-clicks. In my frame window, I have the following:
 
ON_NOTIFY(NM_DBLCLK, IDR_PANE_MY_REPORT, OnReportDblClick)
...
 
m_wndReport.Create(..., this);
 
if (pPane->GetID() == IDR_PANE_MY_REPORT)
    pPane->Attach(&m_wndReport);
 
Problem
CMyFrame::OnReportDblClick will not be called since the parent of m_wndReport changed in the call to Attach().
 
How do you catch double-clicks in a report control inside a pane? I would like to use this NM_DBLCLK message.
 
Thanks!



Replies:
Posted By: Oleg
Date Posted: 02 March 2008 at 1:48pm

Hi,

I see only one good solution:
 
Add additional CWnd derived host window, add m_wndReport to this CWnd, attach this CWnd to Pane instead of Report. And catch all mesages in this CWnd.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 02 March 2008 at 6:13pm
Yeah, good idea. I thought of a CView, but I just stripped them from my project so I don't feel like it :P.
 
Thanks for your hint.


Posted By: znakeeye
Date Posted: 04 March 2008 at 4:01pm
A better solution would be to have this function in the report control:
 
SetNotifyWindow(CWnd *pWndNotify)
 
And then redirect all notify messages to that window.


Posted By: mgampi
Date Posted: 05 March 2008 at 4:18am
Hi;
 
Have you tried to call SetOwner()? Parent is the pane, but owner is your frame window.
I didn't check this; take a look at the report control sources, whether the control notifys the parent or the owner...
This is built in and requires no additional code in the core XT library.


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: znakeeye
Date Posted: 05 March 2008 at 9:54am
Yeah, you're right. It does send the message to the owner. The question remaining is; will everything work if I change the owner to my frame?
 
I'll test this as soon as possible.



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