![]() |
Can we handle the events of subtabs in dockingPane |
Post Reply ![]() |
Author | |
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Yes, think you need XTP_DPN_ACTION but check if action is xtpPaneActionActivated.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Call GetItem(j)->GetRect()
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |