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

Help me

 Post Reply Post Reply
Author
Message
yyh7011cn View Drop Down
Groupie
Groupie


Joined: 10 September 2006
Location: China
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote yyh7011cn Quote  Post ReplyReply Direct Link To This Post Topic: Help me
    Posted: 11 November 2006 at 8:43am
I Create propertyGrid as follows
UINT nID[100];
for(int i=0;i<100;i++)
    nID = i;
 CXTPPropertyGridItem* pCategory = m_wndGrid.AddCategory(_T("Something"));
for(i=0;i<100;i++)
{
         CCustomItemFileBox* pBox = (CCustomItemFileBox*) pPath->AddChildItem(new CCustomItemFileBox(nID);
    pBox->SetCaption(Other]);
}
 
In OnGridNotify I write as follows:
      CXTPPropertyGridItem* pItem = (CXTPPropertyGridItem*)lParam;
      UINT nID = pItem->GetID();
      if( nID >=0 && nID <100)
            dosomething
     But when my program exit,I get dbgheap.c assert error,in line 1017,
     if I remove if(nID >=0 && nID <100) dosomething,it's correct.tell me why,How can I do?thanks.
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: 12 November 2006 at 3:38am
Hi, 
do you check wParam in OnGridNotify  ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yyh7011cn View Drop Down
Groupie
Groupie


Joined: 10 September 2006
Location: China
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote yyh7011cn Quote  Post ReplyReply Direct Link To This Post Posted: 12 November 2006 at 7:22am
Thanks,I don't check wParam,It's well done. 
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.171 seconds.