Esempio n. 1
0
/*******************************************************************************
  Function Name  : vUpdateWinStatus
  Input(s)       : -
  Output         : -
  Functionality  : This function will set window postion and splitter postion.
                   For setting window postion this will use parent class
                   function and then will set splitter position.
  Member of      : CGraphChildFrame
  Author(s)      : Raja N
  Date Created   : 19.4.2005
  Modifications  :
*******************************************************************************/
void CTxMsgChildFrame::vUpdateWinStatus()
{
    // Call parent window function for setting window status
    CMDIChildBase::vUpdateWinStatus();
    // Get Splitter postion from configuration file
    vGetSplitterStatus();
    // Set Splitter Postion
    vSetSplitterPostion();
}
Esempio n. 2
0
/*******************************************************************************
  Function Name  : OnCreateClient
  Input(s)       : lpcs - Create Parameters
                   pContext - Pointer to Create Context
  Output         : BOOL - Create Result
  Functionality  : This function will be called to create window. This function
                   will create splitter window and views.
  Member of      : CTxMsgChildFrame
  Author(s)      : Raja N
  Date Created   : 15/04/2005
  Modifications  :
*******************************************************************************/
BOOL CTxMsgChildFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
{
    m_bInit = TRUE;
    BOOL bReturn = TRUE;
    // Create Parent Splitter
    bReturn = m_omRootSplitter.CreateStatic( this,
              defTX_MSG_ROOTSPLITTER_ROWS,
              defTX_MSG_ROOTSPLITTER_COLS );

    // Check for success
    if( bReturn == TRUE )
    {
        // Default size
        CSize omSize(100,100);
        // Get ID of Top view
        int nChild = m_omRootSplitter.IdFromRowCol( defTX_LEFT_VIEW_ROW,
                     defTX_LEFT_VIEW_COL );
        // Create Left Side Message Block details splitter
        bReturn =
            m_omLeftViewSplitter.CreateStatic( &m_omRootSplitter,
                                               defTX_MSG_LEFT_VIEW_ROWS,
                                               defTX_MSG_LEFT_VIEW_COLS,
                                               WS_CHILD | WS_VISIBLE | WS_BORDER,
                                               nChild );
        // Irder of view creation
        // 1. Message Details View
        // 2. Message List View
        // 3. Function view
        // 4. Message Blocks view

        if( bReturn == TRUE )
        {
            // Get Child ID for Right side view
            int nChildID = m_omLeftViewSplitter.IdFromRowCol(
                               defTX_RIGHT_VIEW_ROW, defTX_RIGHT_VIEW_COL );
            // Create right side Splitter
            bReturn =
                m_omRightViewSplitter.CreateStatic( &m_omLeftViewSplitter,
                                                    defTX_MSG_RIGHT_VIEW_ROWS,
                                                    defTX_MSG_RIGHT_VIEW_COLS,
                                                    WS_CHILD | WS_VISIBLE | WS_BORDER,
                                                    nChildID );
            // Create right side bottom view
            if( bReturn == TRUE )
            {
                bReturn =
                    m_omRightViewSplitter.CreateView( defTX_DETAILS_VIEW_ROW,
                                                      defTX_DETAILS_VIEW_COL,
                                                      RUNTIME_CLASS( CTxMsgDetailsView),
                                                      omSize,
                                                      pContext );
            }
            // Create Right side top view
            if( bReturn == TRUE )
            {
                bReturn =
                    m_omRightViewSplitter.CreateView( defTX_LIST_VIEW_ROW,
                                                      defTX_LIST_VIEW_COL,
                                                      RUNTIME_CLASS( CTxMsgListView),
                                                      omSize,
                                                      pContext );
            }
        }
        if( bReturn == TRUE )
        {
            // Create bottom view
            bReturn =
                m_omRootSplitter.CreateView( defTX_FUNC_VIEW_ROW,
                                             defTX_FUNC_VIEW_COL,
                                             RUNTIME_CLASS(CTxFunctionsView),
                                             omSize,
                                             pContext );
        }

        //if successful
        if( bReturn == TRUE )
        {
            // Create Message blocks view splitter
            bReturn =
                m_omLeftViewSplitter.CreateView( defTX_BLOCKS_VIEW_ROW,
                                                 defTX_BLOCKS_VIEW_COL,
                                                 RUNTIME_CLASS( CTxMsgBlocksView),
                                                 omSize,pContext );
        }

        // Set the size of parent splitter
        if( bReturn == TRUE )
        {
            // Get Splitter information
            vGetSplitterStatus();
            // Set Splitter postion
            vSetSplitterPostion();
        }
        m_bInit = FALSE;
    }

    /* Try to load resource DLL for icons*/
    HMODULE hModAdvancedUILib = ::LoadLibrary("AdvancedUIPlugIn.dll");

    if ( hModAdvancedUILib )
    {
        SetIcon( ::LoadIcon(hModAdvancedUILib, MAKEINTRESOURCE( IDI_ICO_TX_WINDOW )), TRUE);
        ::FreeLibrary(hModAdvancedUILib);
        hModAdvancedUILib = nullptr;
    }
    else
    {
        HICON hIco = AfxGetApp()->LoadIcon(IDI_ICO_TX_WINDOW);
        SetIcon(hIco, TRUE);
    }

    return bReturn;
}
/*******************************************************************************
  Function Name  : OnCreateClient
  Input(s)       : lpcs - Create Parameters
                   pContext - Pointer to Create Context
  Output         : BOOL - Create Result
  Functionality  : This function will be called to create window. This function
                   will create splitter window and views.
  Member of      : CTxMsgChildFrame
  Author(s)      : Raja N
  Date Created   : 15/04/2005
  Modifications  : 
*******************************************************************************/
BOOL CTxMsgChildFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) 
{
    m_bInit = TRUE;
    BOOL bReturn = TRUE;
    // Create Parent Splitter
    bReturn = m_omRootSplitter.CreateStatic( this,
                                    defTX_MSG_ROOTSPLITTER_ROWS,
                                    defTX_MSG_ROOTSPLITTER_COLS );
    // Check for success
    if( bReturn == TRUE )
    {
        // Default size
        CSize omSize(100,100);
        // Get ID of Top view
        int nChild = m_omRootSplitter.IdFromRowCol( defTX_LEFT_VIEW_ROW,
                                                    defTX_LEFT_VIEW_COL );
        // Create Left Side Message Block details splitter
        bReturn = 
            m_omLeftViewSplitter.CreateStatic( &m_omRootSplitter,
                                              defTX_MSG_LEFT_VIEW_ROWS, 
                                              defTX_MSG_LEFT_VIEW_COLS,
                                              WS_CHILD | WS_VISIBLE | WS_BORDER,
                                              nChild );
        // Irder of view creation
        // 1. Message Details View
        // 2. Message List View
        // 3. Function view
        // 4. Message Blocks view

        if( bReturn == TRUE )
        {
            // Get Child ID for Right side view
            int nChildID = m_omLeftViewSplitter.IdFromRowCol(
                                defTX_RIGHT_VIEW_ROW, defTX_RIGHT_VIEW_COL );
            // Create right side Splitter
            bReturn =
                m_omRightViewSplitter.CreateStatic( &m_omLeftViewSplitter,
                                    defTX_MSG_RIGHT_VIEW_ROWS,
                                    defTX_MSG_RIGHT_VIEW_COLS,
                                    WS_CHILD | WS_VISIBLE | WS_BORDER,
                                    nChildID );
            // Create right side bottom view
            if( bReturn == TRUE )
            {
                bReturn = 
                    m_omRightViewSplitter.CreateView( defTX_DETAILS_VIEW_ROW,
                                             defTX_DETAILS_VIEW_COL,
                                             RUNTIME_CLASS( CTxMsgDetailsView),
                                             omSize,
                                             pContext );
            }
            // Create Right side top view
            if( bReturn == TRUE )
            {
                bReturn =
                    m_omRightViewSplitter.CreateView( defTX_LIST_VIEW_ROW,
                                                defTX_LIST_VIEW_COL,
                                                RUNTIME_CLASS( CTxMsgListView),
                                                omSize,
                                                pContext );
            }
        }
        if( bReturn == TRUE )
        {
            // Create bottom view
            bReturn = 
                m_omRootSplitter.CreateView( defTX_FUNC_VIEW_ROW,
                                        defTX_FUNC_VIEW_COL,
                                        RUNTIME_CLASS(CTxFunctionsView),
                                        omSize,
                                        pContext );
        }

        //if successful
        if( bReturn == TRUE )
        {
            // Create Message blocks view splitter
            bReturn = 
                m_omLeftViewSplitter.CreateView( defTX_BLOCKS_VIEW_ROW,
                                        defTX_BLOCKS_VIEW_COL,
                                        RUNTIME_CLASS( CTxMsgBlocksView),
                                        omSize,pContext );
        }

        // Set the size of parent splitter
        if( bReturn == TRUE )
        {
            // Get Splitter information
            vGetSplitterStatus();
            // Set Splitter postion
            vSetSplitterPostion();
        }
    }
    return bReturn;
}