Author: greatlrd
Date: Mon Feb 12 21:39:09 2007
New Revision: 25795
URL:
http://svn.reactos.org/svn/reactos?rev=25795&view=rev
Log:
merge r25794 from trunk to 0.3.1 it fixing follow thing :
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:
branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/comctl32_ros.diff
branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/tooltips.c
Modified: branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/comctl32_ros.diff
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/comctl32_ros.diff (original)
+++ branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/comctl32_ros.diff Mon Feb 12
21:39:09 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: branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/tooltips.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/tooltips.c (original)
+++ branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/tooltips.c Mon Feb 12 21:39:09
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;
}