Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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;
}