again, property grid right button menu losing |
Post Reply |
Author | |
rienzi
Groupie Joined: 20 August 2009 Status: Offline Points: 38 |
Post Options
Thanks(0)
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
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 |