Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - TaskPanel - AddControlItem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TaskPanel - AddControlItem

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


Joined: 24 February 2006
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote kram617 Quote  Post ReplyReply Direct Link To This Post Topic: TaskPanel - AddControlItem
    Posted: 04 April 2007 at 8:16am
Hello,
 
I am trying to use TaskPanel with Version 9.70.  I have created two groups and I use AddControlItem to add a child window to each group.  (One group has a list box, the other group has a tree control.)  I am currently using xtpTaskPanelThemeListViewOffice2003 for my theme, so I can have an Outlook 2003 look.
 
The problem I am having is that switching between groups doesn't make my child windows visible.  For example, if I have Group 1 expanded and am looking at my tree control, then I click to expand Group 2, I don't see my list box.  But I click back onto Group 1, I still see my tree control.  However, after expanding Group 2, if I resize the window, the list box will then reappear.  But then I click back to expand Group 1, and my tree control isn't visible. 
 
It's as if only one CXTPTaskPanelGroupItem can be visible at a time, regardless of whether they are in seperate groups.
 
If anybody can help me, you have my thanks.
 
----------------------------------------------------------------
 
BTW, here is my code for creating the Task Panel and contents, if this is any help....
 
 
 if (m_TaskPanel.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN , CXTPEmptyRect(),  this, IDC_TASKPANEL))
 {
      m_TaskPanel.SetTheme(xtpTaskPanelThemeListViewOffice2003); 
      m_TaskPanel.SetBehaviour(xtpTaskPanelBehaviourToolbox);
      m_TaskPanel.SetSelectItemOnFocus(TRUE);
      m_pItemLayoutGroup = m_TaskPanel.AddGroup(IDS_WORKSPACE_ITEMLAYOUT);
      m_pReportViewGroup = m_TaskPanel.AddGroup(IDS_WORKSPACE_REPORTVIEW);
      m_pReportViewGroup->SetExpanded(TRUE);

      m_treeItemLayout.Create(WS_CHILD | WS_VISIBLE | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_INFOTIP | TVS_SHOWSELALWAYS, CXTPEmptyRect(), &m_TaskPanel, IDC_WORKSPACE_TREE_SECTIONS);
      m_pItemLayoutItem = m_pItemLayoutGroup->AddControlItem(m_treeItemLayout.GetSafeHwnd());
      m_lstReportSections.Create(WS_CHILD | WS_VISIBLE | LBS_STANDARD | WS_HSCROLL, CXTPEmptyRect(), &m_TaskPanel, IDC_WORKSPACE_LIST_REPORT);
      m_pReportViewItem = m_pReportViewGroup->AddControlItem(m_lstReportSections.GetSafeHwnd());
}
 
 
 
Back to Top
kram617 View Drop Down
Newbie
Newbie


Joined: 24 February 2006
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote kram617 Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2007 at 12:15pm
Looks like I found the problem.  I was calling SetSize for each item in my OnSize handler, but I wasn't checking first if that particular group was expanded.  So basically, I was resizing an item to nothing because the group height is zero when collapsed.  Thus, the next time I would expand a group the item wouldn't appear.
 
Now I don't resize until I receive a XTP_TPN_GROUPEXPANDED actions from XTPWM_TASKPANEL_NOTIFY.
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.047 seconds.