本文整理汇总了C++中LoadOptions函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadOptions函数的具体用法?C++ LoadOptions怎么用?C++ LoadOptions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LoadOptions函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: SetDefaultValues
COptions::COptions()
{
m_theOptions = this;
m_pXmlFile = 0;
m_pLastServer = 0;
m_acquired = false;
SetDefaultValues();
m_save_timer.SetOwner(this);
std::map<std::string, int> nameOptionMap;
GetNameOptionMap(nameOptionMap);
LoadGlobalDefaultOptions(nameOptionMap);
InitSettingsDir();
CInterProcessMutex mutex(MUTEX_OPTIONS);
m_pXmlFile = new CXmlFile(_T("filezilla"));
if (!m_pXmlFile->Load(wxFileName()))
{
wxString msg = m_pXmlFile->GetError() + _T("\n\n") + _("For this session the default settings will be used. Any changes to the settings will not be saved.");
wxMessageBox(msg, _("Error loading xml file"), wxICON_ERROR);
delete m_pXmlFile;
m_pXmlFile = 0;
}
else
CreateSettingsXmlElement();
LoadOptions(nameOptionMap);
}
开发者ID:jplee,项目名称:MILF,代码行数:33,代码来源:Options.cpp
示例2: SetDefaultValues
COptions::COptions()
{
m_theOptions = this;
m_pXmlFile = 0;
m_pLastServer = 0;
SetDefaultValues();
m_save_timer.SetOwner(this);
auto const nameOptionMap = GetNameOptionMap();
LoadGlobalDefaultOptions(nameOptionMap);
CLocalPath const dir = InitSettingsDir();
CInterProcessMutex mutex(MUTEX_OPTIONS);
m_pXmlFile = new CXmlFile(dir.GetPath() + _T("filezilla.xml"));
if (!m_pXmlFile->Load()) {
wxString msg = m_pXmlFile->GetError() + _T("\n\n") + _("For this session the default settings will be used. Any changes to the settings will not be saved.");
wxMessageBoxEx(msg, _("Error loading xml file"), wxICON_ERROR);
delete m_pXmlFile;
m_pXmlFile = 0;
}
else
CreateSettingsXmlElement();
LoadOptions(nameOptionMap);
}
开发者ID:Typz,项目名称:FileZilla,代码行数:28,代码来源:Options.cpp
示例3: __declspec
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
mir_getCLI();
use_raw_ping = false;
db_set_b(0, PLUG, "UsingRawSockets", (BYTE)use_raw_ping);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mainThread, THREAD_SET_CONTEXT, FALSE, 0);
hWakeEvent = CreateEvent(NULL, FALSE, FALSE, _T("Local\\ThreadWaitEvent"));
// create services before loading options - so we can have the 'getlogfilename' service!
CreatePluginServices();
LoadOptions();
SkinAddNewSound("PingTimeout", "Ping Timout", 0);
SkinAddNewSound("PingReply", "Ping Reply", 0);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_OPT_INITIALISE, PingOptInit);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
Icon_Register(hInst, LPGEN("Ping"), iconList, _countof(iconList));
HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
return 0;
}
开发者ID:gloria8023,项目名称:miranda-ng,代码行数:31,代码来源:ping.cpp
示例4: LoadOptions
HeightMap::HeightMap()
{
pHM = this;
msh = &mesh;
HeightMapDesc.MakeAutoParamBlocks(this);
LoadOptions();
}
开发者ID:SteveBeaupre,项目名称:Vortez3DEngine,代码行数:7,代码来源:HeightMap.cpp
示例5: ModulesLoaded
int ModulesLoaded(WPARAM, LPARAM)
{
InitFonts();
hAvChangeEvent = HookEvent(ME_AV_AVATARCHANGED, AvatarChanged);
hShowTipEvent = HookEvent(ME_CLC_SHOWINFOTIP, ShowTipHook);
hHideTipEvent = HookEvent(ME_CLC_HIDEINFOTIP, HideTipHook);
hAckEvent = HookEvent(ME_PROTO_ACK, ProtoAck);
hFramesSBShow = HookEvent(ME_CLIST_FRAMES_SB_SHOW_TOOLTIP, FramesShowSBTip);
hFramesSBHide = HookEvent(ME_CLIST_FRAMES_SB_HIDE_TOOLTIP, FramesHideSBTip);
hFolderChanged = HookEvent(ME_FOLDERS_PATH_CHANGED, ReloadSkinFolder);
hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Tipper"), MIRANDA_PATHT _T("\\") _T(DEFAULT_SKIN_FOLDER));
FoldersGetCustomPathT(hSkinFolder, SKIN_FOLDER, _countof(SKIN_FOLDER), _T(DEFAULT_SKIN_FOLDER));
InitTipperSmileys();
LoadOptions();
ReloadFont(0, 0);
ParseSkinFile(opt.szSkinName, true, false);
// set 'time-in'
CallService(MS_CLC_SETINFOTIPHOVERTIME, opt.iTimeIn, 0);
// set Miranda start timestamp
db_set_dw(0, MODULE, "MirandaStartTS", (DWORD)time(0));
return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:29,代码来源:tipper.cpp
示例6: LoadContents
// ---
STDMETHODIMP CCodeGen::ImplementationGenerate( DWORD clen, BYTE* cont, DWORD olen, BYTE* opt ) {
int interfaces = 0;
int selected = 0;
int option_checked = 0;
HRESULT hr = LoadContents( clen, cont );
if ( FAILED(hr) )
return hr;
hr = LoadOptions( olen, opt );
if ( FAILED(hr) )
return hr;
m_iface.GoFirst();
while( m_iface ) {
interfaces++;
if ( m_iface.Selected() )
selected++;
if ( m_opt.some_option() )
option_checked++;
m_iface.GoNext();
}
m_iface = 0;
return S_OK;
}
开发者ID:hackshields,项目名称:antivirus,代码行数:27,代码来源:CodeGen.cpp
示例7: ModulesLoaded
int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
InitFonts();
InitUpdaterSupport();
hAvChangeEvent = HookEvent(ME_AV_AVATARCHANGED, AvatarChanged);
hShowTipEvent = HookEvent(ME_CLC_SHOWINFOTIP, ShowTipHook);
hHideTipEvent = HookEvent(ME_CLC_HIDEINFOTIP, HideTipHook);
hAckEvent = HookEvent(ME_PROTO_ACK, ProtoAck);
hFramesSBShow = HookEvent(ME_CLIST_FRAMES_SB_SHOW_TOOLTIP, FramesShowSBTip);
hFramesSBHide = HookEvent(ME_CLIST_FRAMES_SB_HIDE_TOOLTIP, FramesHideSBTip);
hFolderChanged = HookEvent(ME_FOLDERS_PATH_CHANGED, ReloadSkinFolder);
hSkinFolder = FoldersRegisterCustomPathT(MODULE, "Tipper skins", MIRANDA_PATHT _T("\\") _T(DEFAULT_SKIN_FOLDER));
FoldersGetCustomPathT(hSkinFolder, SKIN_FOLDER, SIZEOF(SKIN_FOLDER), _T(DEFAULT_SKIN_FOLDER));
InitTipperSmileys();
LoadOptions();
ReloadFont(0, 0);
ParseSkinFile(opt.szSkinName, true, false);
// set 'time-in'
CallService(MS_CLC_SETINFOTIPHOVERTIME, opt.iTimeIn, 0);
// set Miranda start timestamp
DBWriteContactSettingDword(0, MODULE, "MirandaStartTS", (DWORD)time(0));
// get MetaContacts module name
if (ServiceExists(MS_MC_GETPROTOCOLNAME))
strcpy(szMetaModuleName, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0));
return 0;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:35,代码来源:tipper.cpp
示例8: Load
extern "C" PING_API int Load(PLUGINLINK *link)
{
pluginLink=link;
//if(init_raw_ping()) {
//MessageBox(0, Translate("Failed to initialize. Plugin disabled."), Translate("Ping Plugin"), MB_OK | MB_ICONERROR);
//return 1;
use_raw_ping = false;
//}
DBWriteContactSettingByte(0, PLUG, "UsingRawSockets", (BYTE)use_raw_ping);
DuplicateHandle( GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mainThread, THREAD_SET_CONTEXT, FALSE, 0 );
hWakeEvent = CreateEvent(NULL, FALSE, FALSE, "Local\\ThreadWaitEvent");
InitializeCriticalSection(&list_cs);
InitializeCriticalSection(&thread_finished_cs);
InitializeCriticalSection(&list_changed_cs);
InitializeCriticalSection(&data_list_cs);
// create services before loading options - so we can have the 'getlogfilename' service!
CreatePluginServices();
LoadOptions();
SkinAddNewSound("PingTimeout", "Ping Timout", 0);
SkinAddNewSound("PingReply", "Ping Reply", 0);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_OPT_INITIALISE, PingOptInit );
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
return 0;
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:35,代码来源:ping.cpp
示例9: ModulesLoad
int ModulesLoad(WPARAM, LPARAM)
{
profilePath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
if (hFolder = FoldersRegisterCustomPathT(LPGEN("Database backups"), LPGEN("Backup folder"), DIR SUB_DIR)) {
HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersGetBackupPath);
FoldersGetBackupPath(0, 0);
}
CreateServiceFunction(MS_AB_BACKUP, ABService);
CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs);
CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 500100000);
mi.name.a = LPGEN("Backup profile");
mi.pszService = MS_AB_BACKUP;
mi.hIcolibItem = iconList[0].hIcolib;
mi.position = 500100000;
Menu_AddMainMenuItem(&mi);
mi.name.a = LPGEN("Save profile as...");
mi.pszService = MS_AB_SAVEAS;
mi.hIcolibItem = iconList[1].hIcolib;
mi.position = 500100001;
Menu_AddMainMenuItem(&mi);
HookEvent(ME_OPT_INITIALISE, OptionsInit);
LoadOptions();
if (options.backup_types & BT_START)
BackupStart(NULL);
return 0;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:34,代码来源:main.cpp
示例10: LoadOptions
void COptions::Import(pugi::xml_node element)
{
LoadOptions(GetNameOptionMap(), element);
if (!m_save_timer.IsRunning()) {
m_save_timer.Start(15000, true);
}
}
开发者ID:zedfoxus,项目名称:filezilla-client,代码行数:7,代码来源:Options.cpp
示例11: __declspec
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfoEx);
// initialize global variables
InitVar();
// load options and set defaults
LoadOptions();
// reset the weather data at startup for individual contacts
EraseAllInfo();
// load weather update data
LoadWIData(true);
// set status to online if "Do not display weather condition as protocol status" is enabled
old_status = status = ID_STATUS_OFFLINE;
// add an event on weather update and error
hHookWeatherUpdated = CreateHookableEvent(ME_WEATHER_UPDATED);
hHookWeatherError = CreateHookableEvent(ME_WEATHER_ERROR);
// initialize options and network
HookEvent(ME_OPT_INITIALISE, OptInit);
HookEvent(ME_SYSTEM_MODULESLOADED, WeatherInit);
HookEvent(ME_DB_CONTACT_DELETED, ContactDeleted);
HookEvent(ME_CLIST_DOUBLECLICKED, BriefInfo);
HookEvent(ME_WEATHER_UPDATED, WeatherPopup);
HookEvent(ME_WEATHER_ERROR, WeatherError);
HookEvent(ME_SYSTEM_PRESHUTDOWN, WeatherShutdown);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, BuildContactMenu);
hDataWindowList = WindowList_Create();
hWindowList = WindowList_Create();
hUpdateMutex = CreateMutex(NULL, FALSE, NULL);
// register weather protocol
PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
pd.szName = WEATHERPROTONAME;
pd.type = (opt.NoProtoCondition) ? PROTOTYPE_VIRTUAL : PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
// initialize weather protocol services
InitServices();
// add sound event
SkinAddNewSoundExT("weatherupdated", _T(WEATHERPROTONAME), LPGENT("Weather Condition Changed"));
SkinAddNewSoundExT("weatheralert", _T(WEATHERPROTONAME), LPGENT("Weather Alert Issued"));
// window needed for popup commands
TCHAR SvcFunc[100];
mir_sntprintf(SvcFunc, SIZEOF(SvcFunc), _T("%s__PopupWindow"), _T(WEATHERPROTONAME));
hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:59,代码来源:weather.cpp
示例12: PluginCommand_CicleThroughtProtocols
static int PluginCommand_CicleThroughtProtocols(WPARAM wParam,LPARAM lParam)
{
DBWriteContactSettingByte(NULL,"MyDetails","CicleThroughtProtocols", (BYTE) wParam);
LoadOptions();
return 0;
}
开发者ID:Robyer,项目名称:miranda-plugins,代码行数:8,代码来源:mydetails.cpp
示例13: PluginCommand_CycleThroughtProtocols
static INT_PTR PluginCommand_CycleThroughtProtocols(WPARAM wParam,LPARAM lParam)
{
db_set_b(NULL,"MyDetails","CicleThroughtProtocols", (BYTE) wParam);
LoadOptions();
return 0;
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:8,代码来源:mydetails.cpp
示例14: GetNameOptionMap
void COptions::Import(TiXmlElement* pElement)
{
std::map<std::string, int> nameOptionMap;
GetNameOptionMap(nameOptionMap);
LoadOptions(nameOptionMap, pElement);
if (!m_save_timer.IsRunning())
m_save_timer.Start(15000, true);
}
开发者ID:jplee,项目名称:MILF,代码行数:8,代码来源:Options.cpp
示例15: edNode
edOptions::edOptions() : edNode(false), iniFile("editor.ini")
{
useSRTM= true;
useTerrain= true;
defaultHeight= 0;
linesInPreview3D= false;
LoadOptions();
}
开发者ID:BackupTheBerlios,项目名称:eu07-svn,代码行数:8,代码来源:options.cpp
示例16: InitOptions
void InitOptions()
{
HookEvent(ME_OPT_INITIALISE, OptInit);
// an icon for preview popups
hPopupIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
LoadOptions();
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:8,代码来源:options.cpp
示例17: RefreshStrings
BOOL CColorsPP::OnInitDialog()
{
CPropertyPage::OnInitDialog();
RefreshStrings();
LoadOptions();
EnumChildWindows(m_hWnd, SetFontToChilds, (LPARAM) PRGAPI()->GetFont(FONT_Dialogs)->m_hObject);
return TRUE; // return TRUE unless you set the focus to a control
}
开发者ID:KurzedMetal,项目名称:Jaangle,代码行数:9,代码来源:ColorsPP.cpp
示例18: GetStyleName
void CPropPageOptionsControls::OnApplyStyle()
{
//need to apply the style. Get the name of the style first
CString sStyle = GetStyleName();
//now try and create it (we do this first before warning, just in
//case the style is bad, then we don't need to warn the user)
CKeyDefaultAggregate* pAggregate = CKeyDefaultFactory::CreateDefault(sStyle);
if(pAggregate == NULL)
{
CString sStyleError;
sStyleError.LoadString(IDS_APPLY_STYLE_FAILED);
MessageBox(sStyleError, "Error", MB_OK | MB_ICONEXCLAMATION);
return;
}
//first warn the user of their actions.
CString sWarning;
CString sWarningTitle;
sWarningTitle.LoadString(IDS_APPLY_STYLE_WARNING_TITLE);
sWarning.Format(IDS_APPLY_STYLE_WARNING, GetStyleName());
if(MessageBox(sWarning, sWarningTitle, MB_OK | MB_YESNO | MB_ICONQUESTION) == IDNO)
{
//the user aborted
delete pAggregate;
return;
}
//the user actually wants to apply this style
//add the aggregate
CGlobalHotKeyDB::ClearAggregateList();
CGlobalHotKeyDB::AddAggregate(pAggregate);
//reset the keys to reflect these defaults
CHotKeyDB NewDB;
CGlobalHotKeyDB::SetDefaults(NewDB);
//now set this to the app (this resets internal state, etc)
GetApp()->SetHotKeyDB(NewDB);
//now give the configuration a chance to modify the global options
CKeyDefaultFactory::UpdateGlobalOptions(sStyle);
//now that they have done that, we need to refresh this dialog
LoadOptions();
//for the last thing, we need to save this setting so that it can be loaded up
//the next time we run
GetApp()->GetOptions().GetControlsOptions()->SetStringValue("ControlStyle", sStyle);
// success
}
开发者ID:Joincheng,项目名称:lithtech,代码行数:56,代码来源:PropPageOptionsControls.cpp
示例19: LoadOptions
BOOL CSoundOptionsDlg::OnInitDialog()
{
CDialog::OnInitDialog();
LoadOptions();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:GerHobbelt,项目名称:duff,代码行数:10,代码来源:OptionsSoundForm.cpp
示例20: LoadOptions
// Load unload
void OptionsMenu::Load()
{
// Load options to GUI
LoadOptions();
m_pGameplayMode->SetToggled(true);
GameplayTabPressed();
m_loaded = true;
}
开发者ID:lalalaring,项目名称:Vox,代码行数:11,代码来源:OptionsMenu.cpp
注:本文中的LoadOptions函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论