Print Page | Close Window

Can not create my CXTPPropertyGridView

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=2074
Printed Date: 18 May 2024 at 7:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Can not create my CXTPPropertyGridView
Posted By: Sergey
Subject: Can not create my CXTPPropertyGridView
Date Posted: 06 April 2005 at 2:54am

I need to override method CXTPPropertyGrid::CreateView() in order to get notification on CXTPPropertyGridView Set/Kill focus events. However I can not create my view as described below. Unfortunately we can not release our product until we resolve the problem.

I created class CXTPPropertyGridEx : public CXTPPropertyGrid

and added virtual CXTPPropertyGridView* CreateView() to it.

The method CreateView is called from CXTPPropertyGrid construcor. At this point my CXTPPropertyGridEx object was not created yet. That is why the method CXTPPropertyGrid::CreateView() is called rather than CXTPPropertyGridEx::CreateView(). So my CreateView() is not called and I can not create my view and catch events.

What is wrong?

Thank you in advance.

Sergey




Replies:
Posted By: Oleg
Date Posted: 06 April 2005 at 4:25am

Sorry we didn't test it for this. We will fix it in next release

please change it as:

1. make m_pView protected

2. add in constructor of CXTPPropertyGridEx

if (m_pView != NULL)

{   

   delete m_pView;

   m_pView = CreateView();
}



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


Posted By: Sergey
Date Posted: 06 April 2005 at 5:28am

Hi,

Thank you for quick reply.

I think the same problem exists for CXTPPropertyGridPaintManager that is created in CXTPPropertyGrid constructor. So it must be deleted later when we create own Paint Manager.

Sergey.




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