Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Grid Chrashes in OnInplaceBtnDown
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Grid Chrashes in OnInplaceBtnDown

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: Grid Chrashes in OnInplaceBtnDown
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 07 September 2003 at 7:04am

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
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 09 September 2003 at 8:35am

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

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