Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - CXTPReportControl inside pane causes problems!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportControl inside pane causes problems!

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportControl inside pane causes problems!
    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!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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.
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.188 seconds.