comctl32: toolbar: Create tooltip on TB_GETTOOLTIPS message if not yet created

Oleg Krylov oleg.krylov at gmail.com
Wed Oct 18 07:46:52 CDT 2006


Recent patch by Mikołaj Zalewski (git commit 
81050ccaffefef41d3776abec407290561935f40) moved creation of tooltip 
controls to WM_MOUSEMOVE message handling. The change is correct, but 
not complete.
Toolbar should also create tooltip control on TB_GETTOOLTIPS message, if 
tooltip window is not yet created. Otherwise application cann't get 
tooltip handle before first WM_MOUSEMOVE message gets to toolbar.

Changelog:
- Create tooltip control during TB_GETTOOLTIPS message handling if it is 
not yet created
Author: Oleg Krylov
License: LGPL

-------------- next part --------------
From 9ce38ae1278c8af9594ede4e957d9b0cdb57420c Mon Sep 17 00:00:00 2001
From: Oleg Krylov <oleg.krylov at gmail.com>
Date: Wed, 18 Oct 2006 15:39:00 +0300
Subject: comctl32: toolbar: Create tooltip on TB_GETTOOLTIPS message if not yet created

---
 dlls/comctl32/toolbar.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 92ded23..da41486 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -3726,6 +3726,8 @@ TOOLBAR_GetToolTips (HWND hwnd, WPARAM w
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
+    if ((infoPtr->dwStyle & TBSTYLE_TOOLTIPS) && (infoPtr->hwndToolTip == NULL))
+        TOOLBAR_TooltipCreateControl(infoPtr);
     return (LRESULT)infoPtr->hwndToolTip;
 }
 
-- 
1.4.2.3


More information about the wine-patches mailing list