Merge pull request #2950 from lmou523/lmdd_Fix32DDE

Handles double check of dde messages
This commit is contained in:
DavidXanatos 2023-05-24 16:41:31 +02:00 committed by GitHub
commit d1df1db30b
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); Sbie_snwprintf(prop_name, 64, SBIE L"_DDE_%08p", (void*)hWnd);
hClientWnd = Gui_GetPropCommon((HWND)wParam, prop_name, TRUE, 0); hClientWnd = Gui_GetPropCommon((HWND)wParam, prop_name, TRUE, 0);
if (TlsData->gui_dde_client_hwnd != (HWND)-1) { if (TlsData->gui_dde_client_hwnd != (HWND)-1) {
if ((! hClientWnd) || (hClientWnd != TlsData->gui_dde_client_hwnd)) #ifdef _WIN64
return FALSE; 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
} }
// //