本文整理汇总了C++中Message::AccessData方法的典型用法代码示例。如果您正苦于以下问题:C++ Message::AccessData方法的具体用法?C++ Message::AccessData怎么用?C++ Message::AccessData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Message
的用法示例。
在下文中一共展示了Message::AccessData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ui_HandleKeypress
sint32 ui_HandleKeypress(WPARAM wParam, LPARAM lParam)
{
WORLD_DIRECTION d;
BOOL move = FALSE;
#ifdef _PLAYTEST
int i;
#endif
BOOL isMyTurn = !g_network.IsActive() || g_network.IsMyTurn();
Unit city;
if ( g_isKMScreen) {
switch(wParam) {
case VK_ESCAPE:
case VK_LEFT + 256:
case VK_RIGHT + 256:
case VK_UP + 256:
case VK_DOWN + 256:
case 29:
case 28:
return TRUE;
default:
km_screen_remapKey( wParam, lParam );
return TRUE;
}
}
#ifdef _PLAYTEST
if(commandMode) {
switch(wParam) {
case '\r' + 128: wParam = '\r'; break;
case '\t' + 128: wParam = '\t'; break;
case 8 + 128: wParam = 8; break;
}
commandMode = g_commandLine.AddKey(static_cast<char>(wParam));
return TRUE;
}
#endif
if (wParam == VK_ESCAPE) {
extern OptionsWindow *g_optionsWindow;
if(g_c3ui->TopWindow() && g_c3ui->TopWindow() == DipWizard::GetWindow()) {
} else if(g_keyboardHandlers.GetTail()) {
g_keyboardHandlers.GetTail()->kh_Close();
} else if (g_civApp->IsGameLoaded()) {
if(g_currentMessageWindow &&
g_currentMessageWindow->GetMessage() &&
(g_theMessagePool->IsValid(*g_currentMessageWindow->GetMessage()))) {
g_currentMessageWindow->GetMessage()->Minimize();
} else if(g_modalMessage) {
Message *msg = g_modalMessage->GetMessage();
if(msg && g_theMessagePool->IsValid(*msg)) {
Assert(msg->IsAlertBox());
MessageData *data = msg->AccessData();
if(data->GetNumButtons() <= 2 && data->GetNumButtons() > 0) {
data->GetButton(0)->Callback();
}
}
} else if (g_optionsWindow && g_c3ui->GetWindow(g_optionsWindow->Id())) {
optionsscreen_removeMyWindow(AUI_BUTTON_ACTION_EXECUTE);
} else if(g_c3ui->TopWindow() && g_c3ui->TopWindow()->HandleKey(wParam)) {
} else if(g_battleViewWindow) {
battleview_ExitButtonActionCallback( NULL, AUI_BUTTON_ACTION_EXECUTE, 0, NULL);
} else {
optionsscreen_Initialize();
optionsscreen_displayMyWindow(1);
}
}
return TRUE;
}
aui_Window *topWindow = g_c3ui->TopWindow();
if(topWindow && (!g_controlPanel || topWindow != g_controlPanel->GetWindow()) && topWindow != g_statusWindow) {
if(topWindow->HandleKey(wParam))
return 0;
}
if (!theKeyMap) return 0;
if (g_slicEngine && g_slicEngine->RunKeyboardTrigger(static_cast<char>(wParam)))
//.........这里部分代码省略.........