Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to derive CWorkspace?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to derive CWorkspace?

 Post Reply Post Reply
Author
Message
jeffcmj View Drop Down
Groupie
Groupie


Joined: 28 October 2004
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote jeffcmj Quote  Post ReplyReply Direct Link To This Post Topic: How to derive CWorkspace?
    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

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 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
Back to Top
jeffcmj View Drop Down
Groupie
Groupie


Joined: 28 October 2004
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote jeffcmj Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 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
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.