Commit 565ba589 authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Do not send a WM_NOTIFYFORMAT to a non-existent owner.

parent 1ab243ba
...@@ -1971,6 +1971,7 @@ TOOLTIPS_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -1971,6 +1971,7 @@ TOOLTIPS_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLTIPS_INFO *infoPtr; TOOLTIPS_INFO *infoPtr;
NONCLIENTMETRICSA nclm; NONCLIENTMETRICSA nclm;
INT nResult; INT nResult;
HWND hParent;
/* allocate memory for info structure */ /* allocate memory for info structure */
infoPtr = (TOOLTIPS_INFO *)COMCTL32_Alloc (sizeof(TOOLTIPS_INFO)); infoPtr = (TOOLTIPS_INFO *)COMCTL32_Alloc (sizeof(TOOLTIPS_INFO));
...@@ -1993,18 +1994,21 @@ TOOLTIPS_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -1993,18 +1994,21 @@ TOOLTIPS_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLTIPS_SetDelayTime(hwnd, TTDT_AUTOMATIC, 0L); TOOLTIPS_SetDelayTime(hwnd, TTDT_AUTOMATIC, 0L);
nResult = (INT) SendMessageA (GetParent (hwnd), WM_NOTIFYFORMAT, hParent = GetParent(hwnd);
if (hParent) {
nResult = (INT) SendMessageA (hParent, WM_NOTIFYFORMAT,
(WPARAM)hwnd, (LPARAM)NF_QUERY); (WPARAM)hwnd, (LPARAM)NF_QUERY);
if (nResult == NFR_ANSI) { if (nResult == NFR_ANSI) {
infoPtr->bNotifyUnicode = FALSE; infoPtr->bNotifyUnicode = FALSE;
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n"); TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
} }
else if (nResult == NFR_UNICODE) { else if (nResult == NFR_UNICODE) {
infoPtr->bNotifyUnicode = TRUE; infoPtr->bNotifyUnicode = TRUE;
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n"); TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
} }
else { else {
ERR (" -- WM_NOTIFYFORMAT returns: error!\n"); 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);
......
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