本文整理汇总了C++中UpdateList函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateList函数的具体用法?C++ UpdateList怎么用?C++ UpdateList使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateList
void C4StartupNetDlg::OnSec1Timer()
{
// no updates if dialog is inactive (e.g., because a join password dlg is shown!)
if (!IsActive(true))
return;
// Execute discovery
if (!iGameDiscoverInterval--)
{
DiscoverClient.StartDiscovery();
iGameDiscoverInterval = C4NetGameDiscoveryInterval;
}
DiscoverClient.Execute(0);
UpdateList(false);
}
示例2: ADD_LOG
void CTabPageProgram::OnBnClickedButtonModify()
{
ADD_LOG();
if (!m_bUndateList) {
MessageBox(_T("进程已经运行,请勿修改。或暂停监听"), _T("提示"), MB_OKCANCEL);
return;
}
int n = m_lt_ShowProgram.GetSelectionMark();
if (n < 0 || n > m_lt_ShowProgram.GetItemCount()) return;
ConfigData* p_tran = m_pProgress->m_pProcessControl->GetConfigData(n);
if (p_tran != NULL) {
CAddExecuteDlg dlg(p_tran, m_pProgress, TRUE);
dlg.DoModal();
}
UpdateList();
}
示例3: UpdateList
BOOL CEntityListDlg::OnInitDialog()
{
CDialog::OnInitDialog();
UpdateList();
CRect rct;
m_lstEntity.GetClientRect(rct);
m_lstEntity.InsertColumn(0, "Key", LVCFMT_LEFT, rct.Width() / 2);
m_lstEntity.InsertColumn(1, "Value", LVCFMT_LEFT, rct.Width() / 2);
m_lstEntity.DeleteColumn(2);
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例4: SetCurrentDirectory
//---------------------------------------------------------------------------
void __fastcall TFileViewDlg::KDClick(TObject *Sender)
{
if( (m_CurFile < 0) || (pCurPage->pList == NULL) ) return;
SetCurrentDirectory(pCurPage->m_Folder.c_str());
AnsiString as;
GetCurFileName(as);
if( YesNoMB( ( Font->Charset != SHIFTJIS_CHARSET )?"Delete '%s'":"'%s'を消去します", as.c_str() ) == IDYES ){
if( unlink(as.c_str()) ){
ErrorFWrite(as.c_str());
}
else {
UpdateList();
}
}
}
示例5: SaveCodes
void ARCodeWidget::OnCodeRemovePressed()
{
auto items = m_code_list->selectedItems();
if (items.empty())
return;
const auto* selected = items[0];
m_ar_codes.erase(m_ar_codes.begin() + m_code_list->row(selected));
SaveCodes();
UpdateList();
m_code_remove->setEnabled(false);
}
示例6: clbMenuOpenFile
void CVICALLBACK clbMenuOpenFile (int menuBar, int menuItem, void *callbackData, int panel)
{
char szFilePath[STD_STRING] = {0};
SaveFileAs( 1 , 1 );
if ( FileSelectPopup ("", "*.icscnf", "*.icscnf", "Load", VAL_LOAD_BUTTON, 0, 1, 1, 1, szFilePath ))
{
bSaveChanges = 0;
OpenConfigurationFile( szFilePath );
UpdateList( panel );
UpdateCurrentItem( panel );
}
}
示例7: dlgAirspacePatternsShowModal
int dlgAirspacePatternsShowModal(void) {
ItemIndex = -1;
if (!ScreenLandscape) {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspacePatterns_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACEPATTERNS_L"));
} else {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspacePatterns.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACEPATTERNS"));
}
if (!wf) return -1;
//ASSERT(wf!=NULL);
wAirspacePatternsList = (WndListFrame*)wf->FindByName(TEXT("frmAirspacePatternsList"));
//ASSERT(wAirspacePatternsList!=NULL);
wAirspacePatternsList->SetBorderKind(BORDERLEFT);
wAirspacePatternsList->SetEnterCallback(OnAirspacePatternsListEnter);
wAirspacePatternsListEntry = (WndOwnerDrawFrame*)wf->
FindByName(TEXT("frmAirspacePatternsListEntry"));
//ASSERT(wAirspacePatternsListEntry!=NULL);
wAirspacePatternsListEntry->SetCanFocus(true);
UpdateList();
wf->ShowModal();
// now retrieve back the properties...
delete wf;
wf = NULL;
return ItemIndex;
}
示例8: OnTimerNotify
static void
OnTimerNotify(gcc_unused WndForm &Sender)
{
if (direction_filter == 0 && !CommonInterface::Calculated().circling) {
Angle a = last_heading - CommonInterface::Calculated().heading;
if (a.AsDelta().AbsoluteDegrees() >= fixed(10)) {
last_heading = CommonInterface::Calculated().heading;
UpdateList();
DataFieldEnum &df = *(DataFieldEnum *)wpDirection->GetDataField();
TCHAR buffer[64];
df.replaceEnumText(0, GetHeadingString(buffer));
wpDirection->RefreshDisplay();
}
}
}
示例9: OnFilterDistance
static void OnFilterDistance(DataField *_Sender,
DataField::DataAccessMode Mode) {
DataFieldString *Sender = (DataFieldString *)_Sender;
switch(Mode) {
case DataField::daChange:
distance_filter = (unsigned)Sender->GetAsInteger() != WILDCARD
? fixed(Sender->GetAsInteger())
: fixed_minus_one;
FilterMode(false);
UpdateList();
break;
case DataField::daSpecial:
return;
}
}
示例10: assert
inline void
ProfileListWidget::CopyClicked()
{
assert(GetList().GetCursorIndex() < list.size());
const auto &item = list[GetList().GetCursorIndex()];
const TCHAR *old_path = item.path;
const TCHAR *old_filename = item.name;
ProfileMap data;
if (!Profile::LoadFile(data, old_path)) {
ShowMessageBox(old_filename, _("Failed to load file."),
MB_OK|MB_ICONEXCLAMATION);
return;
}
if (!CheckProfilePasswordResult(CheckProfilePassword(data)))
return;
StaticString<64> new_name;
new_name.clear();
if (!TextEntryDialog(new_name, _("Profile name")))
return;
StaticString<80> new_filename;
new_filename = new_name;
new_filename += _T(".prf");
StaticString<MAX_PATH> new_path;
LocalPath(new_path.buffer(), new_filename);
if (File::ExistsAny(new_path)) {
ShowMessageBox(new_name, _("File exists already."),
MB_OK|MB_ICONEXCLAMATION);
return;
}
if (!Profile::SaveFile(data, new_path)) {
ShowMessageBox(new_name, _("Failed to save file."),
MB_OK|MB_ICONEXCLAMATION);
return;
}
UpdateList();
SelectPath(new_path);
}
示例11: UpdateData
void CIOCPClientDlg::OnDisconnect()
{
if(m_iCurrentClientID>0)
{
UpdateData(TRUE);
m_iocp.DisconnectClient(m_iCurrentClientID);
UpdateList();
m_iCurrentClientID=0;
DisableClientPanel();
// Deselect The selected Item in the other list.
int SItem=m_CtrlClientList.GetNextItem(-1,LVNI_SELECTED);
if(SItem!=-1)
m_CtrlClientList.SetItemState(SItem,LVNI_ALL, LVIF_TEXT | LVIF_IMAGE | LVIF_STATE);
m_CtrlClientList.SetFocus();
}
}
示例12: ClearList
void CFileView::SetMapDoc(CMapEditorDoc* value)
{
if (_mapDoc != value)
{
if (_mapDoc)
{
ClearList();
_mapDoc->UnregObserver(_mapDocEvent);
}
_mapDoc = value;
if (_mapDoc)
{
_mapDoc->RegObserver(_mapDocEvent);
UpdateList();
}
}
}
示例13: fixed
void
AirspaceFilterListener::OnModified(DataField &df)
{
if (&df == distance_control->GetDataField())
dialog_state.distance = (unsigned)df.GetAsInteger() != WILDCARD
? Units::ToSysDistance(fixed(df.GetAsInteger()))
: fixed(-1);
else if (&df == direction_control->GetDataField())
dialog_state.direction = df.GetAsInteger();
else if (&df == type_control->GetDataField())
dialog_state.type = df.GetAsInteger();
FilterMode(&df == name_control->GetDataField());
UpdateList();
}
示例14: UpdateList
void ARCodeWidget::OnCodeAddPressed()
{
ActionReplay::ARCode ar;
ar.active = true;
CheatCodeEditor ed;
ed.SetARCode(&ar);
if (ed.exec())
{
m_ar_codes.push_back(std::move(ar));
UpdateList();
SaveCodes();
}
}
示例15: m_game
GeckoCodeWidget::GeckoCodeWidget(const GameFile& game)
: m_game(game), m_game_id(game.GetGameID().toStdString()), m_game_revision(game.GetRevision())
{
CreateWidgets();
ConnectWidgets();
IniFile game_ini_local;
// We don't use LoadLocalGameIni() here because user cheat codes that are installed via the UI
// will always be stored in GS/${GAMEID}.ini
game_ini_local.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
IniFile game_ini_default = SConfig::GetInstance().LoadDefaultGameIni(m_game_id, m_game_revision);
m_gecko_codes = Gecko::LoadCodes(game_ini_default, game_ini_local);
UpdateList();
}