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

C++ wxRegKey类代码示例

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

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



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

示例1: CopyValue

bool wxRegKey::CopyValue(const wxString& szValue,
                         wxRegKey& keyDst,
                         const wxString& szValueNew)
{
    wxString valueNew(szValueNew);
    if ( valueNew.empty() ) {
        // by default, use the same name
        valueNew = szValue;
    }

    switch ( GetValueType(szValue) ) {
        case Type_String:
            {
                wxString strVal;
                return QueryValue(szValue, strVal) &&
                       keyDst.SetValue(valueNew, strVal);
            }

        case Type_Dword:
        /* case Type_Dword_little_endian: == Type_Dword */
            {
                long dwVal;
                return QueryValue(szValue, &dwVal) &&
                       keyDst.SetValue(valueNew, dwVal);
            }

        case Type_Binary:
        {
            wxMemoryBuffer buf;
            return QueryValue(szValue,buf) &&
                   keyDst.SetValue(valueNew,buf);
        }

        // these types are unsupported because I am not sure about how
        // exactly they should be copied and because they shouldn't
        // occur among the application keys (supposedly created with
        // this class)
        case Type_None:
        case Type_Expand_String:
        case Type_Dword_big_endian:
        case Type_Link:
        case Type_Multi_String:
        case Type_Resource_list:
        case Type_Full_resource_descriptor:
        case Type_Resource_requirements_list:
        default:
            wxLogError(_("Can't copy values of unsupported type %d."),
                       GetValueType(szValue));
            return false;
    }
}
开发者ID:,项目名称:,代码行数:51,代码来源:


示例2: QueryValue

static bool QueryValue(const wxRegKey& rk, const wxString& key, wxString& val)
{
    // prevent pop-up message if key does not exist
    bool save = wxLog::EnableLogging(false);
    bool ok = rk.QueryValue(key, val, false);
    wxLog::EnableLogging(save);
    return ok;
}
开发者ID:Saharac,项目名称:open-phd-guiding,代码行数:8,代码来源:cam_SSAG.cpp


示例3: verbKey

bool
Verb::ReadFromRegistry(const wxRegKey & base, const wxString & verbName)
{
  // Store descriptive verb name
  m_name = verbName;

  if (!base.HasSubKey(verbName))
    return false;

  wxRegKey verbKey(base, verbName);

  // Read command key
  const wxString commandKeyName(wxT("command"));
  if (!verbKey.HasSubKey(commandKeyName))
    return false;

  wxRegKey commandKey(base, commandKeyName);

  if (commandKey.HasValue(NULL))
    commandKey.QueryValue(NULL, m_command);

  // Attempt to read ddeexec key
  m_ddeCommand.Clear();
  m_ddeTopic.Clear();
  m_ddeApplication.Clear();

  const wxString ddeCommandKeyName(wxT("ddeexec"));
  m_usesDde = verbKey.HasSubKey(ddeCommandKeyName);
  if (m_usesDde)
  {
    wxRegKey ddeCommandKey(verbKey, ddeCommandKeyName);;
    if (ddeCommandKey.HasValue(NULL))
      ddeCommandKey.QueryValue(NULL, m_ddeCommand);

    const wxString ddeTopicName(wxT("Topic"));
    if (ddeCommandKey.HasSubKey(ddeTopicName))
    {
      wxRegKey ddeTopicKey(ddeCommandKey, ddeTopicName);
      if (ddeTopicKey.HasValue(NULL))
        ddeTopicKey.QueryValue(NULL, m_ddeTopic);
    }

    const wxString ddeApplicationName(wxT("Application"));
    if (ddeCommandKey.HasSubKey(ddeApplicationName))
    {
      wxRegKey ddeApplicationKey(ddeCommandKey, ddeApplicationName);
      if (ddeApplicationKey.HasValue(NULL))
        ddeApplicationKey.QueryValue(NULL, m_ddeApplication);
    }
  }

  return true;
}
开发者ID:aka2006,项目名称:RapidSVN,代码行数:53,代码来源:verblist.cpp


示例4: RemoveTrailingSeparator

// parent is a normal regkey
wxRegKey::wxRegKey(const wxRegKey& keyParent, const wxString& strKey)
    : m_strKey(keyParent.m_strKey), m_viewMode(keyParent.GetView())
{
  // combine our name with parent's to get the full name
  if ( !m_strKey.empty() &&
       (strKey.empty() || strKey[0] != REG_SEPARATOR) ) {
      m_strKey += REG_SEPARATOR;
  }

  m_strKey += strKey;
  RemoveTrailingSeparator(m_strKey);

  m_hRootKey  = keyParent.m_hRootKey;

  Init();
}
开发者ID:,项目名称:,代码行数:17,代码来源:


示例5: TryGetValue

bool TryGetValue(const wxRegKey& key, const wxString& str, wxMemoryBuffer &plVal)
{
  return key.IsOpened() && key.HasValue(str) && key.QueryValue(str, plVal);
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:4,代码来源:regconf.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ wxRegion类代码示例发布时间:2022-05-31
下一篇:
C++ wxRegEx类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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