Commit a9e9def0 authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

Started WM_NOTIFYFORMAT support.

parent 88e95010
/* /*
* Tool tip control * Tool tip control
* *
* Copyright 1998 Eric Kohl * Copyright 1998, 1999 Eric Kohl
* *
* TODO: * TODO:
* - Unicode support. * - Unicode support (started).
* - Custom draw support. * - Custom draw support.
* *
* Testing: * Testing:
...@@ -1857,12 +1857,17 @@ TOOLTIPS_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -1857,12 +1857,17 @@ TOOLTIPS_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
nResult = (INT) SendMessageA (GetParent (hwnd), WM_NOTIFYFORMAT, nResult = (INT) SendMessageA (GetParent (hwnd), WM_NOTIFYFORMAT,
(WPARAM)hwnd, (LPARAM)NF_QUERY); (WPARAM)hwnd, (LPARAM)NF_QUERY);
if (nResult == NFR_ANSI) if (nResult == NFR_ANSI) {
infoPtr->bNotifyUnicode = FALSE;
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n"); TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
else if (nResult == NFR_UNICODE) }
FIXME(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n"); else if (nResult == NFR_UNICODE) {
else infoPtr->bNotifyUnicode = TRUE;
FIXME(" -- WM_NOTIFYFORMAT returns: error!\n"); TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
}
else {
ERR (" -- WM_NOTIFYFORMAT returns: error!\n");
}
SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOZORDER | SWP_HIDEWINDOW | SWP_NOACTIVATE); SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOZORDER | SWP_HIDEWINDOW | SWP_NOACTIVATE);
...@@ -1985,6 +1990,15 @@ TOOLTIPS_NCHitTest (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -1985,6 +1990,15 @@ TOOLTIPS_NCHitTest (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
FIXME ("hwnd=%x wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
return 0;
}
static LRESULT
TOOLTIPS_Paint (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_Paint (HWND hwnd, WPARAM wParam, LPARAM lParam)
{ {
HDC hdc; HDC hdc;
...@@ -2027,6 +2041,7 @@ TOOLTIPS_OnWMGetTextLength(HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2027,6 +2041,7 @@ TOOLTIPS_OnWMGetTextLength(HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
return lstrlenW(infoPtr->szTipText); return lstrlenW(infoPtr->szTipText);
} }
/****************************************************************** /******************************************************************
* TOOLTIPS_OnWMGetText * TOOLTIPS_OnWMGetText
* *
...@@ -2057,7 +2072,6 @@ TOOLTIPS_OnWMGetText (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2057,7 +2072,6 @@ TOOLTIPS_OnWMGetText (HWND hwnd, WPARAM wParam, LPARAM lParam)
} }
lstrcpyWtoA((LPSTR)lParam, infoPtr->szTipText); lstrcpyWtoA((LPSTR)lParam, infoPtr->szTipText);
return length; return length;
} }
static LRESULT static LRESULT
...@@ -2321,8 +2335,8 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -2321,8 +2335,8 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NCHITTEST: case WM_NCHITTEST:
return TOOLTIPS_NCHitTest (hwnd, wParam, lParam); return TOOLTIPS_NCHitTest (hwnd, wParam, lParam);
/* case WM_NOTIFYFORMAT: */ case WM_NOTIFYFORMAT:
/* return TOOLTIPS_NotifyFormat (hwnd, wParam, lParam); */ return TOOLTIPS_NotifyFormat (hwnd, wParam, lParam);
case WM_PAINT: case WM_PAINT:
return TOOLTIPS_Paint (hwnd, wParam, lParam); return TOOLTIPS_Paint (hwnd, wParam, lParam);
......
...@@ -49,6 +49,7 @@ typedef struct tagTOOLTIPS_INFO ...@@ -49,6 +49,7 @@ typedef struct tagTOOLTIPS_INFO
INT nAutoPopTime; INT nAutoPopTime;
INT nInitialTime; INT nInitialTime;
RECT rcMargin; RECT rcMargin;
BOOL bNotifyUnicode;
TTTOOL_INFO *tools; TTTOOL_INFO *tools;
} TOOLTIPS_INFO; } TOOLTIPS_INFO;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment