本文整理汇总了C++中TCString::Replace方法的典型用法代码示例。如果您正苦于以下问题:C++ TCString::Replace方法的具体用法?C++ TCString::Replace怎么用?C++ TCString::Replace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCString
的用法示例。
在下文中一共展示了TCString::Replace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
Icon_Register(g_hInstance, MOD_NAME, iconList, _countof(iconList), "nas");
InitCommonControls();
InitOptions(); // must be called before we hook CallService
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) { // change all %nas_message% variables to %extratext% if it wasn't done before
TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", _T(""));
if (Str.GetLen())
db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(_T("nas_message"), _T("extratext")));
Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", _T(""));
if (Str.GetLen())
db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(_T("nas_message"), _T("extratext")));
}
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 2) { // disable autoreply for not-on-list contacts, as such contact may be a spam bot
db_set_b(NULL, MOD_NAME, ContactStatusToDBSetting(0, DB_ENABLEREPLY, 0, INVALID_CONTACT_ID), 0);
db_set_b(NULL, MOD_NAME, DB_SETTINGSVER, 2);
}
return 0;
}
示例2: Load
int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, THREAD_SET_CONTEXT, false, 0);
InitOptions();
if (db_get_b(NULL, MODULENAME, DB_SETTINGSVER, 0) < 1) {
TCString Str;
Str = db_get_s(NULL, MODULENAME, DB_IGNORESUBSTRINGS, L"");
if (Str.GetLen()) // fix incorrect regexp from v0.1.1.0
db_set_ws(NULL, MODULENAME, DB_IGNORESUBSTRINGS, Str.Replace(L"/Miranda[0-9A-F]{8}/", L"/[0-9A-F]{8}(\\W|$)/"));
db_set_b(NULL, MODULENAME, DB_SETTINGSVER, 1);
}
return 0;
}
示例3: Load
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP( &pluginInfo );
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, THREAD_SET_CONTEXT, false, 0);
InitOptions();
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) {
TCString Str;
Str = db_get_s(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, _T(""));
if (Str.GetLen()) // fix incorrect regexp from v0.1.1.0
db_set_ts(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, Str.Replace(_T("/Miranda[0-9A-F]{8}/"), _T("/[0-9A-F]{8}(\\W|$)/")));
db_set_b(NULL, MOD_NAME, DB_SETTINGSVER, 1);
}
return 0;
}