Grid Chrashes in OnInplaceBtnDown |
Post Reply |
Author | |
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
Posted: 06 September 2003 at 8:12am |
Hi; I've created a property grid control inside a XTDockWindow within a MDI application. The grid recreates its contents every time the user selects a different document type to reflect the available properties. But this behavour is not responible for the below mentioned ACCVIO. When clicking on the in-place button of a CXTPropertyGridItemColor item type the app crashes inside the OnInplaceBtnDown message handler of the CXTPropertyGridItemColor class. I found out that after calling CColorDialog dlg.DoModal() methode the class members seems to be corrupted. So the m_Grid member of the class points to 0xfdfdfdfd just after the return from DOModal(). First I thought that the app runs out of stack space because the dialog object is created on stack, so I doubled the available stack size by increasing the stack parameters on the linker page of the compiler (VC++ 6.0 SP4). But the result is still the same. In all of the sample apps, everything works fine. I checked my solution to create the grid inside the docking window with similar samples and I can't find the difference! Does anyone know what I'm doing wrong? Thanxs in advance Martin |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, Martin I suppose that you call ResetContent of property grid in the CView::OnActivateView that called after dialog become visible. so item is destroyed after CColorDialog dlg.DoModal() method.
Edited by oleg |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
You're absolutely right! I made the mistake to reset the content of the property grid each time the view was activated/deactivated in OnActivateView. I fixed it and now it works as expected. Thanks Martin |
|
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 |