Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - TaskPanel with DockingPane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TaskPanel with DockingPane

 Post Reply Post Reply
Author
Message
MeikeT View Drop Down
Newbie
Newbie


Joined: 19 December 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote MeikeT Quote  Post ReplyReply Direct Link To This Post Topic: TaskPanel with DockingPane
    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
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: 19 December 2007 at 11:02am
Add
 
m_wndToolPanel.SetOwner(this);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MeikeT View Drop Down
Newbie
Newbie


Joined: 19 December 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote MeikeT Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2007 at 12:12pm
thanks oleg !
it now works perfect :-)
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.250 seconds.