![]() |
a problem about CXTPPropertyGridItem |
Post Reply
|
| Author | |
nicolnie
Newbie
Joined: 19 September 2004 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Topic: a problem about CXTPPropertyGridItemPosted: 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. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
nicolnie
Newbie
Joined: 19 September 2004 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
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?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
nicolnie
Newbie
Joined: 19 September 2004 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 November 2005 at 2:42am |
|
I see, maybe it is the right way. I will try to modify my code. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |