From 52364a228a3f8a50af8e733ec331974e6056d331 Mon Sep 17 00:00:00 2001 From: dreamforceinc Date: Fri, 25 Feb 2022 18:15:10 +0300 Subject: [PATCH] Replced some SendMessageW to PostMessageW. --- wCenterWindow/wCenterWindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wCenterWindow/wCenterWindow.cpp b/wCenterWindow/wCenterWindow.cpp index 448e70f..2fdc333 100644 --- a/wCenterWindow/wCenterWindow.cpp +++ b/wCenterWindow/wCenterWindow.cpp @@ -203,7 +203,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { diag_log(L"Loading context menu failed!"); ShowError(IDS_ERR_MENU); - SendMessageW(hWnd, WM_CLOSE, NULL, NULL); + PostMessageW(hWnd, WM_CLOSE, NULL, NULL); } diag_log(L"Context menu successfully loaded"); @@ -212,7 +212,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { diag_log(L"Creating popup menu failed!"); ShowError(IDS_ERR_POPUP); - SendMessageW(hWnd, WM_CLOSE, NULL, NULL); + PostMessageW(hWnd, WM_CLOSE, NULL, NULL); } diag_log(L"Popup menu successfully created"); @@ -238,7 +238,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { diag_log(L"Creating mouse hook failed!"); ShowError(IDS_ERR_HOOK); - SendMessageW(hWnd, WM_CLOSE, NULL, NULL); + PostMessageW(hWnd, WM_CLOSE, NULL, NULL); } diag_log(L"Mouse hook was successfully set"); @@ -247,7 +247,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { diag_log(L"Creating keyboard hook failed!"); ShowError(IDS_ERR_HOOK); - SendMessageW(hWnd, WM_CLOSE, NULL, NULL); + PostMessageW(hWnd, WM_CLOSE, NULL, NULL); } diag_log(L"Keyboard hook was successfully set"); @@ -282,7 +282,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) DialogBoxW(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)About); bKPressed = FALSE; } - if (ID_POPUPMENU_EXIT == idMenu) SendMessageW(hWnd, WM_CLOSE, NULL, NULL); + if (ID_POPUPMENU_EXIT == idMenu) PostMessageW(hWnd, WM_CLOSE, NULL, NULL); } break; }