当前位置: 首页>>代码示例>>C++>>正文


C++ UpdateData函数代码示例

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


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

示例1: UpdateData

void CExtIdDetail::OnKillfocusStartDateEdit() 
{
	UpdateData(TRUE);
	validate_date( m_eStartDate, "Start Date" ); 
}
开发者ID:huilang22,项目名称:Projects,代码行数:5,代码来源:extiddetail.cpp

示例2: UpdateData

void CModifySoundSceneItemDlg::OnLoadramcheck() 
{
	// TODO: Add your control notification handler code here
	UpdateData( TRUE );
}
开发者ID:F5000,项目名称:spree,代码行数:5,代码来源:ModifySoundSceneItemDlg.cpp

示例3: BeginWaitCursor

void CAcctHierDlg::BuildEquip()  
{
	GAL_ERROR							hError;
	GAL_SISELECTION				lpSelectedObjects=NULL;
	GAL_SISELECTION				lpCurrentObject=NULL;

	BeginWaitCursor();
	for ( int index = 0 ; m_iParentLoc[ index ] != 0; index++ ) 
	{
		m_lpFSC = galNewFilterSortCriteria(GAL_SISELECTION_TYPE);
		if (galFilterSISelection_account_no( m_lpFSC, m_iParentLoc[ index ], GAL_FILTER_EQUAL, &hError) == GAL_FAILURE )
		{
		  GuiError(__FILE__, __LINE__, 
			   "Error in galFilterSISelection.");
		}
		if (galListSISelection(m_hAPI, 
							   m_lpFSC, "", m_iParentLoc[ index ], //DENqa09491
							   &m_nSelectedObjects, 
							   &lpSelectedObjects, 
							   &hError) != GAL_FAILURE)
		{
			// bail gracefully if there's more than FIND_ROW_COUNT service instances
			if (m_nSelectedObjects > m_iMaxAlaProducts)
			{
				CGuiMsg::GuiMessage( GUIMSG_HIERARCHY_SERVICE_INSTANCES_UNDISPLAYABLE);
				galDeleteObjects(lpSelectedObjects);
				return;
			}

			for ( lpCurrentObject = lpSelectedObjects;  
				  lpCurrentObject;
				  lpCurrentObject = ( GAL_SISELECTION ) galNextObject( lpCurrentObject ))
			{
				galGetSISelection_external_id(lpCurrentObject, m_textExtId, &hError );
				galGetSISelection_account_no( lpSelectedObjects, &m_iAccountNo, &hError);
				 //CAMqa58078
                                galGetSISelection_equip_status(lpCurrentObject, &m_iEquipStatus, &hError);
                                //CAMqa58078
				m_tvstruct.hParent = m_rghItem[ index ];
				m_tvstruct.hInsertAfter = TVI_LAST;
				char tempExtId[GAL_SISELECTION_EXTERNAL_ID_LEN*2];
				strcpy(tempExtId, ArbI18N::translateFromUTF8(m_textExtId));
				 //CAMqa58078
                                if (m_iEquipStatus == 2 )
								{
									strcpy(tempExtId, ArbI18N::translateFromUTF8(m_textExtId));//CAMqa72212
									m_tvstruct.item.pszText = strcat(tempExtId, GetIntlString(IDS_DISCONNECTED)); //CAMqa84527
									
								}
                                /*else if(m_iEquipStatus > 0 )
								{
									strcpy(tempExtId, ArbI18N::translateFromUTF8(m_textExtId));//CAMqa72212
									m_tvstruct.item.pszText = strcat(tempExtId, GetIntlString(IDS_DISCONNECTION_REQ)); //CAMqa84527
									
								}*/
                                else
                                //CAMqa58078 
				m_tvstruct.item.pszText = tempExtId;					  
				m_tvstruct.item.mask = TVIF_TEXT | TVIF_IMAGE |TVIF_SELECTEDIMAGE;
				m_tvstruct.item.iImage = 3; //Bitmap index returned from Add function in oninitdialog
				m_tvstruct.item.iSelectedImage = 3;
				m_rghItem[m_iParsedItem]= m_TreeHier.InsertItem( &m_tvstruct );
				m_TreeHier.EnsureVisible( m_rghItem[m_iParsedItem] );
				m_iParsedItem++;
			}
		  if( lpSelectedObjects )
			  galDeleteObjects(lpSelectedObjects);   
		  lpSelectedObjects = NULL;
		}
		else
		  GuiError(__FILE__, __LINE__,
			   "Could not set Account List.");
		galDeleteFilterSortCriteria(m_lpFSC);
	}

	UpdateData( FALSE ); 
	EndWaitCursor();

}
开发者ID:huilang22,项目名称:Projects,代码行数:79,代码来源:accthierdlg.cpp

示例4: zero_Arbdate


//.........这里部分代码省略.........
				tvstruct.hParent = m_rghItem[iLocateIndex];
				tvstruct.hInsertAfter = TVI_LAST;
				char	tmpAlaExtId[GAL_PPCOMPONENTELEM_DESCRIPTION_TEXT_LEN];//CAMqa72212
				strcpy(tmpAlaExtId, ArbI18N::translateFromUTF8(textAlaExtId));
				if( ( Arbdate_compare(&m_ibilling_inactive_dt, &nullDate) !=0 )
					&& (Arbdate_compare(&m_ibilled_thru_dt, &nullDate) !=0 )
					&& (Arbdate_compare(&m_ibilling_inactive_dt, &m_ibilled_thru_dt) ==0 ) )
				{
					strcpy(tmpAlaExtId, ArbI18N::translateFromUTF8(textAlaExtId));
					tvstruct.item.pszText = strcat(tmpAlaExtId, GetIntlString(IDS_DISCONNECTED));
				}
				if( ( Arbdate_compare(&m_ibilling_inactive_dt, &nullDate) !=0 )
					 && (Arbdate_compare(&m_ibilling_inactive_dt, &m_ibilled_thru_dt) !=0 ) )
				{
					strcpy(tmpAlaExtId, ArbI18N::translateFromUTF8(textAlaExtId));
					tvstruct.item.pszText = strcat(tmpAlaExtId, GetIntlString(IDS_DISCONNECTION_REQ));
				}
				else
					tvstruct.item.pszText = tmpAlaExtId;					  
					tvstruct.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
					tvstruct.item.iImage = 9;
					tvstruct.item.iSelectedImage = 9;
					m_rghItem[m_iParsedItem]= m_TreeHier.InsertItem( &tvstruct );
					m_TreeHier.EnsureVisible( m_rghItem[m_iParsedItem] );
					m_iParsedItem++;
					memset( textAlaExtId ,0 , sizeof( textAlaExtId));              
			}
			if( lpSelectedObjects )
				galDeleteObjects(lpSelectedObjects);
			lpSelectedObjects = NULL;
		}
		else
			GuiError(__FILE__, __LINE__,
				 "Could not set AlaCart List.");
	}

	for ( int iLocateInd = 0 ; m_iParentLoc[iLocateInd] != 0 ; iLocateInd++ )
	{
		if ( galListAlacarteAccountEMF(m_hAPI, 
									   m_iParentLoc[iLocateInd],  
									   &m_nSelectedObjects, 
									   &lpSelectedObjects, 
									   &m_lpError) != GAL_FAILURE)
		{
			// bail gracefully if there's more than FIND_ROW_COUNT product instances
			if (m_nSelectedObjects + iMyCount > m_iMaxAlaProducts)
			{
				CGuiMsg::GuiMessage( GUIMSG_HIERARCHY_PRODUCTS_UNDISPLAYABLE);
				galDeleteObjects(lpSelectedObjects);
				return;
			}

			for ( lpCurrentObject = lpSelectedObjects;  
				  lpCurrentObject;
				  lpCurrentObject = ( GAL_PPCOMPONENTELEM ) galNextObject( lpCurrentObject ))
			{
				galGetPPComponentElem_description_text( lpCurrentObject, textAlaExtId, &m_lpError);
				galGetPPComponentElem_product_status(lpCurrentObject,&m_iProductStatus, &m_lpError);
				galGetPPComponentElem_product_stop(lpCurrentObject,&m_ibilling_inactive_dt, &m_lpError);
				galGetPPComponentElem_date_rc_billed_through(lpCurrentObject,&m_ibilled_thru_dt, &m_lpError);
                
				tvstruct.hParent = m_rghItem[iLocateInd];
				tvstruct.hInsertAfter = TVI_LAST;
				char	tmpAlaExtId[GAL_PPCOMPONENTELEM_DESCRIPTION_TEXT_LEN];
				strcpy(tmpAlaExtId, ArbI18N::translateFromUTF8(textAlaExtId));
				
                if( ( Arbdate_compare(&m_ibilling_inactive_dt, &nullDate) !=0 )
					&& (Arbdate_compare(&m_ibilled_thru_dt, &nullDate) !=0 )
					&& (Arbdate_compare(&m_ibilling_inactive_dt, &m_ibilled_thru_dt) ==0 ) )
				{
					strcpy(tmpAlaExtId, ArbI18N::translateFromUTF8(textAlaExtId));
					tvstruct.item.pszText = strcat(tmpAlaExtId, GetIntlString(IDS_DISCONNECTED));
				}
				if( ( Arbdate_compare(&m_ibilling_inactive_dt, &nullDate) !=0 )
					 && (Arbdate_compare(&m_ibilling_inactive_dt, &m_ibilled_thru_dt) !=0 ) )
				{
					strcpy(tmpAlaExtId, ArbI18N::translateFromUTF8(textAlaExtId));
					tvstruct.item.pszText = strcat(tmpAlaExtId, GetIntlString(IDS_DISCONNECTION_REQ));
				}
                else
					tvstruct.item.pszText = tmpAlaExtId;					  
					tvstruct.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
					tvstruct.item.iImage = 9;
					tvstruct.item.iSelectedImage = 9;
					m_rghItem[m_iParsedItem]= m_TreeHier.InsertItem( &tvstruct );
					m_TreeHier.EnsureVisible( m_rghItem[m_iParsedItem] );
					m_iParsedItem++;
					memset( textAlaExtId ,0 , sizeof( textAlaExtId));              
			}
			if( lpSelectedObjects )
				galDeleteObjects(lpSelectedObjects);
			lpSelectedObjects = NULL;
		}
		else
			GuiError(__FILE__, __LINE__,
				 "Could not set AlaCart List.");
	}
	UpdateData( FALSE ); 

}
开发者ID:huilang22,项目名称:Projects,代码行数:101,代码来源:accthierdlg.cpp

示例5: UpdateData

void CDfuFileMgrDlgExtract::OnButtonextract() 
{
	if (m_hFile==0)
		return;

	int Sel=m_ListFiles.GetCurSel();

	if (Sel==-1)
		return;

	UpdateData(TRUE);

	HANDLE Image;

	if (STDFUFILES_ReadImageFromDFUFile(m_hFile, Sel, &Image)==STDFUFILES_NOERROR)
	{
		BYTE Alt;

		STDFUFILES_GetImageAlternate(Image, &Alt);

		CString FileName;
		FileName.Format("%s_%02i", m_FileBaseName, Alt);
		CString sFile;

		if (m_ExtractFormat==2) 
		{
			DWORD NbEl;

			if (STDFUFILES_GetImageNbElement(Image, &NbEl)==STDFUFILES_NOERROR)
			{
				CString Status;
				BOOL bSuccess=TRUE;

				for (DWORD i=0;i<NbEl;i++)
				{
					DFUIMAGEELEMENT Element={0};

					if (STDFUFILES_GetImageElement(Image, i, &Element)==STDFUFILES_NOERROR)
					{
						Element.Data=new BYTE[Element.dwDataLength];

						if (STDFUFILES_GetImageElement(Image, i, &Element)==STDFUFILES_NOERROR)
						{
							CFile File;
							CFileException ex;

							sFile.Format("%s_%08X.bin", FileName, Element.dwAddress);
							if (File.Open(sFile, CFile::modeCreate | CFile::modeWrite, &ex))
							{
								File.Write(Element.Data, Element.dwDataLength);
								File.Close();
								Status=Status+sFile;
								Status+=" was created !\n";
							}
							else
							{
								CString Err;
								bSuccess=FALSE;
								Err.Format("IoError %08xh", ex.m_lOsError);
								AfxMessageBox(Err);
								delete[]Element.Data;
								break;
							}
						}
						else
						{
							AfxMessageBox("Unable to access element in image...");
							bSuccess=FALSE;
							delete[]Element.Data;
							break;
						}
						delete[]Element.Data;
					}
					else
					{
						AfxMessageBox("Unable to access element in image...");
						bSuccess=FALSE;
						break;
					}
				}
				if (bSuccess)
					AfxMessageBox(Status);
			}
			else
				AfxMessageBox("Unable to access element in image...");
		}
		else
		{
			if (m_ExtractFormat==0) 
				FileName+=".s19";
			else
			if (m_ExtractFormat==1)
				FileName+=".hex";
			if (STDFUFILES_ImageToFile((LPSTR)(LPCSTR)FileName, Image)==STDFUFILES_NOERROR)
			{
				FileName+=" was created !";
				AfxMessageBox(FileName);
			}
			else
				AfxMessageBox("Error while creating file...");
//.........这里部分代码省略.........
开发者ID:LordOfDorks,项目名称:security-1,代码行数:101,代码来源:DfuFileMgrDlgExtract.cpp

示例6: UpdateData

void CModelessDialog::OnOK()
{
 UpdateData(); //for DDX/DDV
 //не вызываем реализацию базового класса чтобы диалог нельзя было закрыть 
} 
开发者ID:fredcooke,项目名称:secu3man,代码行数:5,代码来源:DialogWithAccelerators.cpp

示例7: UpdateData

LRESULT COutputPage::OnWizardNext()
{
    UpdateData();

    if ( m_sFolder.IsEmpty() )
    {
        AfxMessageBox( IDS_OUTPUT_NEED_FOLDER, MB_ICONEXCLAMATION );
        m_wndFolders.SetFocus();
        return -1;
    }

    if ( GetFileAttributes( CString( _T("\\\\?\\") ) + m_sFolder ) == 0xFFFFFFFF )
    {
        CString strFormat, strMessage;

        strFormat.LoadString( IDS_OUTPUT_CREATE_FOLDER );
        strMessage.Format( strFormat, (LPCTSTR)m_sFolder );

        if ( IDYES != AfxMessageBox( strMessage, MB_ICONQUESTION|MB_YESNO ) )
            return -1;

        if ( ! CreateDirectory( CString( _T("\\\\?\\") ) + m_sFolder, NULL ) )
        {
            strFormat.LoadString( IDS_OUTPUT_CANT_CREATE_FOLDER );
            strMessage.Format( strFormat, (LPCTSTR)m_sFolder );

            AfxMessageBox( IDS_OUTPUT_CANT_CREATE_FOLDER, MB_ICONEXCLAMATION );
            m_wndFolders.SetFocus();
            return -1;
        }
    }

    if ( m_sName.IsEmpty() )
    {
        AfxMessageBox( IDS_OUTPUT_NEED_FILE, MB_ICONEXCLAMATION );
        m_wndName.SetFocus();
        return -1;
    }

    if ( _tcsicmp( PathFindExtension( m_sName ), _T(".torrent") ) != 0 )
    {
        UINT nResp = AfxMessageBox( IDS_OUTPUT_EXTENSION, MB_ICONQUESTION|MB_YESNOCANCEL );

        if ( nResp == IDYES )
        {
            m_sName += _T(".torrent");
            UpdateData( FALSE );
        }
        else if ( nResp != IDNO )
        {
            m_wndName.SetFocus();
            return -1;
        }
    }

    CString strPath = m_sFolder + '\\' + m_sName;

    if ( GetFileAttributes( CString( _T("\\\\?\\") ) + strPath ) != INVALID_FILE_ATTRIBUTES )
    {
        CString strFormat, strMessage;

        strFormat.LoadString( IDS_OUTPUT_REPLACE_FILE );
        strMessage.Format( strFormat, (LPCTSTR)strPath );

        if ( IDYES != AfxMessageBox( strMessage, MB_ICONQUESTION|MB_YESNO ) )
            return -1;

        DeleteFile( CString( _T("\\\\?\\") ) + strPath );
    }

    if ( m_wndFolders.FindStringExact( -1, m_sFolder ) < 0 )
    {
        m_wndFolders.AddString( m_sFolder );

        CString strName;
        int nCount = theApp.GetProfileInt( _T("Folders"), _T("Count"), 0 );
        strName.Format( _T("%.3i.Path"), ++nCount );
        theApp.WriteProfileInt( _T("Folders"), _T("Count"), nCount );
        theApp.WriteProfileString( _T("Folders"), strName, m_sFolder );
    }

    theApp.WriteProfileString( _T("Folders"), _T("Last"), m_sFolder );
    theApp.WriteProfileInt( _T("Folders"), _T("AutoPieceSize"), m_bAutoPieces );
    theApp.WriteProfileInt( _T("Folders"), _T("SHA1"), m_bSHA1 );
    theApp.WriteProfileInt( _T("Folders"), _T("ED2K"), m_bED2K );
    theApp.WriteProfileInt( _T("Folders"), _T("MD5"), m_bMD5 );
    theApp.WriteProfileInt( _T("Folders"), _T("PieceSize"), m_nPieceIndex );

    return IDD_FINISHED_PAGE;
}
开发者ID:nlstone,项目名称:Shareaza,代码行数:90,代码来源:PageOutput.cpp

示例8: ASSERT

//эту функцию необходимо использовать когда надо занести данные в диалог
void CIdlRegPageDlg::SetValues(const SECU3IO::IdlRegPar* i_values)
{
 ASSERT(i_values);
 memcpy(&m_params,i_values, sizeof(SECU3IO::IdlRegPar));
 UpdateData(FALSE); //copy data from variables to dialog
}
开发者ID:ashabelnikov,项目名称:secu3man,代码行数:7,代码来源:IdlRegPageDlg.cpp

示例9: SetWizardButtons

BOOL COutputPage::OnSetActive()
{
    SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT );

    GET_PAGE( CWelcomePage, pWelcome );

    if ( pWelcome->m_nType == 0 )
    {
        GET_PAGE( CSinglePage, pSingle );

        CString strFile = pSingle->m_sFileName;

        if ( LPCTSTR pszSlash = _tcsrchr( strFile, '\\' ) )
        {
            m_sName = pszSlash + 1;
            m_sName += _T(".torrent");

            if ( m_sFolder.IsEmpty() )
                m_sFolder = strFile.Left( (int)( pszSlash - strFile ) );
        }
    }
    else
    {
        GET_PAGE( CPackagePage, pPackage );

        CString sName = pPackage->m_wndList.GetItemText( 0, 0 );

        // Get same part of first and last files
        int nCount = pPackage->m_wndList.GetItemCount();
        if ( nCount > 1 )
        {
            CString sName2 = pPackage->m_wndList.GetItemText( nCount - 1, 0 );
            LPCTSTR pszName1 = sName;
            LPCTSTR pszName2 = sName2;
            for ( int i = 0; *pszName1 && *pszName2; ++pszName1, ++pszName2, ++i )
            {
                if ( *pszName1 != *pszName2 )
                {
                    sName = sName.Left( i + 1 );
                    break;
                }
            }
        }

        // Use parent folder name as torrent name
        int nSlash = sName.ReverseFind( _T('\\') );
        if ( nSlash != -1 )
        {
            sName = sName.Left( nSlash );
            nSlash = sName.ReverseFind( _T('\\') );
            if ( nSlash != -1 )
            {
                m_sName = sName.Mid( nSlash + 1 ) + _T(".torrent");
            }
        }

        if ( m_sFolder.IsEmpty() )
            m_sFolder = theApp.GetProfileString( _T("Folders"), _T("Last") );
        if ( ! m_sFolder.IsEmpty() && m_sName.IsEmpty() )
        {
            m_sName = PathFindFileName( m_sFolder );
            m_sName += _T(".torrent");
        }
    }

    if ( ! theApp.m_sCommandLineDestination.IsEmpty() )
    {
        m_sFolder = theApp.m_sCommandLineDestination;
        theApp.m_sCommandLineDestination.Empty();

        Next();
    }

    UpdateData( FALSE );

    return CWizardPage::OnSetActive();
}
开发者ID:nlstone,项目名称:Shareaza,代码行数:77,代码来源:PageOutput.cpp

示例10: UpdateData

void CIdlRegPageDlg::OnChangeData()
{
 UpdateData();
 OnChangeNotify(); //notify event receiver about change of view content(see class ParamPageEvents)
}
开发者ID:ashabelnikov,项目名称:secu3man,代码行数:5,代码来源:IdlRegPageDlg.cpp

示例11: COleSafeArray


//.........这里部分代码省略.........
	m_StatusBar = (LPCSTR)"Instrument Found.";

	try
	{
		// Retrieve and display the instrument information.
		COleSafeArray* lpData = new COleSafeArray(pInstr->GetGet((LPCSTR)"Exchange,Product,ProdType,Contract"));

		// Test based on Alias property
		int alias = atoi((LPCSTR)pInstr->Alias);

		// Instantiate the TTOrderSet object. 
		m_pOrderSet.CreateInstance(__uuidof(XTAPI::TTOrderSet));

		// Set the TTOrderSelector to the Instrument so that P/L per contract
		// will be displayed.  Otherwise the overall P/L per user will be displayed.
		m_pOrderSet->OrderSelector = m_pInstrObj[alias]->CreateOrderSelector;

		m_pOrderSet->EnableFillCaching = 1;
		// Full qualified name: XTAPI::enumAvgOpenPriceMode::LIFO;
		m_pOrderSet->AvgOpenPriceMode = XTAPI::LIFO;

		// Attach the TTOrderSet to the TTInstrObj.
		m_pInstrObj[alias]->OrderSet = m_pOrderSet;
		// Open the TTOrderSet.
		m_pInstrObj[alias]->OrderSet->Open(0L);

		switch (alias)
		{
		case 0:
			lpData->GetElement(&index, &vData);	
			m_ExchangeBox1 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ProductBox1 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ProdTypeBox1 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ContractBox1 = CString(vData); 

			break;
		case 1:
			lpData->GetElement(&index, &vData);	
			m_ExchangeBox2 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ProductBox2 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ProdTypeBox2 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ContractBox2 = CString(vData); 

			break;
		case 2:
			lpData->GetElement(&index, &vData);	
			m_ExchangeBox3 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ProductBox3 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ProdTypeBox3 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ContractBox3 = CString(vData); 

			break;
		case 3:
			lpData->GetElement(&index, &vData);	
			m_ExchangeBox4 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ProductBox4 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ProdTypeBox4 = CString(vData); 

			lpData->GetElement(&++index, &vData);	
			m_ContractBox4 = CString(vData); 

			break;
		default:
			break;	
		}

		// delete the array
		delete lpData;
		lpData = NULL;
	}
	catch (_com_error err)
	{
		MessageBox(err.Description(), (LPCSTR)"Exception", 0);
	}

	// Call after updating the AFX_DATA fields
	UpdateData(false);
}
开发者ID:kshakhna,项目名称:CodeSamples_XTAPI_CPP,代码行数:101,代码来源:ProfitLossDialog.cpp

示例12: UpdateDataValueType

void
ObjectAccessor::buildPacket(Player *pl, Object *obj, UpdateDataMapType &update_players)
{
    UpdateDataMapType::iterator iter = update_players.find(pl);

    if( iter == update_players.end() )
    {
        std::pair<UpdateDataMapType::iterator, bool> p = update_players.insert( UpdateDataValueType(pl, UpdateData()) );
        assert(p.second);
        iter = p.first;
    }

    obj->BuildValuesUpdateBlockForPlayer(&iter->second, iter->first);
}
开发者ID:Sanzzes,项目名称:wopc-core,代码行数:14,代码来源:ObjectAccessor.cpp

示例13: Files

void CDfuFileMgrDlgExtract::OnButtonopen() 
{
	TCHAR szFilters[]=
    "Dfu Files (*.dfu)|*.dfu|All Files (*.*)|*.*||";

	char Path[MAX_PATH];
	char Tmp[MAX_PATH];
	char *pTmp;

	GetModuleFileName(NULL, Path, MAX_PATH);
	strrev(Path);
	pTmp = strchr(Path, '\\');
	strrev(pTmp);
	lstrcpy(Tmp, pTmp);
	lstrcpy(Path, Tmp);
	lstrcat(Path, "*.dfu");

	CFileDialog* dlg;
	dlg = new CFileDialog(TRUE, _T("dfu"), _T("*.dfu"), OFN_FILEMUSTEXIST, szFilters, this);

	UpdateData(TRUE);
	m_ListFiles.ResetContent();
	if (dlg->DoModal()==IDOK)
	{
		BYTE Alts;
		WORD Vid;
		WORD Pid;
		WORD Bcd;

		if (m_hFile!=0)
			STDFUFILES_CloseDFUFile(m_hFile);

		if (STDFUFILES_OpenExistingDFUFile((LPSTR)(LPCSTR)dlg->GetPathName(), &m_hFile, &Vid, &Pid, &Bcd, &Alts) == STDFUFILES_NOERROR)
		{
			BYTE Alt;
			CString Tmp, Tmp1;

			m_Pid.Format("%04X", Pid);
			m_Vid.Format("%04X", Vid);
			m_Bcd.Format("%04X", Bcd);
			m_FileBaseName=dlg->GetPathName().Left(dlg->GetPathName().GetLength()-4);
		    m_DfuFile = dlg->GetPathName(); 

			UpdateData(FALSE);
			for (BYTE i=0;i<Alts;i++)
			{
				HANDLE Image;
				CString Tmp;
				if (STDFUFILES_ReadImageFromDFUFile(m_hFile, i, &Image)==STDFUFILES_NOERROR)
				{
					char Name[512];

					STDFUFILES_GetImageAlternate(Image, &Alt);
					STDFUFILES_GetImageName(Image, Name);
					STDFUFILES_DestroyImage(&Image);

					Tmp.Format("Image for Target ID %02i", Alt);
					if (Name[0]!='\0')
					{
						Tmp+="  (";
						Tmp+=Name;
						Tmp+=")";
					}
					m_ListFiles.AddString(Tmp);
				}
				else
				{
					AfxMessageBox("Unable to read images in file...");
					break;
				}
				if(m_ListFiles.GetCount()>0)
				   m_ListFiles.SetCurSel(0);
			}
		}
		else
			AfxMessageBox("Error... Maybe bad or old file format");
	}
}
开发者ID:LordOfDorks,项目名称:security-1,代码行数:78,代码来源:DfuFileMgrDlgExtract.cpp

示例14: UpdateData

void CSettingDlg7::OnBnClickedCheckPrac()
{
	UpdateData(TRUE);
	//((CEdit*)GetDlgItem(IDC_PRAC_TIMES))->SetReadOnly(!m_bPracCheck);
	
}
开发者ID:wormzsb,项目名称:PilotTaskExercise1,代码行数:6,代码来源:SettingDlg7.cpp

示例15: memset


//.........这里部分代码省略.........
				/*DENqa20465*/
			   if ((AcctCategory = (GAL_ACCTCATEGORY_KEY) malloc(sizeof(GAL_ACCTCATEGORY_KEY))) == NULL)
			   {
                   GuiError(__FILE__, __LINE__, "Could not allocate memory for account category key.");
				   return;
         	   }
	
				AcctCategory->account_category = iAccountCategory;
				if(galSelectAcctCategory(GetHandle(),AcctCategory,&lpSelectedObj,&m_lpError)== GAL_FAILURE )
				{
					GuiError(__FILE__, __LINE__, "Error occured during 'select acct category' task.");
					delete AcctCategory;
					return;
				}
				else
				{
					if(galGetAcctCategory_is_business(lpSelectedObj,&is_business,&m_lpError)== GAL_FAILURE )
					{
						GuiError(__FILE__, __LINE__, "Error occured during 'is_business' task.");  
						delete AcctCategory;
						galDeleteObjects(lpSelectedObj);
						return;
					}
				}

				delete AcctCategory;
				galDeleteObjects(lpSelectedObj);
   				/*DENqa20465*/
				m_iParents[m_iParsedItem] = iGalParent;
				m_iParentLoc[m_iParsedItem] = m_iAccountNo;
				m_iMaxAccounts++;
				//Set the Parent of the particular element of tree	
				if (iGalParent == NULL)
				{ 
					m_tvstruct.hParent =  NULL ; 
				}				
				else
				{
					for ( int iPIndex = 0; iGalParent != m_iParentLoc[iPIndex]; iPIndex++ );
					m_tvstruct.hParent = m_rghItem[ iPIndex ];
				}  
				m_tvstruct.hInsertAfter = TVI_LAST;
				strncpy(m_textAlaBuf[m_iParsedItem],m_textExtId,GAL_PPCOMPONENTELEM_DESCRIPTION_TEXT_LEN);
				strcat (m_textExtId, "      " );
				//If the account is residential then get first and last name otherwise get company name
				//Start of CAMqa78557
				//if ( iAccountCategory == RESIDENTIAL )
				if (!is_business) 
				//End of CAMqa78557
				{	
					/* Begin DENqa06670 */
					TCHAR textFirstName[GAL_ACCTEXTID_BILL_FIRST_NAME_LEN ];
					TCHAR textLastName[GAL_ACCTEXTID_BILL_LAST_NAME_LEN];
					/*End DENqa06670 */
					galGetAcctSelection_bill_lname(lpCurrentObject, textLastName, &m_lpError);
					galGetAcctSelection_bill_fname(lpCurrentObject, textFirstName, &m_lpError);
					strcat( m_textExtId, textLastName );
					if (!ArbI18N::IsChinese())//DENqa30280
					{
						strcat(m_textExtId, ArbI18N::translateToUTF8(GetArborLabels()->GetNameSeparator()));
					}
					strcat(m_textExtId, textFirstName);
				}  
				else
				{
					galGetAcctSelection_bill_company(lpCurrentObject, m_textCoName , &m_lpError);
					strcat( m_textExtId, m_textCoName );
				}
				
				char tempExtId[GAL_SISELECTION_EXTERNAL_ID_LEN*2];
				strcpy(tempExtId, ArbI18N::translateFromUTF8(m_textExtId));
				m_tvstruct.item.pszText = tempExtId;					  
				m_tvstruct.item.mask = TVIF_TEXT | TVIF_IMAGE |TVIF_SELECTEDIMAGE ;
				m_tvstruct.item.iImage = 6;//Bitmap index returned from Add function in oninitdialog
				m_tvstruct.item.iSelectedImage = 6;
				m_rghItem[m_iParsedItem]= m_TreeHier.InsertItem( &m_tvstruct );
				m_TreeHier.EnsureVisible( m_rghItem[m_iParsedItem] );
				//Save the tree address of the element within Custinfo and highlight that item
				if ( m_iAccountNo == m_iCIRoot )
				{
					m_pInAcct = m_rghItem[m_iParsedItem];				      
					m_TreeHier.SelectItem( m_rghItem[m_iParsedItem] );
				}

				m_iParsedItem++;			  

			}
			if( lpSelectedObjects )
				galDeleteObjects(lpSelectedObjects);
			lpSelectedObjects = NULL;
		}  
		else
		  GuiError(__FILE__, __LINE__,
			   "Could not set Account List.");
	}
	UpdateData( FALSE ); 	

	EndWaitCursor();

}
开发者ID:huilang22,项目名称:Projects,代码行数:101,代码来源:accthierdlg.cpp


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