Print Page | Close Window

a problem about CXTPPropertyGridItem

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=3277
Printed Date: 09 November 2025 at 1:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: a problem about CXTPPropertyGridItem
Posted By: nicolnie
Subject: a problem about CXTPPropertyGridItem
Date Posted: 25 November 2005 at 5:56am

I have a problem about CXTPPropertyGridItem.

I use CXTPPropertyGridItem::Expand() to expand a item of property grid in my code. But at the same time, if the user click the same time in the UI, the error happens. It seems that CXTPPropertyGridItem::Collapse()  has same problem.

I have seen the code of CXTPPropertyGridItem . I found if another call to the function occurs after m_bExpanded is set but before the (XTPWM_PROPERTYGRID_NOTIFY is processed, the m_bExpanded maybe set twice, and this is wrong behavior.

I don't know any others has the same problem.




Replies:
Posted By: Oleg
Date Posted: 26 November 2005 at 6:50am

Do You Expand it in another thread?

How it can be that Expand called while you Expanding programmatically in same thread?

 



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


Posted By: nicolnie
Date Posted: 27 November 2005 at 11:05pm

Yes, I expand the item in a worker thread. But if the user click the item at the same time (UI thread), the error happens.

Is the expand() and collapse() thread safe?

 



Posted By: Oleg
Date Posted: 28 November 2005 at 2:19am

I'm afraid no, expand() and collapse no thread safe. :(

Can only suggest send message to main thread to expand/collapse item.



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


Posted By: nicolnie
Date Posted: 29 November 2005 at 2:42am

I see, maybe it is the right way.

I will try to modify my code.




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