Author: gadamopoulos
Date: Sun Mar 12 00:00:40 2017
New Revision: 74150
URL:
http://svn.reactos.org/svn/reactos?rev=74150&view=rev
Log:
[COMCTL32] -Implement sending the BCN_HOTITEMCHANGE notification.
Modified:
trunk/reactos/dll/win32/comctl32/button.c
Modified: trunk/reactos/dll/win32/comctl32/button.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/button.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/button.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/button.c [iso-8859-1] Sun Mar 12 00:00:40 2017
@@ -515,8 +515,17 @@
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 @@
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);
}