BOOL CMsgSignalDBWnd::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) { // Set Icon for DB Window SetIcon( theApp.LoadIcon( IDI_ICO_DB_EDITOR ), TRUE ); // Create Static Splitter Window with 1 ROW and 2 COLUMNS m_bSplitWndCreated = m_omSplitterWnd.CreateStatic( this, // Parent Frame Window SPLT_ONE_ROWS, // #Rows SPLT_ONE_COLS, // #Columns WS_CHILD | WS_VISIBLE | WS_BORDER, // Window Style AFX_IDW_PANE_FIRST); // Splitter NOT Nested // Get size of Frame wnd CSize om_Size(0,0); vCalculateSplitterPosition(om_Size); if ( TRUE == m_bSplitWndCreated ) { // Create the Right Pane for static splitter window CMsgSgDetView::sm_sDbParams = m_sDbParams; m_bSplitWndCreated = m_omSplitterWnd.CreateView( FIRST_ROW, // #Row SECOND_COL, // #Column RUNTIME_CLASS(CMsgSgDetView), // View associated with om_Size, // Sizeof Pane pContext); } if ( TRUE == m_bSplitWndCreated ) { // Create the Left Pane for static splitter window CMsgSgTreeView::sm_sDbParams = m_sDbParams; m_bSplitWndCreated = m_omSplitterWnd.CreateView( FIRST_ROW, // #Row FIRST_COL, // #Column RUNTIME_CLASS(CMsgSgTreeView), // View associated with om_Size, //CSize( 350,100 ), // Sizeof Pane pContext); } CString omTitle = _T("DatabaseEditor - "); omTitle += m_sDbParams.m_omBusName; SetWindowText(omTitle.GetBuffer(MAX_PATH)); if (m_sDbParams.m_eBus == J1939) { CMsgSignalDBWnd::sm_bValidJ1939Wnd = TRUE; } return m_bSplitWndCreated; }
BOOL CSimSysWnd::OnCreateClient(LPCREATESTRUCT , CCreateContext* pContext) { // Create Static Splitter Window with 1 ROW and 2 COLUMNS m_bSplitWndCreated = m_omSplitterWnd.CreateStatic( this, // Parent Frame Window SPLT_ONE_ROWS, // #Rows SPLT_ONE_COLS, // #Columns WS_CHILD | WS_VISIBLE | WS_BORDER, // Window Style AFX_IDW_PANE_FIRST); // Splitter NOT Nested // Get size of Frame wnd CSize om_Size(0,0); vCalculateSplitterPosition(om_Size); if ( TRUE == m_bSplitWndCreated ) { CSimSysDetView::sm_eBus = m_eBus; // Create the Right Pane for static splitter window m_bSplitWndCreated = m_omSplitterWnd.CreateView( 0, // #Row 1, // #Column RUNTIME_CLASS(CSimSysDetView), // View associated om_Size, // Sizeof Pane pContext); } if ( TRUE == m_bSplitWndCreated ) { // Create the Left Pane for static splitter window CSimSysTreeView::sm_eBus = m_eBus; m_bSplitWndCreated = m_omSplitterWnd.CreateView( 0, // #Row 0, // #Column RUNTIME_CLASS(CSimSysTreeView), // View associated om_Size, //CSize( 350,100 )Sizeof Pane pContext); } return m_bSplitWndCreated; }
BOOL CEditFrameWnd::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) { // Create Static Splitter Window with 1 ROW and 2 COLUMNS m_bIsSplitterCreated = m_omSplitterWndOne.CreateStatic(this, // Parent Frame Window SPLT_ONE_ROWS, // #Rows SPLT_ONE_COLS); // #Columns if ( m_bIsSplitterCreated == TRUE ) { // Get size of Frame wnd CSize om_Size(0,0); vCalculateSplitterPos( om_Size ); CFnsTreeView::sm_eBus = m_eBus; // Create view for the Right top Pane for static splitter window m_bIsSplitterCreated = m_omSplitterWndOne.CreateView(0, // #Row 0, // #Column RUNTIME_CLASS(CFnsTreeView), om_Size, // Sizeof Pane pContext); if ( TRUE == m_bIsSplitterCreated ) { // Get child window ID from 0th row and 1st column int nChildID = m_omSplitterWndOne.IdFromRowCol(0, 1); m_bIsSplitterCreated = m_omSplitterWndTwo.CreateStatic( &m_omSplitterWndOne, // Parent Frame Window SPLT_TWO_ROWS, // #Rows SPLT_TWO_COLS, // #Columns, // #Columns WS_CHILD | WS_VISIBLE | WS_BORDER, // Window Style nChildID); // Splitter Nested if ( TRUE == m_bIsSplitterCreated ) { CFileView::sm_eBus = m_eBus; CSize om_Size2(0,0); om_Size2.cy = ((om_Size.cy) / 2); // Create view for the Left Pane for static splitter window 2 m_bIsSplitterCreated = m_omSplitterWndTwo.CreateView( 0,// #Row 0,// #Column RUNTIME_CLASS(CFileView), om_Size2,// Sizeof Pane pContext); if ( TRUE == m_bIsSplitterCreated ) { om_Size2.cy = 0; CFunctionView::sm_eBus = m_eBus; // Create view for the bottom Pane for static splitter window 2 m_bIsSplitterCreated = m_omSplitterWndTwo.CreateView( 1,// #Row 0,// #Column RUNTIME_CLASS(CFunctionView), om_Size2,// Sizeof Pane pContext); if ( m_bIsSplitterCreated != TRUE ) { // Failed to create view 2 for splitter 2, //close child window // return m_bIsSplitterCreated; } } else { // Failed to create view 1 for splitter two, // close child window // return m_bIsSplitterCreated; } } else { // Failed to create splitter two, close child window // return m_bIsSplitterCreated; } } else { // Failed to create view for splitter one, close child window // return m_bIsSplitterCreated; } } else { // Failed to create splitter one, close child window // return m_bIsSplitterCreated; } return m_bIsSplitterCreated; }