Print Page | Close Window

How to derive CWorkspace?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2602
Printed Date: 06 November 2025 at 5:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to derive CWorkspace?
Posted By: jeffcmj
Subject: How to derive CWorkspace?
Date Posted: 20 July 2005 at 4:08am

I want to override some functions in CWorkspace but since it's protected inner class, how could I derived it? If it can not be derived, what's the purpose of the virtual function?

Thanks




Replies:
Posted By: Oleg
Date Posted: 20 July 2005 at 11:29am

Hello, I think you right, we added

CXTPTabClientWnd::CWorkspace* CXTPTabClientWnd::CreateWorkspace()
{
 if (m_bEnableGroups)
  return new CWorkspace();
 
 return new CSingleWorkspace();
}

 

so in next version you will be able to override CXTPTabClientWnd and its CreateWorkspace

Can you hint us why you need custom CWorkspace?

 



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


Posted By: jeffcmj
Date Posted: 20 July 2005 at 9:08pm

In my current project, I want to override
virtual BOOL DrawIcon (CDC* pDC, CPoint pt, CXTPTabManagerItem* pItem, BOOL bDraw, CSize& szIcon)
function in CWordspace to provide more control to draw the icon, eg drawing some kind of overlay on the icon etc.

BTW: Why not just make it a public inner class, so we can derive it? Also, if it can not be derived, why you guys make several virtual functions in it?



Posted By: Oleg
Date Posted: 21 July 2005 at 8:03am

Ok, I see now.

They are virtual because they override virtual methods of base class. For next version CWorkspace become public class.

 



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



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