Originally posted by: bjm
I placed Chris Maunders grid control into a tab and
It does not show up. Does anyone have a suggestion how
I can fix this?
Originally posted by: xjl200
m_Framework.Create(this);
CcsDynTreeCtrl*pTreeCtrl = pTreeView->GetChildCtrl(); ASSERT_VALID(pTreeCtrl);
pTreeCtrl->InitDomView(pApex); // TreeView is right
CcsDynListCtrlView* pDynListCtrlView = (CcsDynListCtrlView*) CcsDynListCtrlView::CreateObject();
CcsDynListCtrl* pDynListCtrl = pDynListCtrlView->GetChildCtrl(); ASSERT_VALID(pDynListCtrl);
typedef CcsView_T<CcsDynTreeCtrl> CcsDynTreeCtrlView;
CRuntimeClass* pRTClass = CcsDynTreeCtrlView::GetStaticRTClass();
typedef CcsView_T<CcsDynListCtrl> CcsDynListCtrlView;
CRuntimeClass* pRTClass1 = CcsDynListCtrlView::GetStaticRTClass();
TVisualObject *pTab1 = new TVisualObject(1,"",pContext,RUNTIME_CLASS(TTabWnd),TVisualObject::TOS_TABTOP);
TVisualObject *pTabView1 = new TVisualObject(2,"Configuration",1,2,pContext);
TVisualObject *pTabView2 = new TVisualObject(3,"Script", pContext, RUNTIME_CLASS(CScriptForm));
TVisualObject *pSplitView1 = new TVisualObject(4,0,1,pContext,pRTClass1,CSize(100,0));
TVisualObject *pNested = new TVisualObject(13,0,0,2,1,pContext);
TVisualObject *pNestedPane = new TVisualObject(14,0,0,pContext,pRTClass,CSize(0,150));
TVisualObject *pSplitView2 = new TVisualObject(5,1,0,pContext,RUNTIME_CLASS(TTabWnd),CSize(0,0),TVisualObject::TOS_TABBOTTOM);
TVisualObject *pPane1 = new TVisualObject(6,"DC",pContext,pRTClass1,TVisualObject::TOS_SELECTED);
TVisualObject *pPane2 = new TVisualObject(7,"TC",pContext,pRTClass1);
TVisualObject *pPane3 = new TVisualObject(9,"File",pContext,pRTClass1);
m_Framework.Add(pTab1);
m_Framework.Add(pTab1,pTabView1);
m_Framework.Add(pTab1,pTabView2);
m_Framework.Add(pTabView1,pNested);
m_Framework.Add(pNested, pNestedPane);
m_Framework.Add(pNested,pSplitView2);
m_Framework.Add(pSplitView2,pPane1);
m_Framework.Add(pSplitView2,pPane2);
m_Framework.Add(pSplitView2,pPane3);
m_Framework.Add(pTabView1,pSplitView1);
TVisualFrameworkIterator it(m_Framework);
while (!it.End()) {
TVisualObject *pObject = it.Get();
it++;
}
pTabView1->SetActiveTab();
CSplitterWnd *m_pWnd=new CSplitterWnd;
m_pWnd=(CSplitterWnd *)pTabView1->GetWnd();
m_pWnd->SetColumnInfo(0,200, 0);
m_pWnd->RecalcLayout();
CcsDynTreeCtrlView* pTreeView = (CcsDynTreeCtrlView*)pNestedPane->GetWnd();
ASSERT_VALID(pTreeView);
if(!pTreeCtrl->Create(AFX_WS_DEFAULT_VIEW,CRect(0,0,0,0),pTreeView,AFX_IDW_PANE_FIRST))
return FALSE;
ASSERT_VALID(pDynListCtrlView);
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
if(!pDynListCtrlView->Create(NULL,_T("ScriptView"),dwStyle,CRect(0,0,0,0),
m_Framework.Get(6)->GetWnd(),CCS_FAKE_WNDID(0,0)))
{
return FALSE;
} // I don't know how to setup the parent window,
// Maybe it is m_Framework.Get(6))->GetWnd(), or pPane1->GetWnd(). but both are failed.
if(!pDynListCtrl->Create(AFX_WS_DEFAULT_VIEW,CRect(0,0,0,0),pDynListCtrlView,AFX_IDW_PANE_FIRST))
return FALSE;
pDynListCtrl->InitDomView(pApex); // ListView is failed.
Why TreeView is right and ListView is failed. do you know how to setup the parent window?
Originally posted by: xjl200
The software is good. but still has some problem.
1. If the first tab incluse two spliter windows. the first window( or column) is a neated view with two spliter windows. the software can't work.
2. I can add RunTime treeview into table view. but I can add RunTime List view into tab view. i don't know the parent Window of ListCtl.
i solve topic 1 and left topic 2 to you.
any suggestion will be thanked.
regards,
xjl
Originally posted by: Andi
This is the new link leading to this project.
http://www.codeproject.com/ide/VisualFx.asp
Have fun,
Andi
Originally posted by: Zoran M.Todorovic
This is an old article. Please, check the article
Visual Framework - Views, Tabs and Splitters
in www.codeguru.com/AdvancedUi/VisualFx.shtml
ReplyOriginally posted by: Petrus
The link to where the project is stored is not available. Can you please email it to me. Thank You. Petrus
ReplyOriginally posted by: David Churchill
I have an app the has a splitter with one view in the first column and a tabbed view in the second. I want to add a horizontal splitter (1 column, 2 rows) to one of the tabbed views. I can't quite figure this out. Any help would be greatly appreciated.
Thanks,
David Churchill
Originally posted by: Hiroshi Nomura
I finally realized that there is a fix to this.
/////////////////////////////////////////////
for (POSITION pos = List.GetHeadPosition(); pos; List.GetNext(pos)) {
When I'm playing with this Tab Window, I noticed that one of the CScrollView-derived view created under this Tab Window behaves strangely. In spite of the resizing of the Main Frame window, the scroll bars did not appear correctly.
In TVisualTabWindow::ResizeTab(), I added one line.
void TVisualTabWindow::ResizeTab(void)
{
CRect rect;
CWnd *pParent = (CWnd*)GetParent();
ASSERT(pParent);
pParent->GetClientRect(&rect);
....
// Here is a new line !!
GetClientRect(&rect);
// Now the windows managed by this Tab Window
// is resized based on this Tab Wnidow's size,
// not based on the Parent Windows size
// (the parent window could be MainFrame,
// or Splitter Wnd.
pWnd = List.GetAt(pos)->Wnd;
pWnd->MoveWindow(1, TABWND_HEIGHT+1,
rect.Width()-2, rect.Height()-TABWND_HEIGHT-2);
}
lockFlag=FALSE;
}
Originally posted by: Heinz Huber
I generated a class like TMyTab with two tree views inside. I added this class to a static splitter window.
In common: I did almost the same like in the example. But I don't get scroll bars in the tree view. Also the demo I downloaded doesn't show the scroll bars.
Does anybody know a solution to this problem?
Originally posted by: Brian Sokolnicki
I have a question concerning your source code for the Tabbed Window within a splitter window.
According to the example source code, thier is a class MyTabB with the follow source code:
if (row == 0 && col == 0) {
wnd->CreateView(0,0,RUNTIME_CLASS(CDummyList),CSize(150,0),pContext);
} else if (row == 0 && col == 1) {
Nested.CreateStatic(wnd, 2, 1, WS_CHILD|WS_VISIBLE|WS_BORDER,wnd->IdFromRowCol(0,1));
Nested.CreateView(0,0,RUNTIME_CLASS(CDummyList),CSize(0,100),pContext);
Nested.CreateView(1,0,RUNTIME_CLASS(TMyTabA),CSize(0,0),pContext);
However, I have found that when you switch TMyTabA with CDummyList as follows, there is an ASSERTION error
if (row == 0 && col == 0) {
wnd->CreateView(0,0,RUNTIME_CLASS(TMyTabA),CSize(150,0),pContext);
} else if (row == 0 && col == 1) {
Nested.CreateStatic(wnd, 2, 1, WS_CHILD|WS_VISIBLE|WS_BORDER,wnd->IdFromRowCol(0,1));
Nested.CreateView(0,0,RUNTIME_CLASS(CDummyList),CSize(0,100),pContext);
Nested.CreateView(1,0,RUNTIME_CLASS(CDummyTree),CSize(0,0),pContext);
I was wondering if anybody knows why, or how to fix this...
Please Help...
Reply