Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Can we handle the events of subtabs in dockingPane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Can we handle the events of subtabs in dockingPane

 Post Reply Post Reply
Author
Message
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Topic: Can we handle the events of subtabs in dockingPane
    Posted: 02 August 2008 at 1:48am
Hello,
I have created 3 subtabs in a docking pane. But now i want to handle the events of these tabs.
means,when the tab is clicked, the tab window will appear in the docking pane.But i want to do something extra also,after clicking the subtabs.
 
The tabs created in the docking pane,doesnt have any ID,so how we will know which tab is clicked? please explain in detail.
 
Can we handle the events of the docking pane subtabs?
We have CXTPDockingPane class's IsSelected() method,with which we can check wheather the subtab is selected,But where to handle it?
 
i also tried

if(wParam == XTP_DPN_ACTION) in the OnDockingPaneNotify event,but that too didnt worked.i tried this in the ONDockingNotify event :-

if(wParam == XTP_DPN_ACTION){XTP_DOCKINGPANE_ACTION* pAction = (XTP_DOCKINGPANE_ACTION*)lParam;if(pAction->pPane == pwndPaneRGB)AfxMessageBox(_T("RGB Dialog Selected"));if(pAction->pPane == pwndPaneForm)AfxMessageBox(_T("Histogram Dialog Selected"));if(pAction->pPane == pwndPaneCurve)AfxMessageBox(_T("Curve Dialog Selected"));return TRUE;}

But it was crashing after showing the message.and the message also it was showing twice. 
Please let me know,the possible solution for this??
 
 
Thanks And Regards,
Vijay.
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: 03 August 2008 at 4:24am
Hi,
Yes, think you need  XTP_DPN_ACTION but check if action is xtpPaneActionActivated.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2008 at 11:16pm

Hello,

Can U Please explain,Why it is showing the message twice? and where can i check the xtpdockingpaneactivated?

Please tell me in detail. Because XTP_DPN_ACTION is getting called everytime when we do anything with that docking pane.
 
even if i click inside the dialog box on the docking pane,then also this XTP_DPN_ACTION getting called. i only want to know when we click on the subtab below. nothing else.
 
Herewith i am sending one text file,from which you can get idea about wha t i am doing currently.Please check the link given below.
 
 
Please reply in detail.
 
Thanks And Regards,
Vijay.
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: 04 August 2008 at 3:58am
Hello,
 
Yes, xtpdockingpaneactivated is called every time your pane recevies focus - you click tab or click inside pane. Sorry, There is no action for Tab only.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Posted: 04 August 2008 at 4:55am
Hello,
Sorry,But is there any alternative for this then?
 means can i use xtppaneactiondocked or something else,which can give me something like the pane tab click event?
 
please tell some solution if u know any.
we also have CXTPDockingPaneManager's IsSelected(dockpane) function.
Can we use that,with some manipulation?
 
please atleast give some hint to slove this problem.
 
Thanks And Regards,
Vijay
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: 04 August 2008 at 7:23am
hint:
 
Check how Samples\DockingPane\DockingContainers  sample works - it creates custom Tabbed Container - CDockingPaneTabbedContainer.
 
You have also create custom CDockingPaneTabbedContainer in your sources and catch WM_LBUTTONDOWN and check if user click Tab:
 
 
void CDockingPaneTabbedContainer ::OnLButtonDown(UINT /*nFlags*/, CPoint point)
{
int nHit = HitTest(point);
if (nHit >= 0)
 {
...
}
...
}
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Posted: 06 August 2008 at 1:14am
How can i check the point of tab? means can we get the position of the tab button?
Because according to your solution we are checking the point.
 
please let me know how to find the position of the tab.
 
Thanks And Regards,
Vijay.
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: 06 August 2008 at 2:44am
Hi,
Call GetItem(j)->GetRect()
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.125 seconds.