Print Page | Close Window

TaskPanel with DockingPane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=9140
Printed Date: 14 May 2024 at 12:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TaskPanel with DockingPane
Posted By: MeikeT
Subject: TaskPanel with DockingPane
Date Posted: 19 December 2007 at 2:35am
Hi,
I'm trying to add a fixed CXTPTaskPanel inside CXTPDockingPane on the left side of my CXTPMDIFrameWnd. Therefore I use the following code:
 
--- MainFrm.h ---
class CMainFrame {
...
CXTPDockingPaneManager m_paneManager;
CXTPTaskPanel m_wndToolPanel;
...
}
 
--- MainFrm.cpp ---
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
...
m_paneManager.InstallDockingPanes(this);
// create panel on the left side
CXTPDockingPane* tmpPanel = m_paneManager.CreatePane(IDR_PANETOOL, CRect(0, 0, 200, 0), xtpPaneDockLeft);
 
// create the taskbar
m_wndToolPanel.Create(WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_TABSTOP,CXTPEmptyRect),
this
, 0);
// add taskbar to panel
tmpPanel->Attach(&m_wndToolPanel);
 
// populate with items
CXTPTaskPanelGroup *tmpGroup = m_wndToolPanel.AddGroup(IDS_GROUPCMD);
tmpGroup->AddLinkItem(IDS_GROUPCURADD, 0);
tmpGroup->AddLinkItem(IDS_GROUPCURDEL, 1);
...
}
 
all this is working correctly and the bars shows up as expected.
However I can't get XTPWM_TASKPANEL_NOTIFY to work and can't handle mouse-clicks on my links.
I added a

ON_MESSAGE(XTPWM_TASKPANEL_NOTIFY, OnToolPanelNotify)

to the message map of CMainFrm and I have a test function:

LRESULT CMainFrame::OnToolPanelNotify(WPARAM wParam, LPARAM lParam)
{
if(wParam != XTP_TPN_CLICK)
return 0;
AfxMessageBox("test");
}

Any idea how to solve this ?
Thanks
Meike



Replies:
Posted By: Oleg
Date Posted: 19 December 2007 at 11:02am
Add
 
m_wndToolPanel.SetOwner(this);


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


Posted By: MeikeT
Date Posted: 19 December 2007 at 12:12pm
thanks oleg !
it now works perfect :-)



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