您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetConfiguration函数代码示例

51自学网 2021-06-01 21:05:30
  C++
这篇教程C++ GetConfiguration函数代码示例写得很实用,希望能帮到您。

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

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

示例1: reg_query_winscp_value_ex

long reg_query_winscp_value_ex(HKEY Key, const char * ValueName, unsigned long * /*Reserved*/,  unsigned long * Type, uint8_t * Data, unsigned long * DataSize){  long R;  DebugAssert(GetConfiguration() != nullptr);  THierarchicalStorage * Storage = reinterpret_cast<THierarchicalStorage *>(Key);  AnsiString Value;  if (Storage == nullptr)  {    if (UnicodeString(ValueName) == L"RandSeedFile")    {      Value = AnsiString(GetConfiguration()->GetRandomSeedFileName());      R = ERROR_SUCCESS;    }    else    {      DebugFail();      R = ERROR_READ_FAULT;    }  }  else  {    if (Storage->ValueExists(ValueName))    {      Value = AnsiString(Storage->ReadStringRaw(ValueName, L""));      R = ERROR_SUCCESS;    }    else    {      R = ERROR_READ_FAULT;    }  }  if (R == ERROR_SUCCESS)  {    DebugAssert(Type != nullptr);    *Type = REG_SZ;    char * DataStr = reinterpret_cast<char *>(Data);    int sz = static_cast<int>(*DataSize);    if (sz > 0)    {        strncpy(DataStr, Value.c_str(), sz);        DataStr[sz - 1] = '/0';    }    *DataSize = static_cast<uint32_t>(strlen(DataStr));  }  return R;}
开发者ID:elfmz,项目名称:far2l,代码行数:50,


示例2: GetConfiguration

// get short name for loftstd::string CCPACSFuselage::GetShortShapeName (){    unsigned int findex = 0;    for (int i = 1; i <= GetConfiguration().GetFuselageCount(); ++i) {        tigl::CCPACSFuselage& f = GetConfiguration().GetFuselage(i);        if (GetUID() == f.GetUID()) {            findex = i;            std::stringstream shortName;            shortName << "F" << findex;            return shortName.str();        }    }    return "UNKNOWN";}
开发者ID:gstariarch,项目名称:tigl,代码行数:15,


示例3: GetConfiguration

int CMPIPTV_RTSP::Initialize(HANDLE lockMutex, CParameterCollection *configuration){  if (configuration != NULL)  {    CParameterCollection *vlcParameters = GetConfiguration(&this->logger, PROTOCOL_IMPLEMENTATION_NAME, METHOD_INITIALIZE_NAME, CONFIGURATION_SECTION_UDP);    configuration->Append(vlcParameters);    delete vlcParameters;  }  int result = this->CMPIPTV_UDP::Initialize(lockMutex, configuration);  this->receiveDataTimeout = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_RECEIVE_DATA_TIMEOUT, true, RTSP_RECEIVE_DATA_TIMEOUT_DEFAULT);  this->rtspUdpSinkMaxPayloadSize = this->configurationParameters->GetValueUnsignedInt(CONFIGURATION_RTSP_UDP_SINK_MAX_PAYLOAD_SIZE, true, RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT);  this->rtspUdpPortRangeStart = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_UDP_PORT_RANGE_START, true, RTSP_UDP_PORT_RANGE_START_DEFAULT);  this->rtspUdpPortRangeEnd = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_UDP_PORT_RANGE_END, true, RTSP_UDP_PORT_RANGE_END_DEFAULT);  this->rtspTeardownRequestMaximumCount = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT, true, RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT_DEFAULT);  this->rtspTeardownRequestTimeout = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_TEARDOWN_REQUEST_TIMEOUT, true, RTSP_TEARDOWN_REQUEST_TIMEOUT_DEFAULT);  this->openConnetionMaximumAttempts = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS, true, RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS_DEFAULT);  this->receiveDataTimeout = (this->receiveDataTimeout < 0) ? RTSP_RECEIVE_DATA_TIMEOUT_DEFAULT : this->receiveDataTimeout;  this->rtspUdpSinkMaxPayloadSize = (this->rtspUdpSinkMaxPayloadSize < 0) ? RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT : this->rtspUdpSinkMaxPayloadSize;  this->rtspUdpPortRangeStart = (this->rtspUdpPortRangeStart <= 1024) ? RTSP_UDP_PORT_RANGE_START_DEFAULT : this->rtspUdpPortRangeStart;  this->rtspUdpPortRangeEnd = (this->rtspUdpPortRangeEnd < this->rtspUdpPortRangeStart) ? min(65535, this->rtspUdpPortRangeStart + 1000) : min(65535, this->rtspUdpPortRangeEnd);  this->rtspTeardownRequestMaximumCount = (this->rtspTeardownRequestMaximumCount <= 0) ? RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT_DEFAULT : this->rtspTeardownRequestMaximumCount;  this->rtspTeardownRequestTimeout = (this->rtspTeardownRequestTimeout < 0) ? RTSP_TEARDOWN_REQUEST_TIMEOUT_DEFAULT : this->rtspTeardownRequestTimeout;  this->openConnetionMaximumAttempts = (this->openConnetionMaximumAttempts < 0) ? RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS_DEFAULT : this->openConnetionMaximumAttempts;  this->rtspScheduler = RtspTaskScheduler::createNew();  this->rtspEnvironment = BasicUsageEnvironment::createNew(*this->rtspScheduler);  result |= (this->rtspScheduler == NULL);  result |= (this->rtspEnvironment == NULL);  return (result == STATUS_OK) ? STATUS_OK : STATUS_ERROR;}
开发者ID:BMOTech,项目名称:MediaPortal-1,代码行数:35,


示例4: GetDlgItem

void CWorkspacePreferencesDialog::OnOK(){#if 0	if (GetFocus() == GetDlgItem(IDC_WORKSPACE_SIZE))	{		GetDlgItem(IDOK)->SetFocus();	}	else#endif	if (OnValidateWorkspaceSize(0, 0L))	{	/* Check that the number they typed is valid. */		DWORD dwAvailableSize = Util::GetAvailableDiskSpace(m_csWorkspaceDirectory);		dwAvailableSize += m_cache->get_physical_size();		if (m_dwWorkspaceSize > dwAvailableSize)		{		/*		// This is not a good idea.		// Inform the user that a lower number is required.		*/			GetConfiguration()->MessageBox(IDS_ErrWorkspaceExceedsDiskSpace, 0,													 MB_OK | MB_ICONEXCLAMATION);			GetDlgItem(IDC_WORKSPACE_SIZE)->SetFocus();		}		else		{		/* Go home. */			CPmwDialog::OnOK();		}	}}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:35,


示例5: BuildFromURI

VSIOSSHandleHelper* VSIOSSHandleHelper::BuildFromURI( const char* pszURI,                                                      const char* pszFSPrefix,                                                      bool bAllowNoObject,                                                      CSLConstList papszOptions ){    CPLString osSecretAccessKey;    CPLString osAccessKeyId;    if( !GetConfiguration(papszOptions, osSecretAccessKey, osAccessKeyId) )    {        return nullptr;    }    const CPLString osEndpoint = CSLFetchNameValueDef(papszOptions,        "OSS_ENDPOINT",        CPLGetConfigOption("OSS_ENDPOINT", "oss-us-east-1.aliyuncs.com"));    CPLString osBucket;    CPLString osObjectKey;    if( pszURI != nullptr && pszURI[0] != '/0' &&        !GetBucketAndObjectKey(pszURI, pszFSPrefix, bAllowNoObject,                               osBucket, osObjectKey) )    {        return nullptr;    }    const bool bUseHTTPS = CPLTestBool(CPLGetConfigOption("OSS_HTTPS", "YES"));    const bool bIsValidNameForVirtualHosting =        osBucket.find('.') == std::string::npos;    const bool bUseVirtualHosting = CPLTestBool(        CPLGetConfigOption("OSS_VIRTUAL_HOSTING",                           bIsValidNameForVirtualHosting ? "TRUE" : "FALSE"));    return new VSIOSSHandleHelper(osSecretAccessKey, osAccessKeyId,                                 osEndpoint,                                 osBucket, osObjectKey, bUseHTTPS,                                 bUseVirtualHosting);}
开发者ID:OSGeo,项目名称:gdal,代码行数:34,


示例6: CHECK_LT

void VideoFormats::getProfileLevel(        ResolutionType type, size_t index,        ProfileType *profile, LevelType *level) const{    CHECK_LT(type, kNumResolutionTypes);    CHECK(GetConfiguration(type, index, NULL, NULL, NULL, NULL));    int i, bestProfile = -1, bestLevel = -1;    for (i = 0; i < kNumProfileTypes; ++i) {        if (mConfigs[type][index].profile & (1ul << i)) {            bestProfile = i;        }    }    for (i = 0; i < kNumLevelTypes; ++i) {        if (mConfigs[type][index].level & (1ul << i)) {            bestLevel = i;        }    }    if (bestProfile == -1 || bestLevel == -1) {        ALOGE("Profile or level not set for resolution type %d, index %d",              type, index);        bestProfile = PROFILE_CBP;        bestLevel = LEVEL_31;    }    *profile = (ProfileType) bestProfile;    *level = (LevelType) bestLevel;}
开发者ID:AOSP-Argon,项目名称:android_frameworks_av,代码行数:30,


示例7: main

int main(){    const char *configuration = GetConfiguration();    printf("Configuration is '%s'/n", configuration);    return 0;}
开发者ID:markfinal,项目名称:BuildAMation,代码行数:7,


示例8: set_card_panel_view

VOID CCardView::set_card_panel_view(SHORT new_panel){/*// If this is a demo card back, then we don't allow editing.*/   if ((new_panel == CARD_PANEL_Back) && !GetConfiguration()->SupportsCardBack())   {      return;   }#if 1   BeforePageChange();   SetPanel(new_panel);#else/*// Get the document and build the undo/redo command for this.*/   CPmwDoc* pDoc = GetDocument();   CCmdCardPanel* pCommand = new CCmdCardPanel(IDCmd_Panel[new_panel+1]);   if (pCommand->Snapshot(this, pDoc->get_current_panel(), new_panel))   {      pDoc->AddCommand(pCommand);   }   else   {      delete pCommand;   /* Fall through. *///    SetPanel(new_panel);   }#endif}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:35,


示例9: IsBonusEnabled

REGRESULT CRegisterDLL::IsBonusEnabled(void){#ifdef LOCALIZE	if (GetConfiguration()->RemoveRegistration())		return REGRESULT_AlreadyRegistered;#endif	return RegSendCommand(REGCOMMAND_IsBonusEnabled);}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:8,


示例10: RegisterBonus

REGRESULT CRegisterDLL::RegisterBonus(void){#ifdef LOCALIZE	if (GetConfiguration()->RemoveRegistration())		return TRUE;#endif	return RegSendCommand(REGCOMMAND_Register " /C /A");}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:8,


示例11: GetConfiguration

status_t ArpAccentRandomizerFilter::Configure(ArpVectorI<BView*>& panels){	BMessage config;	status_t err = GetConfiguration(&config);	if (err != B_OK) return err;	panels.push_back(new ArpAccentRandomizerFilterSettings(mHolder, config));	return B_OK;}
开发者ID:HaikuArchives,项目名称:Sequitur,代码行数:8,


示例12: GetConfiguration

status_t ArpUncertainChorusFilter::Configure(ArpVectorI<BView*>& panels){    BMessage config;    status_t err = GetConfiguration(&config);    if (err != B_OK) return err;    panels.push_back(new ArpUncertainChorusSettings(mHolder, config));    return B_OK;}
开发者ID:dtbinh,项目名称:Sequitur,代码行数:8,


示例13: GetConfiguration

status_t ArpControllerRangeFilter::Configure(ArpVectorI<BView*>& panels){	BMessage config;	status_t err = GetConfiguration(&config);	if (err != B_OK) return err;	panels.push_back(new _ControllerRangeSettings(mHolder, config));	return B_OK;}
开发者ID:tgkokk,项目名称:Sequitur,代码行数:8,


示例14: GetConfiguration

int CAEN_V814::Config(BoardConfig *bC){  Board::Config(bC);  //Set All Configuration to 0  for (unsigned int i=0;i<CAEN_V814_CHANNELS;++i)    GetConfiguration()->chThreshold[i]=0;  //here the parsing of the xmlnode...  GetConfiguration()->baseAddress=Configurator::GetInt( bC->getElementContent("baseAddress"));  GetConfiguration()->patternMask=Configurator::GetInt( bC->getElementContent("patternMask"));  GetConfiguration()->outputWidth=Configurator::GetInt( bC->getElementContent("outputWidth"));  GetConfiguration()->majorityThreshold=Configurator::GetInt( bC->getElementContent("majorityThreshold"));  GetConfiguration()->commonThreshold=Configurator::GetInt( bC->getElementContent("commonThreshold"));  //Now threshold per channel if they exist in configuration  char chThresholdKey[100];  for (unsigned int i=0;i<CAEN_V814_CHANNELS;++i)    {      sprintf(chThresholdKey,"ch%dThreshold",i);      if (bC->getElementContent(chThresholdKey) == "NULL")	continue;      GetConfiguration()->chThreshold[i]==(int)Configurator::GetInt( bC->getElementContent(chThresholdKey) );    }  return 0;}
开发者ID:cmsromadaq,项目名称:H4DAQ,代码行数:26,


示例15: CoreLoad

void CoreLoad(){  bool SessionList = false;  std::unique_ptr<THierarchicalStorage> SessionsStorage(GetConfiguration()->CreateStorage(SessionList));  THierarchicalStorage * ConfigStorage = nullptr;  std::unique_ptr<THierarchicalStorage> ConfigStorageAuto;  if (!SessionList)  {    // can reuse this for configuration    ConfigStorage = SessionsStorage.get();  }  else  {    ConfigStorageAuto.reset(GetConfiguration()->CreateConfigStorage());    ConfigStorage = ConfigStorageAuto.get();  }  assert(GetConfiguration() != nullptr);  try  {    GetConfiguration()->Load(ConfigStorage);  }  catch (Exception & E)  {    ShowExtendedException(&E);  }  // should be noop, unless exception occurred above  ConfigStorage->CloseAll();  StoredSessions = new TStoredSessionList();  try  {    if (SessionsStorage->OpenSubKey(GetConfiguration()->GetStoredSessionsSubKey(), false))    {      StoredSessions->Load(SessionsStorage.get());    }  }  catch (Exception & E)  {    ShowExtendedException(&E);  }}
开发者ID:kocicjelena,项目名称:Far-NetBox,代码行数:45,


示例16: OnCancel

void CAddonProgressDialog::OnCancel(){	// make sure the user really wants to cancel the installation		if (GetConfiguration()->MessageBox(IDS_ADDON_CONFIRM_ABORT, 0, MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION) == IDYES)	{		m_fIsAborted = TRUE;	}}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:9,


示例17: OpenWinSCPKey

static long OpenWinSCPKey(HKEY Key, const char * SubKey, HKEY * Result, bool CanCreate){  long R;  assert(GetConfiguration() != nullptr);  assert(Key == HKEY_CURRENT_USER);  USEDPARAM(Key);  UnicodeString RegKey = SubKey;  UnicodeString OriginalPuttyRegistryStorageKey(_T(PUTTY_REG_POS));  intptr_t PuttyKeyLen = OriginalPuttyRegistryStorageKey.Length();  assert(RegKey.SubString(1, PuttyKeyLen) == OriginalPuttyRegistryStorageKey);  RegKey = RegKey.SubString(PuttyKeyLen + 1, RegKey.Length() - PuttyKeyLen);  if (!RegKey.IsEmpty())  {    assert(RegKey[1] == L'//');    RegKey.Delete(1, 1);  }  if (RegKey.IsEmpty())  {    *Result = static_cast<HKEY>(nullptr);    R = ERROR_SUCCESS;  }  else  {    // we expect this to be called only from verify_host_key() or store_host_key()    assert(RegKey == L"SshHostKeys");    std::unique_ptr<THierarchicalStorage> Storage(GetConfiguration()->CreateConfigStorage());    Storage->SetAccessMode((CanCreate ? smReadWrite : smRead));    if (Storage->OpenSubKey(RegKey, CanCreate))    {      *Result = reinterpret_cast<HKEY>(Storage.release());      R = ERROR_SUCCESS;    }    else    {      R = ERROR_CANTOPEN;    }  }  return R;}
开发者ID:valery-barysok,项目名称:Far-NetBox,代码行数:44,


示例18: QuitRequested

bool SeqPrefWin::QuitRequested(){	if( !inherited::QuitRequested() ) return false;	BMessage	config;	if( GetConfiguration( &config ) == B_OK ) {		if( seq_is_quitting() ) seq_app->AddShutdownMessage( "window_settings", &config );		else seq_app->SetAuxiliaryWindowSettings(SeqApplication::PREF_WIN_INDEX, config);	}	return true;}
开发者ID:dtbinh,项目名称:Sequitur,代码行数:10,


示例19: QuitRequested

bool SeqPhrasePropertyWindow::QuitRequested(){	if (!inherited::QuitRequested() ) return false;	BMessage	config;	if (GetConfiguration(&config) == B_OK) {		if (seq_is_quitting()) seq_app->AddShutdownMessage("window_settings", &config);//		else seq_app->SetEditDeviceSettings(config);	}	return true;}
开发者ID:tgkokk,项目名称:Sequitur,代码行数:10,


示例20: DeleteConfiguration

void DeleteConfiguration(){  static bool ConfigurationDeleted = false;  if (!ConfigurationDeleted)  {    TConfiguration * Conf = GetConfiguration();    SAFE_DESTROY(Conf);    ConfigurationDeleted = true;  }}
开发者ID:kocicjelena,项目名称:Far-NetBox,代码行数:10,


示例21: main

int main(){    const char *bitSize = GetBitSize();    const char *config = GetConfiguration();    printf("Hello world, C, in %s (%s)/n", bitSize, config);    printf("From library, '%s'/n", libraryFunction());    printf("From library2, '%d'/n", library2Function());    return 0;}
开发者ID:markfinal,项目名称:BuildAMation,代码行数:10,


示例22: GetDlgItem

void CSmartFieldsDialog::OnSender(){/*// Finish up any current edit.*/	if (m_pList->Editing())	{		m_pList->FinishEdit();		GetDlgItem(IDC_SENDER)->SetFocus();	}	/*// Make sure the configuration supports address books.*/	if (!GetConfiguration()->SupportsAddressBook())	{		return;	}	// Allow the user to edit the sender record for the current address book.      if (m_pDoc->EditSender())   {		// Reset all the sender fields back to their database values.				int nItem = 0;		int nItems = m_pList->GetCount();				while (nItem < nItems)		{			CSmartFieldListBoxItem* pItem = (CSmartFieldListBoxItem*)m_pList->GetItemData(nItem);			if (pItem != NULL)			{				CMacro* pMacro = pItem->Macro();								if (pMacro != NULL)				{					if (pMacro->MacroType() == CMacro::MACRO_TYPE_Sender)					{						// We have a sender field, reset it back to its database value.						pMacro->MacroValueType(CMacro::VALUE_TYPE_Field);						pMacro->Value("");					}				}			}						nItem++;		}				UpdateFields(TRUE);		m_pList->Invalidate();   }}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:55,


示例23: OnCancel

void CInstallRegistrationDialog::OnCancel(){	/*	// Confirm that the user really does want to cancel.	*/		if (GetConfiguration()->MessageBox(IDS_ConfirmExitInstallation, 0, MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION) == IDYES)	{		CPmwDialog::OnCancel();	}}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:11,


示例24: reg_close_winscp_key

long reg_close_winscp_key(HKEY Key){  DebugAssert(GetConfiguration() != nullptr);  THierarchicalStorage * Storage = reinterpret_cast<THierarchicalStorage *>(Key);  if (Storage != nullptr)  {    SAFE_DESTROY_EX(THierarchicalStorage, Storage);  }  return ERROR_SUCCESS;}
开发者ID:elfmz,项目名称:far2l,代码行数:12,


示例25: ArpD

void ArpRemoteTerminal::TermReset(bool hard){	ArpD(cdb << ADH << "ArpRemoteTerminal: Reset hard=" << hard << endl);	inherited::TermReset(hard);	if( HaveWatchers() ) {		BMessage config;		if( GetConfiguration(&config) == B_NO_ERROR ) {			ArpD(cdb << ADH << "Reporting change: " << config << endl);			ReportChange(&config);		}	}}
开发者ID:HaikuArchives,项目名称:ArpCommon,代码行数:12,


示例26: QuitRequested

bool SeqManageRosterWindow::QuitRequested(){	if (!inherited::QuitRequested() ) return false;	BMessage	config;	if (GetConfiguration(&config) == B_OK) {		if (seq_is_quitting()) seq_app->AddShutdownMessage("window_settings", &config);		else seq_app->SetAuxiliaryWindowSettings(WindowSettingsIndex(), config);	}	AmFileRoster*	roster = Roster();	if (roster) roster->RemoveObserver(this);	return true;}
开发者ID:tgkokk,项目名称:Sequitur,代码行数:13,


示例27: ALOGE

void VideoFormats::enableResolutionUpto(        ResolutionType type, size_t index,        ProfileType profile, LevelType level) {    size_t width, height, fps, score;    bool interlaced;    if (!GetConfiguration(type, index, &width, &height,            &fps, &interlaced)) {        ALOGE("Maximum resolution not found!");        return;    }    score = width * height * fps * (!interlaced + 1);    for (size_t i = 0; i < kNumResolutionTypes; ++i) {        for (size_t j = 0; j < 32; j++) {            if (GetConfiguration((ResolutionType)i, j,                    &width, &height, &fps, &interlaced)                    && score >= width * height * fps * (!interlaced + 1)) {                setResolutionEnabled((ResolutionType)i, j);                setProfileLevel((ResolutionType)i, j, profile, level);            }        }    }}
开发者ID:AOSP-Argon,项目名称:android_frameworks_av,代码行数:22,


示例28: wxT

//// Save the toolbar states//void ToolManager::WriteConfig(){   if( !gPrefs )   {      return;   }   wxString oldpath = gPrefs->GetPath();   int ndx;   // Change to the bar root   gPrefs->SetPath( wxT("/GUI/ToolBars") );   // Save state of each bar   for( ndx = 0; ndx < ToolBarCount; ndx++ )   {      ToolBar *bar = mBars[ ndx ].get();      // Change to the bar subkey      gPrefs->SetPath( bar->GetSection() );      // Search both docks for toolbar order      bool to = mTopDock->GetConfiguration().Contains( bar );      bool bo = mBotDock->GetConfiguration().Contains( bar );      // Save      gPrefs->Write( wxT("Dock"), (int) (to ? TopDockID : bo ? BotDockID : NoDockID ));      auto dock = to ? mTopDock : bo ? mBotDock : nullptr;      ToolBarConfiguration::Write         (dock ? &dock->GetConfiguration() : nullptr, bar);      wxPoint pos( -1, -1 );      wxSize sz = bar->GetSize();      if( !bar->IsDocked() && bar->IsPositioned() )      {         pos = bar->GetParent()->GetPosition();         sz = bar->GetParent()->GetSize();      }      gPrefs->Write( wxT("X"), pos.x );      gPrefs->Write( wxT("Y"), pos.y );      gPrefs->Write( wxT("W"), sz.x );      gPrefs->Write( wxT("H"), sz.y );      // Change back to the bar root      gPrefs->SetPath( wxT("..") );   }   // Restore original config path   gPrefs->SetPath( oldpath );   gPrefs->Flush();}
开发者ID:henricj,项目名称:audacity,代码行数:54,



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


C++ GetConnection函数代码示例
C++ GetConfigValue函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。