Print Page | Close Window

again, property grid right button menu losing

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=15038
Printed Date: 27 April 2024 at 1:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: again, property grid right button menu losing
Posted By: rienzi
Subject: again, property grid right button menu losing
Date Posted: 24 August 2009 at 11:41pm
big masters, can you have a try of the task below?


first establish a tab view control, then add items of CWnd to the control with the fellowing codes


BOOL CTabbedViewView::AddView(CRuntimeClass* pViewClass, LPCTSTR lpszTitle, int nIcon)
{
     CCreateContext contextT;
     contextT.m_pCurrentDoc     = GetDocument();
     contextT.m_pNewViewClass   = pViewClass;
     contextT.m_pNewDocTemplate = GetDocument()->GetDocTemplate();

     CWnd* pWnd;
     TRY
     {
          pWnd = (CWnd*)pViewClass->CreateObject();
          if (pWnd == NULL)
          {
               AfxThrowMemoryException();
          }
     }
     CATCH_ALL(e)
     {
          TRACE0( "Out of memory creating a view.\n" );
          // Note: DELETE_EXCEPTION(e) not required
          return FALSE;
     }
     END_CATCH_ALL

     DWORD dwStyle = AFX_WS_DEFAULT_VIEW;
     dwStyle &= ~WS_BORDER;

     int nTab = m_wndTabControl.GetItemCount();

     // Create with the right size (wrong position)
     CRect rect(0,0,0,0);
     if (!pWnd->Create(NULL, NULL, dwStyle,
          rect, &m_wndTabControl, (AFX_IDW_PANE_FIRST + nTab), &contextT))
     {
          TRACE0( "Warning: couldn't create client tab for view.\n" );
          // pWnd will be cleaned up by PostNcDestroy
          return NULL;
     }
     m_wndTabControl.InsertItem(nTab, lpszTitle, pWnd->GetSafeHwnd(), nIcon);

     pWnd->SetOwner(this);

     return TRUE;

}


add some CFormView items which contains property grid controls to the tabcontrol, then when you run your application and use the property grid controls in your tab view, the right button menu of your mouse in an edit item does not work

I also tried that when I let a CDialog object which contains property grid control be the child of a CFormView item in a tab view control, the same problem occurs again.



Can anybody try this and tell me the result and tell me why? I want use tab view control and property grid control together. And I am confused by this problem for days.



Replies:
Posted By: Oleg
Date Posted: 25 August 2009 at 5:34am
Hi,
 
Create sample (or modify TabbeView sample) that shows this problem and what exactly you do in your code and attach it here.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net