tooltips: unicodification

Dimitrie O. Paun dpaun at rogers.com
Wed Mar 23 00:01:57 CST 2005


ChangeLog
    Complete unicodification of the tooltips common control.


Index: dlls/comctl32/tooltips.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/tooltips.c,v
retrieving revision 1.76
diff -u -r1.76 tooltips.c
--- dlls/comctl32/tooltips.c	9 Jan 2005 16:42:54 -0000	1.76
+++ dlls/comctl32/tooltips.c	23 Mar 2005 05:00:26 -0000
@@ -18,6 +18,8 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
+ * NOTES
+ *
  * This code was audited for completeness against the documented features
  * of Comctl32.dll version 6.0 on Sep. 08, 2004, by Robert Shearman.
  * 
@@ -214,7 +216,7 @@
 
     if (infoPtr->nMaxTipWidth > -1)
 	uFlags |= DT_WORDBREAK;
-    if (GetWindowLongA (hwnd, GWL_STYLE) & TTS_NOPREFIX)
+    if (GetWindowLongW (hwnd, GWL_STYLE) & TTS_NOPREFIX)
 	uFlags |= DT_NOPREFIX;
     GetClientRect (hwnd, &rc);
 
@@ -610,8 +612,8 @@
     	rect.top = rect.bottom - size.cy;
     }
 
-    AdjustWindowRectEx (&rect, GetWindowLongA (hwnd, GWL_STYLE),
-			FALSE, GetWindowLongA (hwnd, GWL_EXSTYLE));
+    AdjustWindowRectEx (&rect, GetWindowLongW (hwnd, GWL_STYLE),
+			FALSE, GetWindowLongW (hwnd, GWL_EXSTYLE));
 
     if (style & TTS_BALLOON)
     {
@@ -782,8 +784,8 @@
     rect.right = rect.left + size.cx;
     rect.bottom = rect.top + size.cy;
 
-    AdjustWindowRectEx (&rect, GetWindowLongA (hwnd, GWL_STYLE),
-			FALSE, GetWindowLongA (hwnd, GWL_EXSTYLE));
+    AdjustWindowRectEx (&rect, GetWindowLongW (hwnd, GWL_STYLE),
+			FALSE, GetWindowLongW (hwnd, GWL_EXSTYLE));
 
     if (GetWindowLongW(hwnd, GWL_STYLE) & TTS_BALLOON)
     {
@@ -945,7 +947,7 @@
     if (nTool == -1)
 	return -1;
 
-    if (!(GetWindowLongA (hwnd, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest) {
+    if (!(GetWindowLongW (hwnd, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest) {
 	if (!TOOLTIPS_IsWindowActive (GetWindow (hwnd, GW_OWNER)))
 	    return -1;
     }
@@ -2395,8 +2397,8 @@
 static LRESULT
 TOOLTIPS_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-    DWORD dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
-    DWORD dwExStyle = GetWindowLongA (hwnd, GWL_EXSTYLE);
+    DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
+    DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE);
 
     dwStyle &= 0x0000FFFF;
     dwStyle |= (WS_POPUP | WS_BORDER | WS_CLIPSIBLINGS);
@@ -2405,10 +2407,10 @@
      * window region, therefore it is useless to us in balloon mode */
     if (dwStyle & TTS_BALLOON) dwStyle &= ~WS_BORDER;
 
-    SetWindowLongA (hwnd, GWL_STYLE, dwStyle);
+    SetWindowLongW (hwnd, GWL_STYLE, dwStyle);
 
     dwExStyle |= WS_EX_TOOLWINDOW;
-    SetWindowLongA (hwnd, GWL_EXSTYLE, dwExStyle);
+    SetWindowLongW (hwnd, GWL_EXSTYLE, dwExStyle);
 
     return TRUE;
 }
@@ -2724,6 +2726,7 @@
 	case TTM_SETTOOLINFOW:
 	    return TOOLTIPS_SetToolInfoW (hwnd, wParam, lParam);
 
+        /* FIXME: Shouldn't this message have A/W variants */
 	case TTM_TRACKACTIVATE:
 	    return TOOLTIPS_TrackActivate (hwnd, wParam, lParam);
 

-- 
Dimi.



More information about the wine-patches mailing list