From: Giannis Adamopoulos Date: Sun, 12 Mar 2017 00:00:40 +0000 (+0000) Subject: [COMCTL32] -Implement sending the BCN_HOTITEMCHANGE notification. X-Git-Tag: ReactOS-0.4.5~282 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=2ae045e8a10323bd3746799a8fee5073a8512935;ds=sidebyside [COMCTL32] -Implement sending the BCN_HOTITEMCHANGE notification. svn path=/trunk/; revision=74150 --- diff --git a/reactos/dll/win32/comctl32/button.c b/reactos/dll/win32/comctl32/button.c index b6f2947c5a4..687b217e2cf 100644 --- a/reactos/dll/win32/comctl32/button.c +++ b/reactos/dll/win32/comctl32/button.c @@ -515,8 +515,17 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg, state = get_button_state( hWnd ); if (state & BST_HOT) { + NMBCHOTITEM nmhotitem; + state &= ~BST_HOT; set_button_state(hWnd, state); + + nmhotitem.hdr.hwndFrom = hWnd; + nmhotitem.hdr.idFrom = GetWindowLongPtrW (hWnd, GWLP_ID); + nmhotitem.hdr.code = BCN_HOTITEMCHANGE; + nmhotitem.dwFlags = HICF_LEAVING; + SendMessageW(GetParent(hWnd), WM_NOTIFY, nmhotitem.hdr.idFrom, (LPARAM)&nmhotitem); + InvalidateRect(hWnd, NULL, TRUE); } break; @@ -527,8 +536,17 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg, state = get_button_state( hWnd ); if ((state & BST_HOT) == 0) { + NMBCHOTITEM nmhotitem; + state |= BST_HOT; set_button_state(hWnd, state); + + nmhotitem.hdr.hwndFrom = hWnd; + nmhotitem.hdr.idFrom = GetWindowLongPtrW (hWnd, GWLP_ID); + nmhotitem.hdr.code = BCN_HOTITEMCHANGE; + nmhotitem.dwFlags = HICF_ENTERING; + SendMessageW(GetParent(hWnd), WM_NOTIFY, nmhotitem.hdr.idFrom, (LPARAM)&nmhotitem); + InvalidateRect(hWnd, NULL, TRUE); }