[ros-diffs] [greatlrd] 25794: patch from Physicus, implement TOOLTIPS_NotifyFormat, it now retrurn the type of the string if it unicode or ansi. before it did not return any type at all. it did a heap crash from downloader mangers when it try figout what type of sting the toolstips use. it is tested in 0.3.1 and not whole implemnent is tested yet. it should be right for all case.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Mon Feb 12 19:37:06 CET 2007


Author: greatlrd
Date: Mon Feb 12 21:37:05 2007
New Revision: 25794

URL: http://svn.reactos.org/svn/reactos?rev=25794&view=rev
Log:
patch from Physicus, implement TOOLTIPS_NotifyFormat, it now retrurn the type of the string if it unicode or ansi. 
before it did not return any type at all. it did a heap crash from downloader mangers when it try figout what type
of sting the toolstips use. it is tested in 0.3.1 and not whole implemnent is tested yet. it should be right for all
case.

Modified:
    trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
    trunk/reactos/dll/win32/comctl32/tooltips.c

Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl32_ros.diff?rev=25794&r1=25793&r2=25794&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff Mon Feb 12 21:37:05 2007
@@ -107,3 +107,43 @@
      case WM_SYSCOLORCHANGE:
        COMCTL32_RefreshSysColors();
        return FALSE;
+
+Index: tooltips.c
+===================================================================
+--- tooltips.c	(revision 25790)
++++ tooltips.c	(working copy)
+@@ -2450,7 +2450,34 @@
+ TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
+ {
+     FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
++    TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
++    TTTOOL_INFO *toolPtr = infoPtr->tools;
++    INT nResult;
+ 
++    if (lParam == NF_QUERY)
++    {
++        if (toolPtr->bNotifyUnicode)
++        {
++            return NFR_UNICODE;
++        } else {
++            return NFR_ANSI;
++        }
++    }
++    else if (lParam == NF_REQUERY)
++    {
++        nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
++                    (WPARAM)hwnd, (LPARAM)NF_QUERY);
++        if (nResult == NFR_ANSI) {
++            toolPtr->bNotifyUnicode = FALSE;
++        TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
++        } else if (nResult == NFR_UNICODE) {
++            toolPtr->bNotifyUnicode = TRUE;
++        TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
++        } else {
++            TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
++        }
++        return nResult;
++    }
+     return 0;
+ }
+ 

Modified: trunk/reactos/dll/win32/comctl32/tooltips.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tooltips.c?rev=25794&r1=25793&r2=25794&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/tooltips.c (original)
+++ trunk/reactos/dll/win32/comctl32/tooltips.c Mon Feb 12 21:37:05 2007
@@ -2450,7 +2450,34 @@
 TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
-
+    TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
+    TTTOOL_INFO *toolPtr = infoPtr->tools;
+    INT nResult;
+
+    if (lParam == NF_QUERY)
+    {
+        if (toolPtr->bNotifyUnicode)
+        {
+            return NFR_UNICODE;
+        } else {
+            return NFR_ANSI;
+        }
+    }
+    else if (lParam == NF_REQUERY)
+    {
+        nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
+                    (WPARAM)hwnd, (LPARAM)NF_QUERY);
+        if (nResult == NFR_ANSI) {
+            toolPtr->bNotifyUnicode = FALSE;
+        TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
+        } else if (nResult == NFR_UNICODE) {
+            toolPtr->bNotifyUnicode = TRUE;
+        TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
+        } else {
+            TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
+        }
+        return nResult;
+    }
     return 0;
 }
 




More information about the Ros-diffs mailing list