|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Debabrata Mukherjee
|
Jul 9, 2007 - 7:20 AM
|
I have a splitter window which is created like the following code snippet.
if (!m_wndSplitter.CreateStatic(this, 1, 2)) { throw new CSa_Exception(SAIS_CAT_INTERNAL_ERROR, SAIS_E_MAINFRM_CREATE_CLIENT_SPLITTER); }
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CSaIsBinsView), CSize(200, 50), pContext)) { throw new CSa_Exception(SAIS_CAT_INTERNAL_ERROR, SAIS_E_MAINFRM_CREATE_CLIENT_BINS_VIEW); }
I need to have a dockable window instead of that splitter window. I have some adjacent windows with this splitter (all are the splitter windows) What would be the possible way to make the previous window a dockable one, without making any changes to the rest. or if changes are required what are they?
if(!m_wndFrame.Create(NULL,"ABC",WS_CHILD, rect,this,NULL)) { throw new CSa_Exception(SAIS_CAT_INTERNAL_ERROR, SAIS_E_MAINFRM_CREATE_CLIENT_SPLITTER); } CRuntimeClass *pRTC0 = RUNTIME_CLASS( CSaIsBinsView ); CView *pView0 = STATIC_DOWNCAST( CView, pRTC0->CreateObject() );
if( !pView0->Create(::AfxRegisterWndClass(0),_T(""),WS_CHILD | WS_VISIBLE,CRect(0,0,0,0), this,AFX_IDW_PANE_FIRST, NULL )) { TRACE0("Failed to create view window\n"); ASSERT( FALSE ); return -1; }
CSaIsBinsView *pYourView0 = STATIC_DOWNCAST( CSaIsBinsView, pView0 );
if(!m_wndFrame.CreateView(pContext,AFX_IDW_PANE_FIRST)) { throw new CSa_Exception(SAIS_CAT_INTERNAL_ERROR, SAIS_E_MAINFRM_CREATE_CLIENT_BINS_VIEW); }
I have used this piece of code but in that case what will be the value of "AFX_IDW_PANE_FIRST" (This piece of code is used for creating a tab window) .What should be the resource id for a view which can be placed over a frame window. This view(CSaIsBinsView) is created in a separate file.
|
|
Technical Support
|
Jul 9, 2007 - 10:03 AM
|
You have a splitter window and two views created as its panes. If you want to move one of views to a control bar, then the splitter is no longer needed because it is not designed as a container for only one view. The second view should simply become the main view in its frame window. So the splitter window should be removed completely.
|
|
Debabrata Mukherjee
|
Jul 9, 2007 - 12:30 PM
|
Like we have mentioned earlier, the splitter window, if removed gives us too many debug assert errors. May b it has something to do with resource, can u let us know what is the correct way of giving a resource id for a View, bcoz we are not very sure abt it.
|
|