本文整理汇总了C++中MessageBox::Activate方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageBox::Activate方法的具体用法?C++ MessageBox::Activate怎么用?C++ MessageBox::Activate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageBox
的用法示例。
在下文中一共展示了MessageBox::Activate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadMaps
//-----------------------------------------------------------------------------
// Purpose: loads the list of available maps into the map list
//-----------------------------------------------------------------------------
void CNewGameDialog::LoadMaps()
{
KeyValues *tmp = new KeyValues("Chapters");
if (tmp->LoadFromFile(g_pFullFileSystem, "chapters.txt", "MOD")){
KeyValues *work = tmp->GetFirstSubKey();
while (work)
{
char mapname[256];
#if 0
char mapname2[256];
#endif
char aliasname[256];
Q_strcpy(mapname, work->GetName());
if (!Q_strcmp(mapname, "!separator")){
maps->AddSeparator();
goto nextFile;
}
else if (!Q_strcmp(mapname, "!title")){
char title[256];
Q_strcpy(title, work->GetString());
char *w = (char*)g_pVGuiLocalize->FindAsUTF8(title);
if (!w)
Q_strcpy(w, title);
maps->AddTitle(w);
goto nextFile;
}
Q_strcpy(aliasname, work->GetString());
#if 0
Q_snprintf(mapname2, sizeof(mapname2), "maps/%s.bsp", mapname);
if (!g_pFullFileSystem->FileExists(mapname2))
{
goto nextFile;
}
#endif
char map[128];
Q_snprintf(map, sizeof(map), "maps/%s", mapname); //TODO: Change me!
char localize[128];
Q_strcpy(localize, g_pVGuiLocalize->FindAsUTF8(aliasname));
// add to the map list
maps->AddMap(map, mapname, (localize ? localize : aliasname));
//maps->AddItem(mapname, new KeyValues("data", "mapname", mapname));
// get the next file
nextFile:
work = work->GetNextKey();
}
}
else{
MessageBox *mes = new MessageBox(L"Error - Missing file", L"file 'chapters.txt' is missing from mod root folder!");
mes->Activate(); mes->MakePopup();
}
tmp->deleteThis();
//maps->CalcBestWidth();
maps->SetPanelSize(152, 86);
}