Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - Using CXTPTaskPanel in Dialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using CXTPTaskPanel in Dialog

 Post Reply Post Reply
Author
Message
fredliu View Drop Down
Newbie
Newbie
Avatar

Joined: 30 August 2012
Location: china
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote fredliu Quote  Post ReplyReply Direct Link To This Post Topic: Using CXTPTaskPanel in Dialog
    Posted: 03 September 2012 at 10:34pm
Hi,
I know how use CXTPTaskPanel in view by google, but how can i display CXTPTaskPanel in a dialog, I try to move code that dispaly CXTPTaskPanel in a view to a dialog, but it fail to display, I even cannot find CXTPTaskPanel window use spy++ in the dialog, someone have experience in this way?
 
Thanks in advance.
 
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2012 at 12:13pm
Perhaps too late reply, but there's nothing special about creating a task panel inside a dialog: just add a static as a placeholder in your dialog resource and initialize the task panel in the dialog's OnInitDialog.

BOOL MyDialog::OnInitDialog() 
{
   ...
   CStatic wndStatic;
   if (!wndStatic.SubclassDlgItem(IDC_TASK_PANEL, this))
      return FALSE;

   CRect rc;
   wndStatic.GetWindowRect(&rc);
   ScreenToClient(&rc);
   wndStatic.DestroyWindow(); 
   mMyPane.Create(WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_TABSTOP, rc, this, IDC_TASK_PANEL);
   ...
}

Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
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.155 seconds.