本文整理汇总了C++中CModifiedComboBox类的典型用法代码示例。如果您正苦于以下问题:C++ CModifiedComboBox类的具体用法?C++ CModifiedComboBox怎么用?C++ CModifiedComboBox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CModifiedComboBox类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ResetComboBox
bool COptionPluginPage::ResetComboBox(CModifiedComboBox & ComboBox, SettingID Type)
{
if (!ComboBox.IsChanged())
{
return false;
}
ComboBox.SetReset(true);
stdstr Value = g_Settings->LoadDefaultString(Type);
for (int i = 0, n = ComboBox.GetCount(); i < n; i++)
{
const CPluginList::PLUGIN ** PluginPtr = (const CPluginList::PLUGIN **)ComboBox.GetItemDataPtr(i);
if (PluginPtr == NULL)
{
continue;
}
const CPluginList::PLUGIN * Plugin = *PluginPtr;
if (Plugin->FileName != Value)
{
continue;
}
ComboBox.SetCurSel(i);
return true;
}
return false;
}
示例2: UpdateCheckBoxes
void COptionPluginPage::UpdatePageSettings(void)
{
UpdateCheckBoxes();
for (ComboBoxList::iterator cb_iter = m_ComboBoxList.begin(); cb_iter != m_ComboBoxList.end(); cb_iter++)
{
CModifiedComboBox * ComboBox = cb_iter->second;
stdstr SelectedValue;
ComboBox->SetChanged(g_Settings->LoadStringVal(cb_iter->first, SelectedValue));
for (int i = 0, n = ComboBox->GetCount(); i < n; i++)
{
const CPluginList::PLUGIN ** PluginPtr = (const CPluginList::PLUGIN **)ComboBox->GetItemDataPtr(i);
if (PluginPtr == NULL)
{
continue;
}
const CPluginList::PLUGIN * Plugin = *PluginPtr;
if (Plugin == NULL)
{
continue;
}
if (_stricmp(SelectedValue.c_str(), Plugin->FileName.c_str()) != 0)
{
continue;
}
ComboBox->SetDefault((WPARAM)Plugin);
}
}
PluginItemChanged(GFX_LIST, GFX_ABOUT, false);
PluginItemChanged(AUDIO_LIST, AUDIO_ABOUT, false);
PluginItemChanged(CONT_LIST, CONT_ABOUT, false);
PluginItemChanged(RSP_LIST, RSP_ABOUT, false);
}
示例3: SetDlgItemTextW
CAdvancedOptionsPage::CAdvancedOptionsPage(HWND hParent, const RECT & rcDispay)
{
if (!Create(hParent, rcDispay))
{
return;
}
//Set the text for all gui Items
SetDlgItemTextW(m_hWnd, IDC_START_ON_ROM_OPEN, wGS(ADVANCE_AUTO_START).c_str());
SetDlgItemTextW(m_hWnd, IDC_ZIP, wGS(ADVANCE_COMPRESS).c_str());
SetDlgItemTextW(m_hWnd, IDC_DEBUGGER, wGS(ADVANCE_DEBUGGER).c_str());
SetDlgItemTextW(m_hWnd, IDC_REMEMBER_CHEAT, wGS(OPTION_REMEMBER_CHEAT).c_str());
SetDlgItemTextW(m_hWnd, IDC_CHECK_RUNNING, wGS(OPTION_CHECK_RUNNING).c_str());
SetDlgItemTextW(m_hWnd, IDC_DISPLAY_FRAMERATE, wGS(OPTION_CHANGE_FR).c_str());
AddModCheckBox(GetDlgItem(IDC_START_ON_ROM_OPEN), Setting_AutoStart);
AddModCheckBox(GetDlgItem(IDC_ZIP), Setting_AutoZipInstantSave);
AddModCheckBox(GetDlgItem(IDC_DEBUGGER), Debugger_Enabled);
AddModCheckBox(GetDlgItem(IDC_REMEMBER_CHEAT), Setting_RememberCheats);
AddModCheckBox(GetDlgItem(IDC_CHECK_RUNNING), Setting_CheckEmuRunning);
AddModCheckBox(GetDlgItem(IDC_DISPLAY_FRAMERATE), UserInterface_DisplayFrameRate);
CModifiedComboBox * ComboBox;
ComboBox = AddModComboBox(GetDlgItem(IDC_FRAME_DISPLAY_TYPE), UserInterface_FrameDisplayType);
if (ComboBox)
{
ComboBox->AddItemW(wGS(STR_FR_VIS).c_str(), FR_VIs);
ComboBox->AddItemW(wGS(STR_FR_DLS).c_str(), FR_DLs);
ComboBox->AddItemW(wGS(STR_FR_PERCENT).c_str(), FR_PERCENT);
}
UpdatePageSettings();
}
示例4: SetDlgItemTextW
CGameRecompilePage::CGameRecompilePage (HWND hParent, const RECT & rcDispay )
{
if (!Create(hParent,rcDispay))
{
return;
}
//Set the text for all gui Items
SetDlgItemTextW(m_hWnd, IDC_CPU_TYPE_TEXT, GS(ROM_CPU_STYLE));
SetDlgItemTextW(m_hWnd, IDC_FUNCFIND_TEXT, GS(ROM_FUNC_FIND));
SetDlgItemTextW(m_hWnd, IDC_ROM_REGCACHE, GS(ROM_REG_CACHE));
SetDlgItemTextW(m_hWnd, IDC_BLOCK_LINKING, GS(ADVANCE_ABL));
SetDlgItemTextW(m_hWnd, IDC_ROM_FASTSP, GS(ROM_FAST_SP));
SetDlgItemTextW(m_hWnd, IDC_SMM_FRAME, GS(ADVANCE_SMCM));
SetDlgItemTextW(m_hWnd, IDC_SMM_CACHE, GS(ADVANCE_SMM_CACHE));
SetDlgItemTextW(m_hWnd, IDC_SMM_DMA, GS(ADVANCE_SMM_PIDMA));
SetDlgItemTextW(m_hWnd, IDC_SMM_VALIDATE, GS(ADVANCE_SMM_VALIDATE));
SetDlgItemTextW(m_hWnd, IDC_SMM_TLB, GS(ADVANCE_SMM_TLB));
SetDlgItemTextW(m_hWnd, IDC_SMM_PROTECT, GS(ADVANCE_SMM_PROTECT));
m_SelfModGroup.Attach(GetDlgItem(IDC_SMM_FRAME));
AddModCheckBox(GetDlgItem(IDC_ROM_REGCACHE),Game_RegCache);
AddModCheckBox(GetDlgItem(IDC_BLOCK_LINKING),Game_BlockLinking);
AddModCheckBox(GetDlgItem(IDC_SMM_CACHE),Game_SMM_Cache);
AddModCheckBox(GetDlgItem(IDC_SMM_DMA),Game_SMM_PIDMA);
AddModCheckBox(GetDlgItem(IDC_SMM_VALIDATE),Game_SMM_ValidFunc);
AddModCheckBox(GetDlgItem(IDC_SMM_TLB),Game_SMM_TLB);
AddModCheckBox(GetDlgItem(IDC_SMM_PROTECT),Game_SMM_Protect);
::ShowWindow(GetDlgItem(IDC_SMM_STORE),SW_HIDE);
//AddModCheckBox(GetDlgItem(IDC_SMM_STORE),Game_SMM_StoreInstruc);
AddModCheckBox(GetDlgItem(IDC_ROM_FASTSP),Game_FastSP);
CModifiedComboBox * ComboBox;
ComboBox = AddModComboBox(GetDlgItem(IDC_CPU_TYPE),Game_CpuType);
if (ComboBox)
{
ComboBox->AddItemW(GS(CORE_RECOMPILER), CPU_Recompiler);
ComboBox->AddItemW(GS(CORE_INTERPTER), CPU_Interpreter);
if (g_Settings->LoadBool(Debugger_Enabled))
{
ComboBox->AddItemW(GS(CORE_SYNC), CPU_SyncCores);
}
}
ComboBox = AddModComboBox(GetDlgItem(IDC_FUNCFIND),Game_FuncLookupMode);
if (ComboBox)
{
ComboBox->AddItemW(GS(FLM_PLOOKUP), FuncFind_PhysicalLookup);
ComboBox->AddItemW(GS(FLM_VLOOKUP), FuncFind_VirtualLookup);
//ComboBox->AddItem(GS(FLM_CHANGEMEM), FuncFind_ChangeMemory);
}
UpdatePageSettings();
}
示例5: ShowAboutButton
void COptionPluginPage::ShowAboutButton ( int id )
{
CModifiedComboBox * ComboBox = NULL;
for (ComboBoxList::iterator cb_iter = m_ComboBoxList.begin(); cb_iter != m_ComboBoxList.end(); cb_iter ++)
{
if ((int)(cb_iter->second->GetMenu()) != id)
{
continue;
}
ComboBox = cb_iter->second;
break;
}
if (ComboBox == NULL)
{
return;
}
int index = ComboBox->GetCurSel();
if (index == CB_ERR)
{
return;
}
const CPluginList::PLUGIN ** PluginPtr = (const CPluginList::PLUGIN **)ComboBox->GetItemDataPtr(index);
if (PluginPtr == NULL)
{
return;
}
const CPluginList::PLUGIN * Plugin = *PluginPtr;
if (Plugin == NULL)
{
return;
}
//Load the plugin
UINT LastErrorMode = SetErrorMode( SEM_FAILCRITICALERRORS );
HMODULE hLib = LoadLibrary(Plugin->FullPath);
SetErrorMode(LastErrorMode);
if (hLib == NULL)
{
return;
}
//Get DLL about
void (__cdecl *DllAbout) ( HWND hWnd );
DllAbout = (void (__cdecl *)(HWND))GetProcAddress( hLib, "DllAbout" );
//call the function from the dll
if (DllAbout != NULL)
DllAbout(m_hWnd);
FreeLibrary(hLib);
}
示例6: ApplyComboBoxes
void COptionPluginPage::ApplyComboBoxes(void)
{
for (ComboBoxList::iterator cb_iter = m_ComboBoxList.begin(); cb_iter != m_ComboBoxList.end(); cb_iter++)
{
CModifiedComboBox * ComboBox = cb_iter->second;
if (ComboBox->IsChanged())
{
int index = ComboBox->GetCurSel();
if (index == CB_ERR)
{
return;
}
const CPluginList::PLUGIN ** PluginPtr = (const CPluginList::PLUGIN **)ComboBox->GetItemDataPtr(index);
if (PluginPtr == NULL)
{
return;
}
const CPluginList::PLUGIN * Plugin = *PluginPtr;
g_Settings->SaveString(cb_iter->first, Plugin->FileName.c_str());
}
if (ComboBox->IsReset())
{
g_Settings->DeleteSetting(cb_iter->first);
ComboBox->SetReset(false);
}
}
}
示例7: PluginItemChanged
void COptionPluginPage::PluginItemChanged(int id, int AboutID, bool bSetChanged)
{
CModifiedComboBox * ComboBox = NULL;
for (ComboBoxList::iterator cb_iter = m_ComboBoxList.begin(); cb_iter != m_ComboBoxList.end(); cb_iter++)
{
if ((int)(cb_iter->second->GetMenu()) != id)
{
continue;
}
ComboBox = cb_iter->second;
break;
}
if (ComboBox == NULL)
{
return;
}
int index = ComboBox->GetCurSel();
if (index == CB_ERR)
{
return;
}
const CPluginList::PLUGIN ** PluginPtr = (const CPluginList::PLUGIN **)ComboBox->GetItemDataPtr(index);
if (PluginPtr)
{
const CPluginList::PLUGIN * Plugin = *PluginPtr;
if (Plugin)
{
::EnableWindow(GetDlgItem(AboutID), Plugin->AboutFunction);
}
}
if (bSetChanged)
{
ComboBox->SetChanged(true);
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
}
}
示例8: AddPlugins
void COptionPluginPage::AddPlugins(int ListId, SettingID Type, PLUGIN_TYPE PluginType)
{
stdstr Default = g_Settings->LoadStringVal(Type);
CModifiedComboBox * ComboBox;
ComboBox = AddModComboBox(GetDlgItem(ListId), Type);
for (int i = 0, n = m_PluginList.GetPluginCount(); i < n; i++)
{
const CPluginList::PLUGIN * Plugin = m_PluginList.GetPluginInfo(i);
if (Plugin == NULL)
{
continue;
}
if (Plugin->Info.Type != PluginType)
{
continue;
}
if (_stricmp(Default.c_str(), Plugin->FileName.c_str()) == 0)
{
ComboBox->SetDefault((WPARAM)Plugin);
}
ComboBox->AddItem(Plugin->Info.Name, (WPARAM)Plugin);
}
}
示例9: ApplyComboBoxes
void COptionPluginPage::ApplyComboBoxes ( void )
{
for (ComboBoxList::iterator cb_iter = m_ComboBoxList.begin(); cb_iter != m_ComboBoxList.end(); cb_iter ++)
{
CModifiedComboBox * ComboBox = cb_iter->second;
if (ComboBox->IsChanged())
{
int index = ComboBox->GetCurSel();
if (index == CB_ERR)
{
return;
}
const CPluginList::PLUGIN ** PluginPtr = (const CPluginList::PLUGIN **)ComboBox->GetItemDataPtr(index);
if (PluginPtr == NULL)
{
return;
}
const CPluginList::PLUGIN * Plugin = *PluginPtr;
g_Settings->SaveString(cb_iter->first,Plugin->FileName.c_str());
switch (Plugin->Info.Type)
{
case PLUGIN_TYPE_RSP: g_Settings->SaveBool(Plugin_RSP_Changed,true); break;
case PLUGIN_TYPE_GFX: g_Settings->SaveBool(Plugin_GFX_Changed,true); break;
case PLUGIN_TYPE_AUDIO: g_Settings->SaveBool(Plugin_AUDIO_Changed,true); break;
case PLUGIN_TYPE_CONTROLLER: g_Settings->SaveBool(Plugin_CONT_Changed,true); break;
default:
g_Notify->BreakPoint(__FILE__,__LINE__);
}
}
if (ComboBox->IsReset())
{
g_Settings->DeleteSetting(cb_iter->first);
ComboBox->SetReset(false);
}
}
}