Feature(web): Add toolbar audio toggle button
This commit is contained in:
@@ -9651,6 +9651,25 @@ void CMy2015RemoteDlg::CloseRemoteDesktopByClientID(uint64_t clientID)
|
||||
}
|
||||
}
|
||||
|
||||
bool CMy2015RemoteDlg::PostWebAudioToggle(uint64_t clientID)
|
||||
{
|
||||
HWND hWnd = NULL;
|
||||
EnterCriticalSection(&m_cs);
|
||||
for (auto& pair : m_RemoteWnds) {
|
||||
CScreenSpyDlg* dlg = dynamic_cast<CScreenSpyDlg*>(pair.second);
|
||||
if (dlg && dlg->GetClientID() == clientID && dlg->IsWebSession()) {
|
||||
hWnd = dlg->GetSafeHwnd();
|
||||
break;
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&m_cs);
|
||||
if (hWnd && ::IsWindow(hWnd)) {
|
||||
// PostMessage 把活儿丢到对话框的 UI 线程,避免 WS 线程动 waveOut 句柄
|
||||
return ::PostMessage(hWnd, WM_AUDIO_TOGGLE_FROM_WEB, 0, 0) != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CMy2015RemoteDlg::CloseWebRemoteDesktopByClientID(uint64_t clientID)
|
||||
{
|
||||
CScreenSpyDlg* targetDlg = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user