• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pomGetParentWindow函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中pomGetParentWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ pomGetParentWindow函数的具体用法?C++ pomGetParentWindow怎么用?C++ pomGetParentWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pomGetParentWindow函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Input

/*******************************************************************************
  Function Name  : OnInitialUpdate
  Input(s)       : -
  Output         : -
  Functionality  : Initialised UI Controls for the first time show
  Member of      : CGraphLeftView
  Author(s)      : Raja N
  Date Created   : 09/12/2004
  Modifications  :
*******************************************************************************/
void CGraphLeftView::OnInitialUpdate()
{
    // Call parent class to do init
    CFormView::OnInitialUpdate();
    // Create List Control
    m_omSignalList.DeleteAllItems();
    // Enable grid lines and full row selection
    m_omSignalList.SetExtendedStyle( LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT );

    m_omSignalList.InsertColumn( defCOL_CATOGORY_INDEX,
                                 _(defSTR_LIST_HEADING_CATOGORY) );
    m_omSignalList.SetColumnWidth( defCOL_CATOGORY_INDEX,
                                   defCOL_CATOGORY_WIDTH );
    m_omSignalList.InsertColumn(  defCOL_ELEMENT_INDEX,
                                  _(defSTR_LIST_HEADING_ELEMENT) );
    m_omSignalList.SetColumnWidth( defCOL_ELEMENT_INDEX,
                                   defCOL_ELEMENT_WIDTH);
    m_omSignalList.InsertColumn( defCOL_TYPE_INDEX,
                                 _(defSTR_LIST_HEADING_TYPE) );
    m_omSignalList.SetColumnWidth( defCOL_TYPE_INDEX,
                                   defCOL_TYPE_WIDTH );
    mParentWnd = (CGraphChildFrame*)(pomGetParentWindow());
    // Remove Automatic Text from the color popup

    // Register this to child window
    CWnd* pWnd = nullptr;
    pWnd = pomGetParentWindow();
    if( pWnd != nullptr )
    {
        // Register view pointer
        (static_cast<CGraphChildFrame*>(pWnd))->m_pomLeftView = this;
        // Get Graph Control Pointer
        m_pDMGraphCtrl = (static_cast<CGraphChildFrame*>(pWnd))->m_pDMGraphCtrl;
    }
}
开发者ID:BlackVodka,项目名称:busmaster,代码行数:45,代码来源:GraphLeftView.cpp


示例2: Input

/*******************************************************************************
  Function Name  : OnInitialUpdate
  Input(s)       : -
  Output         : -
  Functionality  : This function will be called by the framework during initial
                   show of this view. This function will register iteself in to
                   parent window class so that other views shall access it.
  Member of      : CTxFunctionsView
  Author(s)      : Raja N
  Date Created   : 26.4.2005
  Modifications  :
*******************************************************************************/
void CTxFunctionsView::OnInitialUpdate()
{
    CFormView::OnInitialUpdate();
    // Update View pointer in to the child frame
    // Get Child Window Pointer
    CWnd* pWnd = NULL;
    // Get Parent window pointer
    pWnd = pomGetParentWindow();
    // Update view pointer
    if( pWnd != NULL )
    {
        // Register this view pointer
        ((CTxMsgChildFrame*)pWnd)->vSetTxMsgViewPointers( eTxMsgFunctionsView,
                this );
    }
    // Disable Update Button
    m_omButtonApply.EnableWindow( FALSE );

    if(CTxWndDataStore::ouGetTxWndDataStoreObj().m_bAutoSavedEnabled)
    {
        m_CheckBoxAutoUpdate.SetCheck(BST_CHECKED);
        GetDlgItem(IDC_BTN_UPDATE)->EnableWindow(FALSE);
        OnBnClickedCheckAutoUpdate();                   //call this function exclusively
    }
    else
    {
        m_CheckBoxAutoUpdate.SetCheck(BST_UNCHECKED);
        GetDlgItem(IDC_BTN_UPDATE)->EnableWindow(TRUE);
    }
}
开发者ID:bagge,项目名称:busmaster,代码行数:42,代码来源:TxFunctionsView.cpp


示例3: Input

/*******************************************************************************
  Function Name  : OnInitialUpdate
  Input(s)       : -
  Output         : FALSE - If focus is set to Any UI control explicitly
  Functionality  : Initialises dialog's UI components
  Member of      : CGraphBottomView
  Author(s)      : Raja N
  Date Created   : 10/12/2004
  Modifications  : Raja N on 15.12.2004, Added code to check graph control
                   proper load by checking the window handle
*******************************************************************************/
void CGraphBottomView::OnInitialUpdate()
{
    // Call Parent windows Update
    CFormView::OnInitialUpdate();
    // Load Icons from direction buttons
    m_omBtnUp.SetIcon(AfxGetApp()->LoadIcon(MAKEINTRESOURCE(IDI_ICON_UP)));
    m_omBtnDown.SetIcon(AfxGetApp()->LoadIcon(MAKEINTRESOURCE(IDI_ICON_DOWN)));
    m_omBtnLeft.SetIcon(AfxGetApp()->LoadIcon(MAKEINTRESOURCE(IDI_ICON_LEFT)));
    m_omBtnRight.SetIcon(AfxGetApp()->LoadIcon(MAKEINTRESOURCE(IDI_ICON_RIGHT)));
    //CGraphList * podList = NULL;
    CGraphChildFrame* pParentWnd = NULL;
    pParentWnd = (CGraphChildFrame*)pomGetParentWindow();
    pParentWnd->m_pomBottomView = this;
    // Get Graph Control Pointer
    m_pDMGraphCtrl = pParentWnd->m_pDMGraphCtrl;
    // If window handle is invalid then init pointer with NULL
    /*if( m_opDMGraphCtrl != NULL &&
        IsWindow(m_opDMGraphCtrl->m_hWnd) == FALSE )
    {
        m_opDMGraphCtrl = NULL;
    }*/
    //Update initial values
    m_dblarrTime[0] = dRound(m_dblarrTime[0], 3);
    m_dblarrTime[1] = dRound(m_dblarrTime[1], 3);
    m_dblDeltaTime  = dRound(m_dblDeltaTime , 3);
    // Create List Control
    m_lstSignalDetails.DeleteAllItems();
    //Set List Control styles
    m_lstSignalDetails.SetExtendedStyle
    (LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT  );
    //Create Columns
    vCreateColumns();
}
开发者ID:Ferrere,项目名称:busmaster,代码行数:44,代码来源:GraphBottomView.cpp


示例4: Input

/*******************************************************************************
  Function Name  : vEnableDisableControls
  Input(s)       : -
  Output         : -
  Functionality  : This function will update UI control as per the selection in
                   the element UI list and connection status
  Member of      : CGraphLeftView
  Author(s)      : Raja N
  Date Created   : 09/12/2004
  Modifications  :
*******************************************************************************/
void CGraphLeftView::vEnableDisableControls()
{
    CGraphList* podList = NULL;
    CGraphChildFrame* pParentWnd = NULL;
    pParentWnd = (CGraphChildFrame*)pomGetParentWindow();

    if(pParentWnd != NULL)
    {
        podList = pParentWnd->pGetSignalListDetails();
    }
    else
    {
        return;
    }

    // Update UI Elements
    if( podList != NULL )
    {
        if( podList->m_omElementList.GetSize() > 0 &&
                m_omSignalList.GetSelectedCount() > 0 )
        {
            vEnableControls( TRUE );
        }
        else
        {
            vEnableControls( FALSE );
        }
    }

    //SGW Code commented by Arun 21-10-2010
}
开发者ID:Ferrere,项目名称:busmaster,代码行数:42,代码来源:GraphLeftView.cpp


示例5: Input

/*******************************************************************************
  Function Name  : vUpdateSignalData
  Input(s)       : -
  Output         : -
  Functionality  : This function will update signal data based on cursor details.
  Member of      : CGraphBottomView
  Author(s)      : ArunKumar K
  Date Created   : 22/12/2010
  Modifications  : ArunKumar K, 24/12/2010
                   Made the dblDiff to contain only modulus of difference.
*******************************************************************************/
void CGraphBottomView::vUpdateSignalData()
{
    if ( m_pDMGraphCtrl == NULL )
    {
        return;
    }

    CGraphChildFrame* pParentWnd = NULL;
    pParentWnd = (CGraphChildFrame*)pomGetParentWindow();
    double dblValue1 = 0, dblValue2 = 0, dblDiff;
    CString strValue1, strValue2, strDiffVal;

    if( m_dblarrTime[0] == 0 && m_dblarrTime[1] == 0 )
    {
        for( int nIndex = 0; nIndex < m_lstSignalDetails.GetItemCount(); nIndex++)
        {
            m_lstSignalDetails.SetItemText( nIndex, 3, STR_EMPTY);  //Cursor 1 value
            m_lstSignalDetails.SetItemText( nIndex, 4, STR_EMPTY);  //Cursor 2 value
            m_lstSignalDetails.SetItemText( nIndex, 5, STR_EMPTY); //Difference value
        }
        return;
    }

    for( int nIndex = 0; nIndex < m_lstSignalDetails.GetItemCount(); nIndex++)
    {
        dblValue1 = 0;
        dblValue2 = 0;
        m_pDMGraphCtrl->GetElementValueAtCursor( (short)nIndex, m_dblarrTime[0], &dblValue1);
        m_pDMGraphCtrl->GetElementValueAtCursor( (short)nIndex, m_dblarrTime[1], &dblValue2);

        dblDiff = dblValue2 - dblValue1;

        if( dblDiff < 0)
        {
            dblDiff = -dblDiff;
        }

        dRound(dblValue1, 3);
        dRound(dblValue2, 3);
        dRound(dblDiff, 3);

        strValue1.Format( _T("%.3lf") ,dblValue1);
        strValue2.Format( _T("%.3lf") ,dblValue2);
        strDiffVal.Format(_T("%.3lf") ,dblDiff);

        m_lstSignalDetails.SetItemText( nIndex, 3, strValue1);  //Cursor 1 value
        m_lstSignalDetails.SetItemText( nIndex, 4, strValue2);  //Cursor 2 value
        m_lstSignalDetails.SetItemText( nIndex, 5, strDiffVal); //Difference value
    }
}
开发者ID:bentearadu,项目名称:busmaster,代码行数:61,代码来源:GraphBottomView.cpp


示例6: pomGetParentWindow

CWnd* CTxMsgListView::pomGetFunctionsViewPointer() const
{
    CWnd* pView = nullptr;
    // Get Child Frame Pointer
    CWnd* pWnd = nullptr;
    pWnd = pomGetParentWindow();
    // Get View Pointer
    if( pWnd != nullptr )
    {
        pView = ((CTxMsgChildFrame*)pWnd)->pomGetTxMsgViewPointers(
                    eTxMsgFunctionsView );
    }
    // Return View pointer
    return pView;
}
开发者ID:sgnes,项目名称:busmaster,代码行数:15,代码来源:TxMsgListView.cpp


示例7: Input

/*******************************************************************************
  Function Name  : OnInitialUpdate
  Input(s)       : -
  Output         : -
  Functionality  : Initialises UI components
  Member of      : CGraphRightView
  Author(s)      : Raja N
  Date Created   : 12/12/2004
  Modifications  :
*******************************************************************************/
void CGraphRightView::OnInitialUpdate()
{
    // Call parent class handler
    CFormView::OnInitialUpdate();
    AfxEnableControlContainer();

    m_pParentWnd = (CGraphChildFrame*)pomGetParentWindow();

    //Get the CWnd reference to the DMGraph ActiveX control
    m_pWndGraphCtrl = GetDlgItem(IDC_DMGRAPH_CTRL);

    LPUNKNOWN pUnk = m_pWndGraphCtrl->GetControlUnknown();
    pUnk->QueryInterface(IID_IDMGraphCtrl, (void**) &m_pDMGraphCtrl);
    if (  m_pDMGraphCtrl !=nullptr )
    {
        m_pParentWnd->m_pDMGraphCtrl = m_pDMGraphCtrl;
    }
    else
    {
        m_pParentWnd->m_pDMGraphCtrl = nullptr;
    }
    m_pParentWnd->m_pomRightView = this;
}
开发者ID:BlackVodka,项目名称:busmaster,代码行数:33,代码来源:GraphRightView.cpp


示例8: OnInitialUpdate

void CTxMsgListView::OnInitialUpdate()
{
    CFormView::OnInitialUpdate();
    // Initialise window pointer in the Tx child window
    CTxMsgChildFrame* pomChildFrame =
        (CTxMsgChildFrame* )pomGetParentWindow();
    // Update View Pointer
    if( pomChildFrame != nullptr )
    {
        pomChildFrame->vSetTxMsgViewPointers( eTxMsgMessageListView, this );
    }
    // set Init flag to TRUE
    m_bInitDlg = TRUE;

    // Init Message List Control
    CRect rListCtrlRect;
    CHAR caColumnName[defMESSAGE_FRAME_COLUMN][defSTRING_SIZE] =
    {
        defMESSAGE_ID,
        defSTR_CHANNEL_NAME,
        defMESSAGE_TYPE,
        defMESSSAGE_DLC,
        defMESSAGE_DATA_BYTES
    };
    //Calculate the total size of all column header
    m_omLctrMsgList.GetWindowRect( &rListCtrlRect);
    int nTotalColunmSize     = rListCtrlRect.right - rListCtrlRect.left;
    int nTotalStrLengthPixel = 0;

    int i;  //i declared outside the for loop
    for( i=0; i<defMESSAGE_FRAME_COLUMN; i++)
    {
        nTotalStrLengthPixel +=
            m_omLctrMsgList.GetStringWidth(caColumnName[i]) ;
    }
    //Insert each column name after calculating the size for the same.
    INT nFormat = 0;
    for(i=0; i<defMESSAGE_FRAME_COLUMN; i++)
    {
        int nColumnSize  = m_omLctrMsgList.GetStringWidth(_(caColumnName[i])) ;
        nColumnSize +=
            (nTotalColunmSize-nTotalStrLengthPixel)/defMESSAGE_FRAME_COLUMN;
        nFormat = LVCFMT_CENTER;
        // Switch Column Index
        switch( i )
        {
            case defMESSAGE_FRAME_COLUMN - 1 : // Data Bytes Column
                nColumnSize += static_cast <INT>(4.25*defDATA_BYTES_EXTRA);
                nFormat = LVCFMT_LEFT;
                break;
            case 0: // Message ID / Name Column. Don't alter this column
                break;
            case 1: // Channels Column
                nColumnSize -= static_cast <INT>(2.2*defDATA_BYTES_EXTRA);
                break;
            default: // Others
                nColumnSize -= static_cast <INT>(1.1*defDATA_BYTES_EXTRA );
        }
        // Insert the column in to the list
        m_omLctrMsgList.InsertColumn(i,_(caColumnName[i]),
                                     nFormat, nColumnSize);
    }
    // Set extended property
    // Enable Check box
    m_omLctrMsgList.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES );

    // Associate image list to the list item
    // Create only onece
    if( m_omImageList.m_hImageList == nullptr )
    {
        m_omImageList.Create( IDR_BMP_MSGSGDB,
                              defSIGNAL_ICON_SIZE,
                              1,
                              WHITE_COLOR );
    }
    // Set the Image List
    // Only if it is sucessfully created
    if( m_omImageList.m_hImageList != nullptr )
    {
        m_omLctrMsgList.SetImageList( &m_omImageList, LVSIL_SMALL);
    }
    // Associate Header control Image List
    if( m_omHeaderImageList.m_hImageList == nullptr )
    {
        m_omHeaderImageList.Create( IDR_BMP_CHECKBOX,
                                    defSIGNAL_ICON_SIZE,
                                    1,
                                    BLUE_COLOR );
    }
    // Set the Image List
    // Only if it is sucessfully created
    if( m_omHeaderImageList.m_hImageList != nullptr )
    {
        CHeaderCtrl* pHeader = m_omLctrMsgList.GetHeaderCtrl();
        if( pHeader != nullptr )
        {
            pHeader->SetImageList( &m_omHeaderImageList );
            HDITEM hditem;
            hditem.mask = HDI_IMAGE | HDI_FORMAT;
            if( pHeader->GetItem(0, &hditem ) == TRUE )
//.........这里部分代码省略.........
开发者ID:sgnes,项目名称:busmaster,代码行数:101,代码来源:TxMsgListView.cpp



注:本文中的pomGetParentWindow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pomlog函数代码示例发布时间:2022-05-30
下一篇:
C++ polybench_prevent_dce函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap