Nikolay Sivov : comctl32/treeview: Implement NM_SETCURSOR notification.
Alexandre Julliard
julliard at winehq.org
Mon Dec 14 09:51:14 CST 2009
Module: wine
Branch: master
Commit: e81f2642f16d108cfdf086eb8d5196c95f399c4a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e81f2642f16d108cfdf086eb8d5196c95f399c4a
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Sat Dec 12 12:34:23 2009 +0300
comctl32/treeview: Implement NM_SETCURSOR notification.
---
dlls/comctl32/treeview.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 4a8ced3..51af5aa 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -28,7 +28,7 @@
* We use callbackMask to keep track of fields to be updated.
*
* TODO:
- * missing notifications: NM_SETCURSOR, TVN_GETINFOTIP, TVN_KEYDOWN,
+ * missing notifications: TVN_GETINFOTIP, TVN_KEYDOWN,
* TVN_SETDISPINFO, TVN_SINGLEEXPAND
*
* missing styles: TVS_FULLROWSELECT, TVS_INFOTIP, TVS_RTLREADING,
@@ -5449,13 +5449,27 @@ TREEVIEW_SetCursor(const TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
POINT pt;
TREEVIEW_ITEM * item;
+ NMMOUSE nmmouse;
GetCursorPos(&pt);
ScreenToClient(infoPtr->hwnd, &pt);
item = TREEVIEW_HitTestPoint(infoPtr, pt);
- /* FIXME: send NM_SETCURSOR */
+ memset(&nmmouse, 0, sizeof(nmmouse));
+ nmmouse.hdr.hwndFrom = infoPtr->hwnd;
+ nmmouse.hdr.idFrom = GetWindowLongPtrW(infoPtr->hwnd, GWLP_ID);
+ nmmouse.hdr.code = NM_SETCURSOR;
+ if (item)
+ {
+ nmmouse.dwItemSpec = (DWORD_PTR)item;
+ nmmouse.dwItemData = item->lParam;
+ }
+ nmmouse.pt.x = 0;
+ nmmouse.pt.y = 0;
+ nmmouse.dwHitInfo = lParam;
+ if (TREEVIEW_SendRealNotify(infoPtr, nmmouse.hdr.idFrom, (LPARAM)&nmmouse))
+ return 0;
if (item && (infoPtr->dwStyle & TVS_TRACKSELECT))
{
More information about the wine-cvs
mailing list