Print Page | Close Window

Using CXTPTaskPanel in Dialog

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=20105
Printed Date: 23 November 2024 at 3:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Using CXTPTaskPanel in Dialog
Posted By: fredliu
Subject: Using CXTPTaskPanel in Dialog
Date 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.
 



Replies:
Posted By: Fredrik
Date 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



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