LRESULT CXTPTaskDialogFrame::OnDialogNavigatePage(WPARAM /*wParam*/, LPARAM lParam) { TASKDIALOGCONFIG* pConfig = (TASKDIALOGCONFIG*)lParam; m_pConfig = pConfig; KillTimer(1); SetWindowText(GetFrameTitle()); if (!CreateClient(FALSE)) { TRACE0("Failed to create Task Dialog UI window.\n"); return FALSE; } OnInitDialog(); // inform callback Task Dialog was constructed. SendNotify(TDN_DIALOG_CONSTRUCTED); SendNotify(TDN_NAVIGATED); return TRUE; }
int CXTPTaskDialogFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CXTPTaskDialogClient::OnCreate(lpCreateStruct) == -1) return -1; SetWindowText(GetFrameTitle()); if (m_pConfig->pszMainIcon == TD_WARNING_ICON) MessageBeep(MB_ICONEXCLAMATION); if (m_pConfig->pszMainIcon == TD_ERROR_ICON) MessageBeep(MB_ICONERROR); if (m_pConfig->pszMainIcon == TD_INFORMATION_ICON) MessageBeep(MB_ICONINFORMATION); if (!CreateClient(TRUE)) { TRACE0("Failed to create Task Dialog UI window.\n"); return FALSE; } // inform callback Task Dialog was constructed. SendNotify(TDN_DIALOG_CONSTRUCTED); // inform callback Task Dialog was created. SendNotify(TDN_CREATED); return 0; }
LRESULT CXTPTaskDialogFrame::OnDialogClickRadioButton(WPARAM wParam, LPARAM /*lParam*/) { CButton* pWnd = DYNAMIC_DOWNCAST(CButton, GetDlgItem((UINT)wParam)); if (!pWnd) return FALSE; if ((pWnd->SendMessage(WM_GETDLGCODE) & DLGC_RADIOBUTTON) == 0) return FALSE; HWND hWndCtrl = ::GetWindow(m_hWnd, GW_CHILD); while (hWndCtrl) { if (::SendMessage(hWndCtrl, WM_GETDLGCODE, 0, 0L) & DLGC_RADIOBUTTON) { ::SendMessage(hWndCtrl, BM_SETCHECK, hWndCtrl == pWnd->GetSafeHwnd(), 0L); } hWndCtrl = ::GetWindow(hWndCtrl, GW_HWNDNEXT); } m_nSelRadioButtonID = (UINT)wParam; SendNotify(TDN_RADIO_BUTTON_CLICKED, (WPARAM)m_nSelRadioButtonID); return TRUE; }
void CGolfer::Execute(float elapsed) { if (ejecttime>0.0f) { ejecttime-=elapsed; if (ejecttime<0.0f)ejecttime=0.0f; } if (schlag.phase!=0.0f) { schlag.phase-=(elapsed*schlagtimescale); BerechneSchlag(); if ((game->IsServer)&&(schlag.getroffen==FALSE)&&(schlag.phase>0.3f)&&(schlag.phase<0.5f)) { CChicken* o=NULL; do { // Hühner wegschleudern, wenn sie mit dem Golfschläger getroffen wurden o=(CChicken*)PerformHit(o); if (o==NULL)break; o->Schlag(parent); schlag.getroffen=TRUE; SendNotify(1,o->id); break; }while(o); } if (schlag.phase<0.0f)schlag.phase=0.0f; } }
VOID CDUIListBox::OnItemClick(const DUIEvent& info) { SendNotify(WM_NOTIFY_LISTBOX_NOTIFY, LBN_WPARAM_CLCIK, (LPARAM)info.pSender); IDUIListItem* pListItem = (IDUIListItem*)info.pSender->GetInterface(IListItem); if(pListItem != NULL) { if(!pListItem->GetGroup()) { INT nClickIndex = GetVisibleItemIndex(info.pSender); if(nClickIndex != -1) { SetCurSel(nClickIndex); } } else { INT nIndex = GetControlIndex(info.pSender); if(nIndex != -1) { ExpandGroup(nIndex, !pListItem->GetExpand()); } } } }
CEGPropertyGridItem* CEGPropertyGrid::InsertItem(CEGPropertyGridItem* pItem, CEGPropertyGridItem* pParent) { if (!pItem) return NULL; if (!pParent) pParent = &m_Root; if (!pParent->GetChild()) pParent->SetChild(pItem); else { // add to end of the sibling list CEGPropertyGridItem* pNext; pNext = pParent->GetChild(); while (pNext->GetSibling()) pNext = pNext->GetSibling(); pNext->SetSibling(pItem); } pItem->SetParent(pParent); pItem->SetPropOwner(this); // auto generate a default ID pItem->SetCtrlID(m_nLastUID++); SendNotify(PTN_INSERTITEM, pItem); UpdatedItems(); return pItem; }
COptionTreeItem * COptionTree::FocusFirst() { // Declare variable COptionTreeItem *otiOld; // Set old to focus otiOld = m_otiFocus; // Set focused item SetFocusedItem(m_otiVisibleList); // Select items if (m_otiFocus != NULL) { SelectItems(NULL, FALSE); m_otiFocus->Select(); } // Notify of selection change if (otiOld != m_otiFocus) { SendNotify(OT_NOTIFY_SELCHANGE, m_otiFocus); } return m_otiFocus; }
CEGPropertyGridItem* CEGPropertyGrid::FocusNext() { CEGPropertyGridItem* pNext; CEGPropertyGridItem* pChange; pChange = m_pFocus; if (m_pFocus==NULL) pNext = m_pVisbleList; else if (m_pFocus->GetNextVisible()) pNext = m_pFocus->GetNextVisible(); else pNext = NULL; if (pNext) SetFocusedItem(pNext); if (m_pFocus) { SelectItems(NULL, FALSE); m_pFocus->Select(); } if (pChange!=m_pFocus) SendNotify(PTN_SELCHANGE, m_pFocus); return pNext; }
CEGPropertyGridItem* CEGPropertyGrid::FocusLast() { CEGPropertyGridItem* pNext; CEGPropertyGridItem* pChange; pChange = m_pFocus; pNext = m_pVisbleList; if (pNext) { while (pNext->GetNextVisible()) pNext = pNext->GetNextVisible(); SetFocusedItem(pNext); if (m_pFocus) { SelectItems(NULL, FALSE); m_pFocus->Select(); } } if (pChange!=m_pFocus) SendNotify(PTN_SELCHANGE, m_pFocus); return pNext; }
void CtiNotify::NotifyRecvDtmf(ChannelInfo* pch,int result,TCHAR dtmf) { LPRECVDTMFPARAM lprecvdtmfparam=(LPRECVDTMFPARAM)malloc(sizeof(RECVDTMFPARAM)); lprecvdtmfparam->result=result; lprecvdtmfparam->dtmf=dtmf; SendNotify(pch->GetID(),EVENT_RECVDTMF,lprecvdtmfparam,sizeof(RECVDTMFPARAM)); }
void CtiNotify::NotifySysEvent(int identify,LPVOID eventdata,int eventsize) { LPSYSEVENTPARAM lpsyseventparam=(LPSYSEVENTPARAM)malloc(sizeof(SYSEVENTPARAM)); lpsyseventparam->eventdata=eventdata; lpsyseventparam->eventsize=eventsize; SendNotify(identify,EVENT_SYSEVENT,lpsyseventparam,sizeof(SYSEVENTPARAM)); }
void CtiNotify::NotifyRecvTone(ChannelInfo* pch,int result,TONEATTRIBUTE tone) { LPRECVTONEPARAM lprecvtoneparam=(LPRECVTONEPARAM)malloc(sizeof(SENDTONEPARAM)); lprecvtoneparam->result=result; lprecvtoneparam->tone=tone; SendNotify(pch->GetID(),EVENT_RECVTONE,lprecvtoneparam,sizeof(SENDTONEPARAM)); }
VOID CDUIListBox::OnItemHover(const DUIEvent& info) { IDUIListItem* pListItem = (IDUIListItem*)info.pSender->GetInterface(IListItem); if(pListItem->GetGroup()) return; if(info.dwEventType == DUI_EVENT_ELE_ITEM_MOUSEENTER) { SendNotify(WM_NOTIFY_LISTBOX_NOTIFY, LBN_WPARAM_HOVERCHANGE, (LPARAM)info.pSender); } INT nHoverIndex(-1); if(info.dwEventType == DUI_EVENT_ELE_ITEM_MOUSEENTER) { nHoverIndex = GetVisibleItemIndex(info.pSender); } else if(info.dwEventType == DUI_EVENT_ELE_ITEM_MOUSELEAVE) { nHoverIndex = -1; } if(m_nHoverIndex != nHoverIndex) { SetCurHoverExpand(nHoverIndex); } if(m_bHoverSelect) { if(nHoverIndex != -1 && nHoverIndex != m_nSelectIndex) { SetCurSel(nHoverIndex); } } }
COptionTreeItem * COptionTree::FocusLast() { // Declare variables COptionTreeItem* otiNext; COptionTreeItem* otiChange; // Set pointers otiChange = m_otiFocus; otiNext = m_otiVisibleList; // Set focu on last if (otiNext != NULL) { while (otiNext->GetNextVisible()) { otiNext = otiNext->GetNextVisible(); } SetFocusedItem(otiNext); if (m_otiFocus != NULL) { SelectItems(NULL, FALSE); m_otiFocus->Select(); } } // Send notify to user if (otiChange != m_otiFocus) { SendNotify(OT_NOTIFY_SELCHANGE, m_otiFocus); } return otiNext; }
CEGPropertyGridItem* CEGPropertyGrid::FocusPrev() { CEGPropertyGridItem* pNext; CEGPropertyGridItem* pChange; pChange = m_pFocus; if (m_pFocus==NULL) { // get the last visible item pNext = m_pVisbleList; while (pNext && pNext->GetNextVisible()) pNext = pNext->GetNextVisible(); } else { pNext = m_pVisbleList; while (pNext && pNext->GetNextVisible()!=m_pFocus) pNext = pNext->GetNextVisible(); } if (pNext) SetFocusedItem(pNext); if (m_pFocus) { SelectItems(NULL, FALSE); m_pFocus->Select(); } if (pChange!=m_pFocus) SendNotify(PTN_SELCHANGE, m_pFocus); return pNext; }
void CXTPTaskDialogFrame::OnDestroy() { CXTPTaskDialogClient::OnDestroy(); // inform callback Task Dialog was destroyed. SendNotify(TDN_DESTROYED); }
void CtiNotify::NotifyRecord(ChannelInfo* pch,int result,RECORDATTRIBUTE attribute,TCHAR dtmf) { LPRECORDPARAM lprecordparam=(LPRECORDPARAM)malloc(sizeof(RECORDPARAM)); lprecordparam->result=result; lprecordparam->attribute=attribute; lprecordparam->dtmf=dtmf; SendNotify(pch->GetID(),EVENT_RECORD,lprecordparam,sizeof(RECORDPARAM)); }
void CtiNotify::NotifyPlay(ChannelInfo* pch,int result,PLAYATTRIBUTE attribute,TCHAR dtmf) { LPPLAYPARAM lpplayparam=(LPPLAYPARAM)malloc(sizeof(PLAYPARAM)); lpplayparam->result=result; lpplayparam->attribute=attribute; lpplayparam->dtmf=dtmf; SendNotify(pch->GetID(),EVENT_PLAY,lpplayparam,sizeof(PLAYPARAM)); }
void CtiNotify::NotifyRecvFsk(ChannelInfo* pch,int result,BYTE* fsk,int len) { LPRECVFSKPARAM lprecvfskparam=(LPRECVFSKPARAM)malloc(sizeof(RECVFSKPARAM)+len); lprecvfskparam->result=result; lprecvfskparam->size=len; memcpy(&lprecvfskparam->buf,fsk,len); SendNotify(pch->GetID(),EVENT_RECVFSK,lprecvfskparam,sizeof(RECVFSKPARAM)); }
void CtiNotify::NotifyChEvent(ChannelInfo* pch,CHANNELEVENTTYPE eventid,LPVOID eventdata,int eventsize,UINT delayid,BOOL once) { LPUSEREVENTPARAM lpusereventparam=(LPUSEREVENTPARAM)malloc(sizeof(USEREVENTPARAM)); lpusereventparam->delayid=delayid; lpusereventparam->eventdata=eventdata; lpusereventparam->eventsize=eventsize; lpusereventparam->once=once; SendNotify(pch->GetID(),eventid,lpusereventparam,sizeof(USEREVENTPARAM)); }
void Sprite::OnCapturedMouseEvent( lua_State *L, MouseEvent *ev) { switch(ev->message) { case WM_MOUSEMOVE: SendNotify(eMouseMove, ev); //OnMouseMove(event->x, event->y, event->flag); break; case WM_LBUTTONDOWN: SendNotify(eLBtnDown, ev); //OnLButtonDown(event->x, event->y, event->flag); break; case WM_LBUTTONUP: SendNotify(eLBtnUp, ev); //OnLButtonUp(event->x, event->y, event->flag); break; } }
void CtiNotify::NotifyAddChannel(ChannelInfo* pch,CHANNELTYPE chtype,CHANNELSTATE chstate,CHANNELWAY chway,int chtotal) { ADDCHANNELPARAM* paddchannel=(ADDCHANNELPARAM*)malloc(sizeof(ADDCHANNELPARAM)); paddchannel->chtype=chtype; paddchannel->chstate=chstate; paddchannel->chway=chway; paddchannel->chtotal=chtotal; SendNotify(pch->GetID(),EVENT_ADDCHANNEL,paddchannel,sizeof(ADDCHANNELPARAM)); }
void CtiNotify::NotifyUpdateRecordMemory(ChannelInfo* pch,int index,BYTE* block1,int size1,BYTE* block2,int size2) { LPUPDATERECORDMEMORYPARAM lpupdaterecordmemoryparam=(LPUPDATERECORDMEMORYPARAM)malloc(sizeof(UPDATERECORDMEMORYPARAM)); lpupdaterecordmemoryparam->index=index; lpupdaterecordmemoryparam->block1=block1; lpupdaterecordmemoryparam->size1=size1; lpupdaterecordmemoryparam->block2=block2; lpupdaterecordmemoryparam->size2=size2; SendNotify(pch->GetID(),EVENT_UPDATERECORDMEMORY,lpupdaterecordmemoryparam,sizeof(UPDATERECORDMEMORYPARAM)); }
void BroadcastChannelParent::CheckAndDeliver(const ClonedMessageData& aData, const nsCString& aOrigin, uint64_t aAppId, bool aInBrowserElement, const nsString& aChannel, bool aPrivateBrowsing) { AssertIsOnBackgroundThread(); if (aOrigin == mOrigin && aAppId == mAppId && aInBrowserElement == mIsInBrowserElement && aChannel == mChannel && aPrivateBrowsing == mPrivateBrowsing) { // We need to duplicate data only if we have blobs or if the manager of // them is different than the manager of this parent actor. if (aData.blobsParent().IsEmpty() || static_cast<BlobParent*>(aData.blobsParent()[0])->GetBackgroundManager() == Manager()) { unused << SendNotify(aData); return; } // Duplicate the data for this parent. ClonedMessageData newData(aData); // Ricreate the BlobParent for this new message. for (uint32_t i = 0, len = newData.blobsParent().Length(); i < len; ++i) { nsRefPtr<BlobImpl> impl = static_cast<BlobParent*>(newData.blobsParent()[i])->GetBlobImpl(); PBlobParent* blobParent = BackgroundParent::GetOrCreateActorForBlobImpl(Manager(), impl); if (!blobParent) { return; } newData.blobsParent()[i] = blobParent; } unused << SendNotify(newData); } }
COptionTreeItem * COptionTree::InsertItem(COptionTreeItem *otiItem, COptionTreeItem *otiParent) { // Declare variables COptionTreeItem* otiNext; // Make sure item is not NULL if (otiItem == NULL) { return NULL; } // If parent is NULL, becomes root if (otiParent == NULL) { otiParent = &m_otiRoot; } // Set child if (otiParent->GetChild() == NULL) { otiParent->SetChild(otiItem); } else { // -- Add to end of the sibling list otiNext = otiParent->GetChild(); while (otiNext->GetSibling() != NULL) { otiNext = otiNext->GetSibling(); } otiNext->SetSibling(otiItem); } // Auto generate a default ID m_uLastUID++; otiItem->SetCtrlID(m_uLastUID); // Set item information otiItem->SetParent(otiParent); otiItem->SetOptionsOwner(this); // Send notification to user SendNotify(OT_NOTIFY_INSERTITEM, otiItem); //// Updated items //UpdatedItems(); //// Force redraw //Invalidate(); //// Update window //UpdateWindow(); return otiItem; }
BOOL CPPNumEdit::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code here and/or call the base class if (pMsg->message == WM_KEYDOWN) { switch (pMsg->wParam) { case VK_RETURN: SendNotify(PPNUMEDIT_ENTER_DATA); return TRUE; case VK_ESCAPE: SendNotify(PPNUMEDIT_CANCEL_DATA); return TRUE; case VK_TAB: if (::GetKeyState(VK_SHIFT) < 0) SendNotify(PPNUMEDIT_MOVE_PREV_FIELD); else SendNotify(PPNUMEDIT_MOVE_NEXT_FIELD); return TRUE; } if (::GetKeyState(VK_CONTROL) < 0) { switch (pMsg->wParam) { case 'H': SendNotify(PPNUMEDIT_HOTKEY_HEX); return TRUE; case 'D': SendNotify(PPNUMEDIT_HOTKEY_DEC); return TRUE; case 'B': SendNotify(PPNUMEDIT_HOTKEY_BIN); return TRUE; case 'O': SendNotify(PPNUMEDIT_HOTKEY_OCT); return TRUE; case 'A': SendNotify(PPNUMEDIT_HOTKEY_ASCII); return TRUE; } } } return CEdit::PreTranslateMessage(pMsg); }
void PropertyTree::DeleteItem(PropertyTreeItem* pItem, bool notify) { Delete(pItem); if ( notify ) { if (pItem && pItem!=&m_Root && SendNotify(PTN_DELETEITEM, pItem)) return; UpdatedItems(); } }
Bool HawkGateProxy::CloseSession(SID iSid) { if (iSid) { GateNotify sNotify(GateNotify::NOTIFY_SESSION_CLOSE); sNotify.eClose.SvrId = m_iSvrId; sNotify.eClose.Sid = iSid; return SendNotify(sNotify); } return false; }
VOID CDUIProgressBarBase::SetPos(INT nPos) { DUI_ASSERT(nPos >= m_nMin && nPos <= m_nMax); if(nPos < m_nMin) nPos = m_nMin; if(nPos > m_nMax) nPos = m_nMax; if(m_nPos != nPos) { m_nPos = nPos; SendNotify(WM_NOTIFY_PROGRESS_POS_CHANGED, nPos); UpdateLayout(FALSE); } }
void Sprite::OnKeyEvent( lua_State *L, UINT message, DWORD keyCode, DWORD flag ) { KeyEvent ev; ev.keyCode = keyCode; ev.flag = flag; switch(message) { case WM_KEYDOWN: SendNotify(eKeyDown, &ev); //OnKeyDown(keyCode, flag); break; case WM_KEYUP: SendNotify(eKeyUp, &ev); //OnKeyUp(keyCode, flag); break; case WM_CHAR: SendNotify(eCharInput, &ev); //OnChar(keyCode, flag); break; } }