Handles double check of dde messages

This commit is contained in:
lmdd 2023-05-24 16:10:47 +08:00 committed by GitHub
parent 1a6a9c2a11
commit e1ba6fa133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 2 deletions

View File

@ -355,8 +355,18 @@ _FX BOOLEAN Gui_DDE_COPYDATA_Received(
Sbie_snwprintf(prop_name, 64, SBIE L"_DDE_%08p", (void*)hWnd);
hClientWnd = Gui_GetPropCommon((HWND)wParam, prop_name, TRUE, 0);
if (TlsData->gui_dde_client_hwnd != (HWND)-1) {
if ((! hClientWnd) || (hClientWnd != TlsData->gui_dde_client_hwnd))
return FALSE;
#ifdef _WIN64
if ((!hClientWnd) || (hClientWnd != TlsData->gui_dde_client_hwnd))
return FALSE;
#else
// When I double click an.xlsx file, my excel will run here, but Gui_GetPropCommon will return empty.
// This is a problem for Office 32-bit, so I uncheck the hClientWnd double check for 32-bit programs
// lmdd change
if (hClientWnd == 0)
hClientWnd = TlsData->gui_dde_client_hwnd;
else if (hClientWnd != TlsData->gui_dde_client_hwnd)
return FALSE;
#endif
}
//