void CTTToeView::OnLButtonDown(UINT nFlags, CPoint point) { Action act = menu->lButtonPressed(point); if(!aiThinking){ if(act.status & Menu::POINT_INSIDE){ if(act.valueReturned){ processMenuAction(act.value); } } Point pt = field->lButtonPressed(point); // Queueing the ai move if(pt.getIsValid()){ lastMove = pt; field->makeMove(lastMove, BaseCell::MODE_PLAYER, true); getMainFrame()->setMoveNum(field->getMovesMade()); moveQueued = true; } } CView::OnLButtonDown(nFlags, point); }
bool KWindow::OnCommand( int cmd) { HMENU hmenu = GetMenu( hwnd); #if defined(UNDER_CE) if ( !hmenu && hbar ) hmenu = CommandBar_GetMenu( hbar, 0); #endif if ( hmenu ) processMenuAction( hmenu, cmd); return false; }