Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - a problem about CXTPPropertyGridItem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

a problem about CXTPPropertyGridItem

 Post Reply Post Reply
Author
Message
nicolnie View Drop Down
Newbie
Newbie


Joined: 19 September 2004
Location: China
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote nicolnie Quote  Post ReplyReply Direct Link To This Post Topic: a problem about CXTPPropertyGridItem
    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.

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: 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
Back to Top
nicolnie View Drop Down
Newbie
Newbie


Joined: 19 September 2004
Location: China
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote nicolnie Quote  Post ReplyReply Direct Link To This Post 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?

 

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: 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
Back to Top
nicolnie View Drop Down
Newbie
Newbie


Joined: 19 September 2004
Location: China
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote nicolnie Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2005 at 2:42am

I see, maybe it is the right way.

I will try to modify my code.

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.063 seconds.