这篇教程C++ vEnableDisableButtons函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中vEnableDisableButtons函数的典型用法代码示例。如果您正苦于以下问题:C++ vEnableDisableButtons函数的具体用法?C++ vEnableDisableButtons怎么用?C++ vEnableDisableButtons使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了vEnableDisableButtons函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: Input/*******************************************************************************Function Name : OnInitDialogInput(s) :Output :Functionality : This function will be called during initialization of dialog box. This function will fill respective list controlsMember of : CSigWatchAddDelDlgFriend of : -Author(s) : Raja NDate Created : 25.03.2004*******************************************************************************/BOOL CSigWatchAddDelDlg::OnInitDialog(){ // Call parent's init function CDialog::OnInitDialog(); // Populate the message name combo // Clear the content if any m_omCombMessage.ResetContent(); // Create the Image List m_omImageList.Create(IDR_BMP_MSG_SIG_WATCH, 16, 1, defCOLOR_WHITE); if (m_podTempCallerList != NULL) { UINT unNoOfMainEntries = (UINT)m_podTempCallerList->GetCount(); if ( unNoOfMainEntries > 0 ) { // Add every message name into the message list POSITION pos = m_podTempCallerList->GetHeadPosition(); while (pos != NULL) { SMAINENTRY& sMainEntry = m_podTempCallerList->GetNext(pos); CString omMainEntryName = sMainEntry.m_omMainEntryName; CString omMainEntryId; omMainEntryId.Format(defSTR_MSG_ID_IN_HEX,sMainEntry.m_unMainEntryID); omMainEntryName = omMainEntryId + omMainEntryName; m_omCombMessage.AddString(omMainEntryName); } m_omCombMessage.SetCurSel(0); m_omListCtrlSignal.SetImageList(&m_omImageList, LVSIL_SMALL); // Create the first column. But this will not be shown m_omListCtrlSignal.InsertColumn( 0, STR_EMPTY, LVCFMT_LEFT, 0); //Width is zero as this will //be updated in vUpdateUnSelSubEntryList // Populate the list with signal names vPopulateUnSelSubEntryList(unGetSelectedMainEntryID()); m_omCombMessage.SetFocus(); } } // Update Signal Watch List // Set the same image list to this control m_omListCtrlSignalWatch.SetImageList(&m_omImageList,LVSIL_SMALL); // Create Column for Signal Watch Lsit m_omListCtrlSignalWatch.InsertColumn( 0, STR_EMPTY, LVCFMT_LEFT, 0);//Width is zero as this will //be updated in vPopulateSelSubEntryList vPopulateSelSubEntryList(); vEnableDisableButtons(); return FALSE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE}
开发者ID:vschander,项目名称:busmaster,代码行数:71,
示例2: Input/*******************************************************************************Function Name : OnBtnAddAllSubEntriesInput(s) : -Output : -Functionality : This function will be called by framework when the user selects "Add All" button.This will call "vAddSelSubEntries" to add all the signalsMember of : CSigWatchAddDelDlgFriend of : -Author(s) : Raja NDate Created : 25.03.2004Modification By : Modification on : *******************************************************************************/void CSigWatchAddDelDlg::OnBtnAddAllSubEntries() { // Add only the selected signals vAddSelSubEntries(TRUE); // Update button status vEnableDisableButtons();}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:21,
示例3: Input/*******************************************************************************Function Name : OnBtnAddAllSubEntriesInput(s) : -Output : -Functionality : This function will be called by framework when the user selects "Add All" button.This will call "vAddSelSubEntries" to add all the signalsMember of : CMainSubListDlgFriend of : -Author(s) : Raja NDate Created : 25.03.2004Modification By : Modification on : *******************************************************************************/void CMainSubListDlg::OnBtnAddAllSubEntries() { // Add only the selected signals vAddSelSubEntries(TRUE); // Update button status vEnableDisableButtons();}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:21,
示例4: Input/******************************************************************************* Function Name : OnButtonSelect Input(s) : - Output : - Functionality : This function will add the selected hardware in to the selected hardware list. Member of : CHardwareListing Author(s) : Raja N Date Created : 25.2.2005 Modifications :*******************************************************************************/void CHardwareListing::OnButtonSelect(){ int nSelected = m_nSelectedItem; // Insert the selected item in to the selected list int nItem = m_omSelectedHwList.GetItemCount(); CString omStrChannel;//(STR_EMPTY); CString omStrHardware; int nArrayIndex = -1; // Get the data // Format channel information omStrChannel.Format( defSTR_CHANNEL_NAME_FORMAT, defSTR_CHANNEL_NAME, nItem + 1 ); // Get the Hardware name omStrHardware = m_omHardwareList.GetItemText( nSelected, 0 ); // Get the array index nArrayIndex = (INT)m_omHardwareList.GetItemData( nSelected ); int nImageIndex = defDISCONNECTED_IMAGE_INDEX; // Insert the new item in to the selected list m_omSelectedHwList.InsertItem( nItem, omStrChannel, nImageIndex ); // Set the Hardware Name m_omSelectedHwList.SetItemText( nItem, 1, omStrHardware ); // Set the array index m_omSelectedHwList.SetItemData( nItem, nArrayIndex ); // Remove the item from the list m_omHardwareList.DeleteItem( nSelected ); //Sort Hardware Items vSortHardwareItems(); // Set the focus to the first item m_omHardwareList.SetItemState( 0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED ); // Update Button Status vEnableDisableButtons();}
开发者ID:cfz,项目名称:busmaster,代码行数:46,
示例5: Input/*******************************************************************************Function Name : OnSelChangeMessageNameInput(s) :Output :Functionality : This function will be called by framework when the message name combo box selection got changed. This will update the Signal Names List controlMember of : CWaveformSelectionDlgFriend of : -Author(s) : Raja NDate Created : 25.03.2004Modification By :Modification on :*******************************************************************************/void CWaveformSelectionDlg::OnSelChangeMessageName(){ UINT nMsgID=unGetSelectedMainEntryID(); m_fDefAmplitude=m_pWaveDataHandler->fGetMsgIDDefaultValue(nMsgID); vPopulateUnSelSubEntryList(unGetSelectedMainEntryID()); vEnableDisableButtons(); UpdateData(FALSE);}
开发者ID:redfoxhb,项目名称:busmaster,代码行数:22,
示例6: Input/******************************************************************************* Function Name : OnButtonRemove Input(s) : - Output : - Functionality : This function will remove the selected item from the selected hardware list. This will also insert the same in to the available list Member of : CHardwareListing Author(s) : Raja N Date Created : 21.2.2005 Modifications : Raja N on 17.03.2005 Added code to change channel ID of rest of items when a channel is deleted from the selected channel list*******************************************************************************/void CHardwareListing::OnButtonRemove(){ // Get the selected item from the list POSITION sPos = m_omSelectedHwList.GetFirstSelectedItemPosition(); if( sPos != NULL ) { int nSelectedItem = m_omSelectedHwList.GetNextSelectedItem(sPos); int nArrayIndex = (INT)m_omSelectedHwList.GetItemData( nSelectedItem ); int nImageIndex; nImageIndex = defDISCONNECTED_IMAGE_INDEX; // Insert this item in to the available list // Calculate new item index int nItemCount = m_omHardwareList.GetItemCount(); // Insert the new entry m_omHardwareList.InsertItem( nItemCount, m_omSelectedHwList.GetItemText( nSelectedItem, 1), nImageIndex ); // Set the hardware list index as item data. m_omHardwareList.SetItemData( nItemCount, nArrayIndex ); //Sort Hardware Items vSortHardwareItems(); // Remove the item from the selected list m_omSelectedHwList.DeleteItem( nSelectedItem ); // Change the channel text approp. int nItem = m_omSelectedHwList.GetItemCount(); // Check whether update is required or not if( nSelectedItem < nItem ) { // Format string CString omStrChannel; int nItemsToUpdate = nItem - nSelectedItem; // Loopt through list of items for( int nIndex = 0; nIndex < nItemsToUpdate; nIndex++ ) { // Update format string omStrChannel.Format( defSTR_CHANNEL_NAME_FORMAT, defSTR_CHANNEL_NAME, nSelectedItem + nIndex + 1 ); // Update Text m_omSelectedHwList.SetItemText( nSelectedItem + nIndex, 0, omStrChannel ); } } // Update UI button status vEnableDisableButtons(); }}
开发者ID:Elcheikh,项目名称:busmaster,代码行数:67,
示例7: Input/****************************************************************************** Function Name : OnItemchangedHWList Input(s) : Address of an NM_LISTVIEW structure that identifies the item that has changed and specifies its previous and new states Output : - Functionality : This function will be called by the framework when the user selects an item from the Hw List. This will update selected Hw details Member of : CHardwareListing Author(s) : Raja N Date Created : 08.09.2004 Modifications : Raja N on 14.03.2005, Modified to get item data for getting actual index.******************************************************************************/void CHardwareListing::OnItemchangedHWList(NMHDR* pNMHDR, LRESULT* pResult){ NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; // If it is a selection change update the hardware details if(pNMListView->uNewState & LVIS_SELECTED){ // Get the selected Item index m_nSelectedItem = pNMListView->iItem; // Update selected Hw details vUpdateHwDetails( (INT)m_omHardwareList.GetItemData( m_nSelectedItem ) ); } // Update Button Status vEnableDisableButtons(); *pResult = 0;}
开发者ID:dizmal,项目名称:busmaster,代码行数:29,
示例8: vUpdateHwDetailsvoid CHardwareListing::OnNMClickLstcSelectedHwList(NMHDR* pNMHDR, LRESULT* pResult){ //NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; // Update UI Buttons NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; // If it is a selection change update the hardware details INT nSelectedItem = pNMListView->iItem; if(nSelectedItem > -1){ // Update selected Hw details vUpdateHwDetails( (INT)m_omSelectedHwList.GetItemData( nSelectedItem ) ); } vEnableDisableButtons(); *pResult = 0;}
开发者ID:dizmal,项目名称:busmaster,代码行数:14,
示例9: Input/******************************************************************************* Function Name : vHandleConnectionStatusChange Input(s) : bConnectionStatus - Status of the tool connection. TRUE if the tool is going to connected state Output : - Functionality : This function will handle connect event. This will disable not supported UI controls if the tool is going to connected state. This will also set the graph to Run mode. The update timer will be started during connect state. During disconnect this function will bring back the graph control to normal mode and will kill the update timer. Member of : CGraphBottomView Author(s) : Raja N Date Created : 10/12/2004 Modifications : Raja N on 14.12.2004, Implemented review comments*******************************************************************************/void CGraphBottomView::vHandleConnectionStatusChange(BOOL bConnectStatus){ // Tool is going to connect state vEnableDisableButtons( bConnectStatus ); CGraphChildFrame* pParentWnd = NULL; pParentWnd = (CGraphChildFrame*)pomGetParentWindow(); //Update Graph right view CGraphRightView* pRightView = (CGraphRightView*)pParentWnd->pomGetRightTopViewPointer(); pRightView->vHandleConnectionStatusChange(bConnectStatus); // Create/ Delete Update Timer if( bConnectStatus == TRUE ) { // Go To Run Mode //m_podGraphControl->GoToRunMode(); CGraphList* podList = NULL; if(pParentWnd != NULL) { pParentWnd->m_pomBottomView = this; } if(pParentWnd != NULL) { podList = pParentWnd->pGetSignalListDetails(); } else { return; } //int nTimeDelay = podList->m_odGraphParameters.m_nRefreshRate; //nTimerID = SetTimer( defUPDATE_TIMER_ID , nTimeDelay, NULL ); } else { // Go To Normal Mode //m_podGraphControl->GoToNormalMode(); // Check for valid timer handle if( nTimerID != 0 ) { // Kill Display Update Timer KillTimer( nTimerID ); } }}
开发者ID:bentearadu,项目名称:busmaster,代码行数:64,
示例10: omFileDlg/** * /req RS_19_03 It shall be possible to add / remove any log file from the input data source set * * This function will be called when user selects Add button. * This will show file selection dialog to select replay file * and if the selection is valid this will add the selected file * in to the replay file list. */void CReplayFileConfigDlg::OnBtnAddFile(){ // Throw File selection dialog to choose replay log file DWORD dwFlags = OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_EXTENSIONDIFFERENT; CFileDialog omFileDlg( TRUE, defSTR_LOG_FILE_EXTENSION, NULL, dwFlags, defLOG_FILTER, NULL ); //Set the caption omFileDlg.m_ofn.lpstrTitle = _(defSTR_REPLAY_FILE_SELECTION_TITLE); // Show File open dialog if( omFileDlg.DoModal() == IDOK ) { CReplayFile ouNewReplayFile; // Assign the file name and leave the rest to default ouNewReplayFile.m_omStrFileName = omFileDlg.GetPathName(); // Add the data in to the replay file data list m_rouManager.m_omReplayFiles.Add( ouNewReplayFile ); // Insert this new item in to the list // Avoid UI update m_bUpdating = TRUE; // Get the size of the list int nIndex = m_omLstcReplayFiles.GetItemCount(); // Insert at the end m_omLstcReplayFiles.InsertItem( nIndex, ouNewReplayFile.m_omStrFileName, defREPLAY_FILE_IMAGE_INDEX ); // Update the checkbox status m_omLstcReplayFiles.SetCheck( nIndex, ouNewReplayFile.m_bEnabled ); // This is the first item then enable Replay File components if( nIndex == 0 ) { vEnableDisableButtons(); } // Set the selection to this new item // Enable UI Update m_bUpdating = FALSE; m_omLstcReplayFiles.SetItemState( nIndex, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED ); }}
开发者ID:Mariale13,项目名称:UDS_Protocol,代码行数:52,
示例11: vInterPretSignalNameMsgIDvoid CWaveformSelectionDlg::OnNMDblclkLstcSignalWatch(NMHDR* /*pNMHDR*/, LRESULT *pResult){ // Get the selected signal Name sWaveformInfo objWaveInfo; CString strSignalName; UINT nMsgID = (UINT)-1; vInterPretSignalNameMsgID(m_omListCtrlSignalWatch.GetItemText( m_omListCtrlSignalWatch.GetSelectionMark() , 0), strSignalName, nMsgID); m_pWaveDataHandler->bGetSignalWavePatternDetails(nMsgID, strSignalName, objWaveInfo); DefineUpdateWave(&m_omListCtrlSignalWatch, nMsgID, strSignalName, objWaveInfo); vPopulateUnSelSubEntryList(unGetSelectedMainEntryID()); vPopulateSelSubEntryList(); // Update button status vEnableDisableButtons(); *pResult = 0;}
开发者ID:redfoxhb,项目名称:busmaster,代码行数:19,
示例12: bCreateImageList/** * /return FALSE - If focus is set to Any UI control explicitly * * Initialises dialog's UI components */BOOL CReplayFileConfigDlg::OnInitDialog(){ CDialog::OnInitDialog(); // Create Image List used in UI List bCreateImageList(); // Create Replay Files UI List vCreateReplayFileList(); // To Create Replay Components vCreateReplayCopms(); // Init Replay Components vInitReplayCopms(); // Init Replay List vInitReplayFileList(); // Update Button Status vEnableDisableButtons(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE}
开发者ID:redfoxhb,项目名称:busmaster,代码行数:24,
示例13: AfxMessageBox/** * /req RS_19_03 It shall be possible to add / remove any log file from the input data source set * * This functuion will handle Delete button event. This will get * delete conformation from the user and will remove the * selected replay file from the list if user conforms. */void CReplayFileConfigDlg::OnBtnDeleteFile(){ if( m_nSelecetedNamedLogIndex != -1 && m_nSelecetedNamedLogIndex < m_rouManager.m_omReplayFiles.GetSize() ) { // Ask user about file delete int nResult = AfxMessageBox( _(defSTR_DELETE_CONFORMATION), MB_YESNO|MB_ICONQUESTION ) ; if ( nResult == IDYES ) { // Avoid UI update m_bUpdating = TRUE; // Remove the item from the list m_omLstcReplayFiles.DeleteItem( m_nSelecetedNamedLogIndex ); // Remove the item from data list m_rouManager.m_omReplayFiles.RemoveAt( m_nSelecetedNamedLogIndex ); // Set the focus to the next available item int nSize = m_omLstcReplayFiles.GetItemCount(); if( m_nSelecetedNamedLogIndex > ( nSize - 1 ) ) { m_nSelecetedNamedLogIndex = nSize - 1; } // Enable UI Update m_bUpdating = TRUE; if( m_nSelecetedNamedLogIndex != -1 ) { // Set the selection m_omLstcReplayFiles.SetItemState( m_nSelecetedNamedLogIndex, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED ); } else { // Update Button Status vEnableDisableButtons(); } } }}
开发者ID:Mariale13,项目名称:UDS_Protocol,代码行数:46,
注:本文中的vEnableDisableButtons函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ vParTestSetLED函数代码示例 C++ vCreateSuicidalTasks函数代码示例 |