Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - again, property grid right button menu losing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

again, property grid right button menu losing

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


Joined: 20 August 2009
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote rienzi Quote  Post ReplyReply Direct Link To This Post Topic: again, property grid right button menu losing
    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.
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: 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
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.141 seconds.