本文整理汇总了C++中UpdateMenus函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateMenus函数的具体用法?C++ UpdateMenus怎么用?C++ UpdateMenus使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateMenus函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetTracks
void AudioView::Clear()
{
TrackList *tracks = GetTracks();
VTrack *n = tracks->First();
while(n) {
if (n->selected)
n->Clear(sel0, sel1);
n = tracks->Next();
}
sel1 = sel0;
PushState();
FixScrollbars();
REDRAW(trackPanel);
REDRAW(rulerPanel);
UpdateMenus();
}
示例2: __CtrlButtonDown
void MainWindow::Update()
{
emugl->updateGL();
for (int i = 0; i < controllistCount; i++)
{
if (pressedKeys.contains(controllist[i].key) ||
input_state.pad_buttons_down & controllist[i].emu_id)
__CtrlButtonDown(controllist[i].psp_id);
else
__CtrlButtonUp(controllist[i].psp_id);
}
__CtrlSetAnalog(input_state.pad_lstick_x, input_state.pad_lstick_y);
if (lastUIState != globalUIState) {
lastUIState = globalUIState;
UpdateMenus();
}
}
示例3: Debugger_Disasm
/* SLOTS */
void MainWindow::Boot()
{
dialogDisasm = new Debugger_Disasm(currentDebugMIPS, this, this);
if(g_Config.bShowDebuggerOnLoad)
dialogDisasm->show();
if(g_Config.bFullScreen != isFullScreen())
on_action_OptionsFullScreen_triggered();
memoryWindow = new Debugger_Memory(currentDebugMIPS, this, this);
memoryTexWindow = new Debugger_MemoryTex(this);
displaylistWindow = new Debugger_DisplayList(currentDebugMIPS, this, this);
notifyMapsLoaded();
if (nextState == CORE_RUNNING)
on_action_EmulationRun_triggered();
UpdateMenus();
}
示例4: PaintViews
void PaintViews( HDC hdc, RECT region ) // paint the screen from either front or blended views
{
bool frontUpdate, backUpdate; // keep track of regeneration
if ( FrontView ) // first regenerate the front view (if needed)
{
frontUpdate = FrontView->Regenerate( region, CurrSeries->pixel_size, CurrSeries->offset_x,
CurrSeries->offset_y, CurrSeries->useProxies );
if ( BlendView && BackView ) // only have blend view when have back view
{ // blend view depends also on back view so regenerate it also
backUpdate = BackView->Regenerate( region, CurrSeries->pixel_size, CurrSeries->offset_x,
CurrSeries->offset_y, CurrSeries->useProxies );
if ( frontUpdate || backUpdate ) UpdateBlendView(); // regenerate the blend of front and back views
BlendView->Display( hdc, region ); // blt to screen dc (since BlendView exists its displayed)
}
else FrontView->Display( hdc, region ); // otherwise just blt front view to screen dc
UpdateMenus();
UpdateTitles();
}
}
示例5: usleep
void MainWindow::on_action_EmulationStop_triggered()
{
/*for (int i=0; i<numCPUs; i++)*/
if(dialogDisasm)
{
dialogDisasm->Stop();
}
usleep(100); // TODO : UGLY wait for event instead
/*for (int i=0; i<numCPUs; i++)
if (disasmWindow[i])
SendMessage(disasmWindow[i]->GetDlgHandle(), WM_CLOSE, 0, 0);
for (int i=0; i<numCPUs; i++)
if (memoryWindow[i])
SendMessage(memoryWindow[i]->GetDlgHandle(), WM_CLOSE, 0, 0);*/
EmuThread_Stop();
SetPlaying(0);
//Update();
UpdateMenus();
}
示例6: UpdateMenus
void MainWindow::on_actionLogHLEWarning_triggered()
{
LogManager::GetInstance()->SetLogLevel(LogTypes::HLE, LogTypes::LWARNING);
UpdateMenus();
}
示例7: setDefLogLevel
void MainWindow::on_actionLogDefInfo_triggered()
{
setDefLogLevel(LogTypes::LINFO);
UpdateMenus();
}
示例8: WndProc
//.........这里部分代码省略.........
}
}
}
}
return 0;
case WM_DROPFILES:
{
if (!EmuThread_Ready())
return DefWindowProc(hWnd, message, wParam, lParam);
HDROP hdrop = (HDROP)wParam;
int count = DragQueryFile(hdrop,0xFFFFFFFF,0,0);
if (count != 1)
{
MessageBox(hwndMain,"You can only load one file at a time","Error",MB_ICONINFORMATION);
}
else
{
TCHAR filename[512];
DragQueryFile(hdrop,0,filename,512);
TCHAR *type = filename+_tcslen(filename)-3;
SendMessage(hWnd, WM_COMMAND, ID_EMULATION_STOP, 0);
// Ugly, need to wait for the stop message to process in the EmuThread.
Sleep(20);
MainWindow::SetPlaying(filename);
MainWindow::Update();
NativeMessageReceived("boot", filename);
}
}
break;
case WM_CLOSE:
/*
if (g_Config.bConfirmOnQuit && __KernelIsRunning())
if (IDYES != MessageBox(hwndMain, "A game is in progress. Are you sure you want to exit?",
"Are you sure?", MB_YESNO | MB_ICONQUESTION))
return 0;
//*/
EmuThread_Stop();
return DefWindowProc(hWnd,message,wParam,lParam);
case WM_DESTROY:
KillTimer(hWnd, TIMER_CURSORUPDATE);
KillTimer(hWnd, TIMER_CURSORMOVEUPDATE);
PostQuitMessage(0);
break;
case WM_USER+1:
if (disasmWindow[0])
SendMessage(disasmWindow[0]->GetDlgHandle(), WM_CLOSE, 0, 0);
if (memoryWindow[0])
SendMessage(memoryWindow[0]->GetDlgHandle(), WM_CLOSE, 0, 0);
disasmWindow[0] = new CDisasm(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
DialogManager::AddDlg(disasmWindow[0]);
disasmWindow[0]->Show(g_Config.bShowDebuggerOnLoad);
if (g_Config.bFullScreen)
_ViewFullScreen(hWnd);
memoryWindow[0] = new CMemoryDlg(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
DialogManager::AddDlg(memoryWindow[0]);
if (disasmWindow[0])
disasmWindow[0]->NotifyMapLoaded();
if (memoryWindow[0])
memoryWindow[0]->NotifyMapLoaded();
SetForegroundWindow(hwndMain);
break;
case WM_MENUSELECT:
// Unfortunately, accelerate keys (hotkeys) shares the same enabled/disabled states
// with corresponding menu items.
UpdateMenus();
break;
// Turn off the screensaver.
// Note that if there's a screensaver password, this simple method
// doesn't work on Vista or higher.
case WM_SYSCOMMAND:
{
switch (wParam)
{
case SC_SCREENSAVE:
return 0;
case SC_MONITORPOWER:
return 0;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
示例9: Show
BOOL Show(HINSTANCE hInstance, int nCmdShow)
{
hInst = hInstance; // Store instance handle in our global variable
int zoom = g_Config.iWindowZoom;
if (zoom < 1) zoom = 1;
if (zoom > 4) zoom = 4;
RECT rc, rcOrig;
GetWindowRectAtZoom(zoom, rcOrig, rc);
u32 style = WS_OVERLAPPEDWINDOW;
hwndMain = CreateWindowEx(0,szWindowClass, "", style,
rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance, NULL);
if (!hwndMain)
return FALSE;
hwndDisplay = CreateWindowEx(0, szDisplayClass, TEXT(""), WS_CHILD | WS_VISIBLE,
rcOrig.left, rcOrig.top, rcOrig.right - rcOrig.left, rcOrig.bottom - rcOrig.top, hwndMain, 0, hInstance, 0);
if (!hwndDisplay)
return FALSE;
menu = GetMenu(hwndMain);
#ifdef FINAL
RemoveMenu(menu,2,MF_BYPOSITION);
RemoveMenu(menu,2,MF_BYPOSITION);
#endif
MENUINFO info;
ZeroMemory(&info,sizeof(MENUINFO));
info.cbSize = sizeof(MENUINFO);
info.cyMax = 0;
info.dwStyle = MNS_CHECKORBMP;
info.fMask = MIM_STYLE;
for (int i = 0; i < GetMenuItemCount(menu); i++)
{
SetMenuInfo(GetSubMenu(menu,i),&info);
}
UpdateMenus();
//accept dragged files
DragAcceptFiles(hwndMain, TRUE);
hideCursor = true;
SetTimer(hwndMain, TIMER_CURSORUPDATE, CURSORUPDATE_INTERVAL_MS, 0);
Update();
SetPlaying(0);
if(g_Config.bFullScreenOnLaunch)
_ViewFullScreen(hwndMain);
ShowWindow(hwndMain, nCmdShow);
W32Util::MakeTopMost(hwndMain, g_Config.bTopMost);
#if ENABLE_TOUCH
RegisterTouchWindow(hwndDisplay, TWF_WANTPALM);
#endif
RAWINPUTDEVICE keyboard;
memset(&keyboard, 0, sizeof(keyboard));
keyboard.usUsagePage = 1;
keyboard.usUsage = 6;
keyboard.dwFlags = 0; // RIDEV_NOLEGACY | ;
RegisterRawInputDevices(&keyboard, 1, sizeof(RAWINPUTDEVICE));
SetFocus(hwndDisplay);
return TRUE;
}
示例10: SetZoom
void MainWindow::on_action_OptionsScreen4x_triggered()
{
SetZoom(4);
UpdateMenus();
}