Displaying Meeting Information Box Notification
Notification Description
A notification is sent when the user hovers over the meeting ID in the upper left corner of the meeting page.
Method Definition
1
|
virtual void OnShowExternalConfInfoWnd(int left,int top) {}; |
Precautions
1. Set isUseExternalConfInfoWnd in Table 2 to true.
2. Add thread switching to the OnShowExternalConfInfoWnd API, switch to the user thread, and then the user-defined meeting information box is displayed.
(The meeting information box needs to be pinned to the top.)
3. Add timer detection (2s) the API for displaying the user-defined meeting information box.
If you do not hover over the customized meeting information area, the meeting information is deleted when the timer expires.
If you hover over the customized meeting information area, the meeting information is deleted when the cursor is moved out of the customized meeting information area.
(If timer detection is not added, the meeting information box cannot be destroyed in all scenarios.)
Parameter Description
Parameter |
Type |
Description |
---|---|---|
left |
int |
X coordinate in the upper left corner of the meeting information box. |
top |
int |
Y coordinate in the upper left corner of the meeting information box. |
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
/** * The external meeting information box. */ LRESULT demoMainMenuDlg::OnShowExternalConfInfoWnd(WPARAM wParam, LPARAM lParam) { CPoint* pt = (CPoint*)wParam; demoConfInfoDlg* dlg = demoData::GetInstance().GetConfInfoDlgObj(); // If the dialog box object does not exist, create one. if (dlg == NULL) { dlg = new demoConfInfoDlg; dlg->Create(IDD_CONF_INFO_DIALOG, NULL); demoData::GetInstance().SetConfInfoDlgObj(dlg); } // If the dialog box exists, set a timer to check whether the dialog box is destroyed. if (IsWindow(dlg->GetSafeHwnd())) { SetTimer(1, 2000, NULL); } // Displaying the dialog box and pin it on top. CRect rectDlg(0, 0, 0, 0); dlg->GetClientRect(rectDlg); CRect rt(pt->x, pt->y, pt->x + rectDlg.Width(), pt->y + rectDlg.Height()); dlg->MoveWindow(rt); dlg->SetWindowPos(&CWnd::wndTopMost, pt->x, pt->y, rectDlg.Width(), rectDlg.Height(), SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); dlg->ShowWindow(SW_SHOW); delete pt; pt = NULL; return 0; } /** * The timer detects whether the meeting information box is destroyed. */ void demoMainMenuDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 1) { demoConfInfoDlg* dlg = demoData::GetInstance().GetConfInfoDlgObj(); if (dlg == NULL) { return; } if (IsWindow(dlg->m_hWnd)) { CPoint ptMouse(0, 0); GetCursorPos(&ptMouse); CRect rtConfInfo(0,0,0,0); dlg->GetWindowRect(&rtConfInfo); // Destroying a meeting information dialog box if the cursor is not in the box. if (!rtConfInfo.PtInRect(ptMouse)) { dlg->CloseWindow(); demoData::GetInstance().SetConfInfoDlgObj(NULL); delete dlg; dlg = NULL; KillTimer(nIDEvent); } } } CDialogEx::OnTimer(nIDEvent); } /** * Adding the function that the meeting information box is destroyed upon the cursor is moved out of the box. */ void demoConfInfoDlg::OnMouseMove(UINT nFlags, CPoint point) { if (!m_bTracking) { TRACKMOUSEEVENT t_MouseEvent; t_MouseEvent.cbSize = sizeof(TRACKMOUSEEVENT); t_MouseEvent.dwFlags = TME_HOVER | TME_LEAVE; t_MouseEvent.hwndTrack = m_hWnd; t_MouseEvent.dwHoverTime = 30; // Triggering the OnMouseLeave or OnMouseHover event. m_bTracking prevents frequent event triggering. if (::_TrackMouseEvent(&t_MouseEvent)) { m_bTracking = true; } } CDialogEx::OnMouseMove(nFlags, point); } void demoConfInfoDlg::OnMouseLeave() { m_bTracking = false; CDialogEx::OnMouseLeave(); demoData::GetInstance().SetConfInfoDlgObj(NULL); OnCancel(); } |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot