LRESULT CDuiFrame::DoFrameEvent(UINT uMsg,WPARAM wParam,LPARAM lParam) { LRESULT lRet=0; m_pHost->AddRef(); m_pHost->SetMsgHandled(TRUE); switch(uMsg) { case WM_MOUSEMOVE: OnFrameMouseMove((UINT)wParam,CPoint(GET_X_LPARAM(lParam),GET_Y_LPARAM(lParam))); break; case WM_MOUSEHOVER: OnFrameMouseEvent(uMsg,wParam,lParam); break; case WM_MOUSELEAVE: OnFrameMouseLeave(); break; case WM_SETCURSOR: lRet=OnFrameSetCursor(CPoint(GET_X_LPARAM(lParam),GET_Y_LPARAM(lParam))); if(!lRet) { SetCursor(LoadCursor(NULL,IDC_ARROW)); } break; case WM_KEYDOWN: OnFrameKeyDown((UINT)wParam,(UINT)lParam & 0xFFFF, (UINT)((lParam & 0xFFFF0000) >> 16)); break; case WM_SETFOCUS: OnActivate(WA_ACTIVE); break; case WM_KILLFOCUS: OnActivate(WA_INACTIVE); break; case WM_ACTIVATE: OnActivate(LOWORD(wParam)); break; case WM_IME_STARTCOMPOSITION: case WM_IME_ENDCOMPOSITION: case WM_IME_COMPOSITION: case WM_IME_CHAR: OnFrameKeyEvent(uMsg,wParam,lParam); break; default: if(uMsg>=WM_KEYFIRST && uMsg<=WM_KEYLAST) OnFrameKeyEvent(uMsg,wParam,lParam); else if(uMsg>=WM_MOUSEFIRST && uMsg <= WM_MOUSELAST) OnFrameMouseEvent(uMsg,wParam,lParam); else m_pHost->SetMsgHandled(FALSE); break; } m_pHost->Release(); return lRet; }
INT_PTR CDialogInstall::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_INITDIALOG: return OnInitDialog(wParam, lParam); case WM_ACTIVATE: return OnActivate(wParam, lParam); case WM_COMMAND: return OnCommand(wParam, lParam); case WM_NOTIFY: return OnNotify(wParam, lParam); case WM_CLOSE: { delete this; } return TRUE; } return FALSE; }
STDMETHODIMP CBasePropertyPage::Activate(HWND hwndParent, LPCRECT pRect, BOOL fModal) { CheckPointer(pRect,E_POINTER); // Return failure if SetObject has not been called. if (m_bObjectSet == FALSE) { return E_UNEXPECTED; } if (m_hwnd) { return E_UNEXPECTED; } m_hwnd = CreateDialogParam(g_hInst, MAKEINTRESOURCE(m_DialogId), hwndParent, DialogProc, (LPARAM) this); if (m_hwnd == NULL) { return E_OUTOFMEMORY; } OnActivate(); Move(pRect); return Show(SW_SHOWNORMAL); }
void CheatManager::RunCheats(void) { std::vector<CheatItem*>::iterator it = m_pCheats.begin(); for(; it != m_pCheats.end(); ++it) { if((*it)->IsActive()) { //Cheat is running m_bRunning = true; //How much time for cheat to run m_Duration = (*it)->GetDuration(); //Set the active cheat m_pActiveCheat = (*it); OnActivate(m_pActiveCheat); Start(); //break out of the loop break; } } Clear(); }
LRESULT TopWindow::OnMessage(HWND _hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_CLOSE: if (OnClose()) /* true returned: message was handled */ return 0; break; case WM_ACTIVATE: #ifdef HAVE_AYGSHELL_DLL ayg_shell_dll.SHHandleWMActivate(_hWnd, wParam, lParam, &s_sai, FALSE); #endif if (wParam == WA_INACTIVE ? OnDeactivate() : OnActivate()) return true; break; case WM_SETTINGCHANGE: #ifdef HAVE_AYGSHELL_DLL ayg_shell_dll.SHHandleWMSettingChange(_hWnd, wParam, lParam, &s_sai); #endif break; }; return ContainerWindow::OnMessage(_hWnd, message, wParam, lParam); }
void Widget::OnPreShortcut(const SDL_keysym *sym) { int mod = sym->mod & 0xfff; // filters out numlock, capslock, which f**k things up if ((sym->sym == m_shortcut.sym) && (mod == m_shortcut.mod)) { OnActivate(); } }
bool CSynapseClient::CheckSetActive() { if ( mbActive ) { return true; } int i,max = GetAPICount(); for ( i = 0; i < max; i++ ) { APIDescriptor_t *pAPI = GetAPIDescriptor( i ); if ( pAPI->mType == SYN_REQUIRE && !pAPI->mbTableInitDone ) { return false; } } // if we have managers with fixed list, those need to be completely filled in too vector<CSynapseAPIManager *>::iterator iManager; for ( iManager = mManagersList.begin(); iManager != mManagersList.end(); iManager++ ) { if ( !( *iManager )->CheckSetActive() ) { return false; // one of the managers doesn't have all it needs yet } } // call OnActivate to let the client perform last minute checks // NOTE: this should be fatal instead of letting the engine try other combinations if ( !OnActivate() ) { return false; } // yes, all required interfaces have been initialized Syn_Printf( "'%s' activated\n", GetInfo() ); mbActive = true; return true; }
void HydraIRCPlugin::Init( void ) { #ifdef DEBUG OutputDebugString("HydraIRCPlugin::Init() Called\n"); #endif m_Active = TRUE; /* #ifdef DEBUG // Testing, makes sure the dll can free memory allocated via the core m_AllocTest1 = malloc(100); #endif */ // Call the plugin's init function if it has one if (&HydraIRCPlugin::OnActivate != NULL) OnActivate(); /* #ifdef DEBUG // Testing, makes sure the core can free memory allocated via the dll free(m_AllocTest2); #endif */ }
void CDlgPopup::PopupWindow() { ShowWindow(SW_SHOWNOACTIVATE); if (GetActiveWindow() == this) { OnActivate(WA_ACTIVE,NULL,FALSE); } }
tresult PLUGIN_API IPlugVST3Plugin::setActive(TBool state) { TRACE; OnActivate((bool) state); return SingleComponentEffect::setActive(state); }
//----------------------------------------------------------------------------- // Purpose: Called whtn this tool is becoming the active tool. // Input : eOldTool - The tool that was previously active. //----------------------------------------------------------------------------- void CBaseTool::Activate() { OnActivate(); m_pDocument->UpdateAllViews( MAPVIEW_UPDATE_TOOL ); m_bActiveTool = true; }
bool HexEditViewBase::SetActive(bool makeMeActive) { if ( makeMeActive == m_IsActive ) return m_IsActive; OnActivate( makeMeActive ); m_IsActive = makeMeActive; return !m_IsActive; }
void DebugMenu::Refresh() { if (!m_Panel || !IsVisible()) return; OnDeactivate(); OnActivate(); }
tresult PLUGIN_API IPlugVST3::setActive (TBool state) { TRACE; OnActivate((bool) state); // TODO: check if in/out config is supported? return SingleComponentEffect::setActive (state); }
bool RadioButton::OnMouseDown(MouseButtonEvent *e) { if (e->button == SDL_BUTTON_LEFT) { onPress.emit(); OnActivate(); return false; } else return true; }
void CFuncPortalDetector::InputToggle( inputdata_t &inputdata ) { m_bActive = !m_bActive; if ( m_bActive ) { OnActivate(); } }
void CFWL_CheckBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return; switch (pMessage->GetClassID()) { case CFWL_MessageType::Activate: { OnActivate(pMessage); break; } case CFWL_MessageType::SetFocus: { OnFocusChanged(pMessage, TRUE); break; } case CFWL_MessageType::KillFocus: { OnFocusChanged(pMessage, FALSE); break; } case CFWL_MessageType::Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); switch (pMsg->m_dwCmd) { case FWL_MouseCommand::LeftButtonDown: { OnLButtonDown(pMsg); break; } case FWL_MouseCommand::LeftButtonUp: { OnLButtonUp(pMsg); break; } case FWL_MouseCommand::Move: { OnMouseMove(pMsg); break; } case FWL_MouseCommand::Leave: { OnMouseLeave(pMsg); break; } default: break; } break; } case CFWL_MessageType::Key: { CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage); if (pKey->m_dwCmd == FWL_KeyCommand::KeyDown) OnKeyDown(pKey); break; } default: { break; } } CFWL_WidgetImpDelegate::OnProcessMessage(pMessage); }
//-------------------------------------------------------------------------------- CCallInterceptor::CCallInterceptor() : CTFlyer< CCallInterceptor, CFlyStrapBase >() { if( m_pPrevious ) { CFlyStrapBase* pFlyStrapBase = dynamic_cast< CFlyStrapBase* >( m_pPrevious ); if( pFlyStrapBase ) { pFlyStrapBase->OnDeactivate(); } } OnActivate(); }
virtual void ProcessEvent( EFlowEvent event, SActivationInfo* pActInfo ) { switch ( event ) { case eFE_Update: OnUpdate( pActInfo ); break; case eFE_Activate: OnActivate( pActInfo ); break; } }
int32_t CFWL_CheckBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; FX_DWORD dwMsgCode = pMessage->GetClassID(); int32_t iRet = 1; switch (dwMsgCode) { case FWL_MSGHASH_Activate: { OnActivate(pMessage); break; } case FWL_MSGHASH_SetFocus: case FWL_MSGHASH_KillFocus: { OnFocusChanged(pMessage, dwMsgCode == FWL_MSGHASH_SetFocus); break; } case FWL_MSGHASH_Mouse: { CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); FX_DWORD dwCmd = pMsg->m_dwCmd; switch (dwCmd) { case FWL_MSGMOUSECMD_LButtonDown: { OnLButtonDown(pMsg); break; } case FWL_MSGMOUSECMD_LButtonUp: { OnLButtonUp(pMsg); break; } case FWL_MSGMOUSECMD_MouseMove: { OnMouseMove(pMsg); break; } case FWL_MSGMOUSECMD_MouseLeave: { OnMouseLeave(pMsg); break; } default: {} } break; } case FWL_MSGHASH_Key: { CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage); if (pKey->m_dwCmd == FWL_MSGKEYCMD_KeyDown) { OnKeyDown(pKey); } break; } default: { iRet = 0; } } CFWL_WidgetImpDelegate::OnProcessMessage(pMessage); return iRet; }
HRESULT CDVSBasePPage::OnApplyChanges() { ASSERT(m_pDirectVobSub); AFX_MANAGE_STATE(AfxGetStaticModuleState()); if (m_bIsInitialized) { OnDeactivate(); UpdateObjectData(true); m_pDirectVobSub->UpdateRegistry(); // * OnActivate(); } return NOERROR; }
void UGAAbilityBase::NativeOnBeginAbilityActivation(bool bApplyActivationEffect) { UE_LOG(AbilityFramework, Log, TEXT("Begin Executing Ability: %s"), *GetName()); if (OnConfirmCastingEndedDelegate.IsBound()) { OnConfirmCastingEndedDelegate.Broadcast(); } //ActivationInfo.SetActivationInfo(); ApplyActivationEffect(bApplyActivationEffect); OnActivate(); OnActivateBeginDelegate.Broadcast(); AbilityComponent->AppliedTags.AddTagContainer(ActivationAddedTags); //OnAbilityExecuted(); }
void CGuiWidget::SetIsActive(bool a, bool b) { if (a == xf6_26_isActive) return; xf6_26_isActive = a; if (a) { RegisterEventHandler(ETraversalMode::Children); OnActivate(b); } else { RegisterEventHandler(ETraversalMode::Children); OnDeActivate(); } }
void CPhysForce::Activate( void ) { BaseClass::Activate(); if ( m_attachedObject == NULL ) { m_attachedObject = gEntList.FindEntityByName( NULL, m_nameAttach, NULL ); } // Let the derived class set up before we throw the switch OnActivate(); if ( m_pController ) { ActivateForce(); } }
void DocRoot::OnCloseDocument() { if (bIsOpen) { gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands, call more than once! //KGA : 7/5/96 : document sometimes not active ??? causes cmd to go to wrong document/window!!! if (pFirstDoc!=this) OnActivate(True); gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands, call more than once! //if (gs_pPrj->pPrjDoc) // AfxMessageBox("Are you sure you want to remove the document from the project?"); //gs_pCmd->ProcessAStr("CLOSE DOCUMENT \r"); CloseDocument(); } }
LRESULT TopWindow::OnMessage(HWND _hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_CLOSE: if (OnClose()) /* true returned: message was handled */ return 0; break; case WM_ACTIVATE: if (wParam == WA_INACTIVE ? OnDeactivate() : OnActivate()) return true; break; } return ContainerWindow::OnMessage(_hWnd, message, wParam, lParam); }
STDMETHODIMP CDVSBasePPage::Activate(HWND hwndParent, LPCRECT pRect, BOOL fModal) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); CheckPointer(pRect,E_POINTER); /* // Return failure if SetObject has not been called. if (m_bObjectSet == FALSE) { return E_UNEXPECTED; } */ if(m_hwnd) return E_UNEXPECTED; m_hwnd = CreateDialogParam(AfxGetResourceHandle(), MAKEINTRESOURCE(m_DialogId), hwndParent, DialogProc, (LPARAM)this); if(m_hwnd == NULL) return E_OUTOFMEMORY; OnActivate(); Move(pRect); return Show(SW_SHOWNORMAL); }
HRESULT CDVSBasePPage::OnApplyChanges() { ASSERT(m_pDirectVobSub); AFX_MANAGE_STATE(AfxGetStaticModuleState()); if (m_bIsInitialized && m_bDirty) { OnDeactivate(); UpdateObjectData(true); m_pDirectVobSub->UpdateRegistry(); // * OnActivate(); m_bDirty = FALSE; if (m_pPageSite) { m_pPageSite->OnStatusChange(PROPPAGESTATUS_CLEAN); } } return NOERROR; }
/* ============== sdHudModule::Activate ============== */ void sdHudModule::Activate( void ) { if ( _activated ) { return; } _activated = true; sdUserInterfaceLocal* ui = gameLocal.GetUserInterface( _guiHandle ); if ( ui ) { ui->Activate(); } idPlayer* localPlayer = gameLocal.GetLocalPlayer(); if ( localPlayer != NULL ) { if ( DoWeaponLock() ) { localPlayer->SetClientWeaponLock( true ); localPlayer->oldButtons.btn.attack = true; } } OnActivate(); }
BOOL DocRoot::OnSaveDocument(const char* pszPathName) { gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands, call more than once! //KGA : 7/5/96 : document sometimes not active ??? causes cmd to go to wrong document/window!!! if (pFirstDoc!=this) OnActivate(True); gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands, call more than once! //Check if a SaveAs is using a filename that is allready open in this project... const int len = strlen(pszPathName); CDocTemplate* pTempl = GetDocTemplate(); if (pTempl) { POSITION Pos = pTempl->GetFirstDocPosition(); while (Pos) { CDocument* pDoc = pTempl->GetNextDoc(Pos); if (pDoc!=this) { CString PathName = pDoc->GetPathName(); if (PathName.GetLength()==len && _stricmp((const char*)PathName, pszPathName)==0) { LogError("SysCAD", LF_Exclamation, "Save As '%s' failed. Document/window allready open!", pszPathName); return False; } } } } //Strng Cmd; //Cmd.Set("SAVE DOCUMENT %s\r",pszPathName); //gs_pCmd->ProcessAStr(Cmd()); SaveDocument(pszPathName);//dn.GetBuffer(0)); return True; }