Sync to trunk (r44933)
[reactos.git] / reactos / dll / win32 / user32 / windows / input.c
1 /*
2 * ReactOS kernel
3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 /* $Id$
20 *
21 * PROJECT: ReactOS user32.dll
22 * FILE: lib/user32/windows/input.c
23 * PURPOSE: Input
24 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
25 * UPDATE HISTORY:
26 * 09-05-2001 CSH Created
27 */
28
29 /* INCLUDES ******************************************************************/
30
31 #include <user32.h>
32
33 #include <wine/debug.h>
34 WINE_DEFAULT_DEBUG_CHANNEL(user32);
35
36 /* GLOBALS *******************************************************************/
37
38
39
40 /* FUNCTIONS *****************************************************************/
41
42
43 /*
44 * @implemented
45 */
46 BOOL
47 WINAPI
48 DragDetect(
49 HWND hWnd,
50 POINT pt)
51 {
52 #if 0
53 return NtUserDragDetect(hWnd, pt);
54 #else
55 MSG msg;
56 RECT rect;
57 POINT tmp;
58 ULONG dx = GetSystemMetrics(SM_CXDRAG);
59 ULONG dy = GetSystemMetrics(SM_CYDRAG);
60
61 rect.left = pt.x - dx;
62 rect.right = pt.x + dx;
63 rect.top = pt.y - dy;
64 rect.bottom = pt.y + dy;
65
66 SetCapture(hWnd);
67
68 for (;;)
69 {
70 while (
71 PeekMessageW(&msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE) ||
72 PeekMessageW(&msg, 0, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE)
73 )
74 {
75 if (msg.message == WM_LBUTTONUP)
76 {
77 ReleaseCapture();
78 return FALSE;
79 }
80 if (msg.message == WM_MOUSEMOVE)
81 {
82 tmp.x = LOWORD(msg.lParam);
83 tmp.y = HIWORD(msg.lParam);
84 if (!PtInRect(&rect, tmp))
85 {
86 ReleaseCapture();
87 return TRUE;
88 }
89 }
90 if (msg.message == WM_KEYDOWN)
91 {
92 if (msg.wParam == VK_ESCAPE)
93 {
94 ReleaseCapture();
95 return TRUE;
96 }
97 }
98 }
99 WaitMessage();
100 }
101 return 0;
102 #endif
103 }
104
105
106 /*
107 * @implemented
108 */
109 BOOL WINAPI
110 EnableWindow(HWND hWnd,
111 BOOL bEnable)
112 {
113 LONG Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
114 /* check if updating is needed */
115 UINT bIsDisabled = (Style & WS_DISABLED);
116 if ( (bIsDisabled && bEnable) || (!bIsDisabled && !bEnable) )
117 {
118 if (bEnable)
119 {
120 Style &= ~WS_DISABLED;
121 }
122 else
123 {
124 Style |= WS_DISABLED;
125 /* Remove keyboard focus from that window if it had focus */
126 if (hWnd == GetFocus())
127 {
128 SetFocus(NULL);
129 }
130 }
131 NtUserSetWindowLong(hWnd, GWL_STYLE, Style, FALSE);
132
133 SendMessageA(hWnd, WM_ENABLE, (LPARAM) IsWindowEnabled(hWnd), 0);
134 }
135 // Return nonzero if it was disabled, or zero if it wasn't:
136 return IsWindowEnabled(hWnd);
137 }
138
139
140 /*
141 * @implemented
142 */
143 SHORT WINAPI
144 GetAsyncKeyState(int vKey)
145 {
146 if (vKey < 0 || vKey > 256)
147 return 0;
148 return (SHORT) NtUserGetAsyncKeyState((DWORD) vKey);
149 }
150
151
152 /*
153 * @implemented
154 */
155 HKL WINAPI
156 GetKeyboardLayout(DWORD idThread)
157 {
158 return (HKL)NtUserCallOneParam((DWORD_PTR) idThread, ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT);
159 }
160
161
162 /*
163 * @implemented
164 */
165 UINT WINAPI
166 GetKBCodePage(VOID)
167 {
168 return GetOEMCP();
169 }
170
171
172 /*
173 * @implemented
174 */
175 int WINAPI
176 GetKeyNameTextA(LONG lParam,
177 LPSTR lpString,
178 int nSize)
179 {
180 LPWSTR intermediateString =
181 HeapAlloc(GetProcessHeap(),0,nSize * sizeof(WCHAR));
182 int ret = 0;
183 UINT wstrLen = 0;
184 BOOL defChar = FALSE;
185
186 if( !intermediateString ) return 0;
187 ret = GetKeyNameTextW(lParam,intermediateString,nSize);
188 if( ret == 0 ) { lpString[0] = 0; return 0; }
189
190 wstrLen = wcslen( intermediateString );
191 ret = WideCharToMultiByte(CP_ACP, 0,
192 intermediateString, wstrLen,
193 lpString, nSize, ".", &defChar );
194 lpString[ret] = 0;
195 HeapFree(GetProcessHeap(),0,intermediateString);
196
197 return ret;
198 }
199
200 /*
201 * @implemented
202 */
203 int WINAPI
204 GetKeyNameTextW(LONG lParam,
205 LPWSTR lpString,
206 int nSize)
207 {
208 return NtUserGetKeyNameText( lParam, lpString, nSize );
209 }
210
211
212 /*
213 * @implemented
214 */
215 SHORT WINAPI
216 GetKeyState(int nVirtKey)
217 {
218 return (SHORT) NtUserGetKeyState((DWORD) nVirtKey);
219 }
220
221
222 /*
223 * @implemented
224 */
225 BOOL WINAPI
226 GetKeyboardLayoutNameA(LPSTR pwszKLID)
227 {
228 WCHAR buf[KL_NAMELENGTH];
229
230 if (GetKeyboardLayoutNameW(buf))
231 return WideCharToMultiByte( CP_ACP, 0, buf, -1, pwszKLID, KL_NAMELENGTH, NULL, NULL ) != 0;
232 return FALSE;
233 }
234
235
236 /*
237 * @implemented
238 */
239 BOOL WINAPI
240 GetKeyboardLayoutNameW(LPWSTR pwszKLID)
241 {
242 return NtUserGetKeyboardLayoutName( pwszKLID );
243 }
244
245
246 /*
247 * @implemented
248 */
249 int WINAPI
250 GetKeyboardType(int nTypeFlag)
251 {
252 return (int)NtUserCallOneParam((DWORD_PTR) nTypeFlag, ONEPARAM_ROUTINE_GETKEYBOARDTYPE);
253 }
254
255
256 /*
257 * @implemented
258 */
259 BOOL WINAPI
260 GetLastInputInfo(PLASTINPUTINFO plii)
261 {
262 return NtUserGetLastInputInfo(plii);
263 }
264
265
266 /*
267 * @implemented
268 */
269 HKL WINAPI
270 LoadKeyboardLayoutA(LPCSTR pwszKLID,
271 UINT Flags)
272 {
273 return NtUserLoadKeyboardLayoutEx( NULL, 0, NULL, NULL, NULL,
274 strtoul(pwszKLID, NULL, 16),
275 Flags);
276 }
277
278
279 /*
280 * @implemented
281 */
282 HKL WINAPI
283 LoadKeyboardLayoutW(LPCWSTR pwszKLID,
284 UINT Flags)
285 {
286 // Look at revision 25596 to see how it's done in windows.
287 // We will do things our own way. Also be compatible too!
288 return NtUserLoadKeyboardLayoutEx( NULL, 0, NULL, NULL, NULL,
289 wcstoul(pwszKLID, NULL, 16),
290 Flags);
291 }
292
293
294 /*
295 * @implemented
296 */
297 UINT WINAPI
298 MapVirtualKeyA(UINT uCode,
299 UINT uMapType)
300 {
301 return MapVirtualKeyExA( uCode, uMapType, GetKeyboardLayout( 0 ) );
302 }
303
304
305 /*
306 * @implemented
307 */
308 UINT WINAPI
309 MapVirtualKeyExA(UINT uCode,
310 UINT uMapType,
311 HKL dwhkl)
312 {
313 return MapVirtualKeyExW( uCode, uMapType, dwhkl );
314 }
315
316
317 /*
318 * @implemented
319 */
320 UINT WINAPI
321 MapVirtualKeyExW(UINT uCode,
322 UINT uMapType,
323 HKL dwhkl)
324 {
325 return NtUserMapVirtualKeyEx( uCode, uMapType, 0, dwhkl );
326 }
327
328
329 /*
330 * @implemented
331 */
332 UINT WINAPI
333 MapVirtualKeyW(UINT uCode,
334 UINT uMapType)
335 {
336 return MapVirtualKeyExW( uCode, uMapType, GetKeyboardLayout( 0 ) );
337 }
338
339
340 /*
341 * @implemented
342 */
343 DWORD WINAPI
344 OemKeyScan(WORD wOemChar)
345 {
346 WCHAR p;
347 SHORT Vk;
348 UINT Scan;
349
350 MultiByteToWideChar(CP_OEMCP, 0, (PCSTR)&wOemChar, 1, &p, 1);
351 Vk = VkKeyScanW(p);
352 Scan = MapVirtualKeyW((Vk & 0x00ff), 0);
353 if(!Scan) return -1;
354 /*
355 Page 450-1, MS W2k SuperBible by SAMS. Return, low word has the
356 scan code and high word has the shift state.
357 */
358 return ((Vk & 0xff00) << 8) | Scan;
359 }
360
361
362 /*
363 * @implemented
364 */
365 BOOL WINAPI
366 SetDoubleClickTime(UINT uInterval)
367 {
368 return (BOOL)NtUserSystemParametersInfo(SPI_SETDOUBLECLICKTIME,
369 uInterval,
370 NULL,
371 0);
372 }
373
374
375 /*
376 * @implemented
377 */
378 BOOL
379 WINAPI
380 SwapMouseButton(
381 BOOL fSwap)
382 {
383 return NtUserSwapMouseButton(fSwap);
384 }
385
386
387 /*
388 * @implemented
389 */
390 int WINAPI
391 ToAscii(UINT uVirtKey,
392 UINT uScanCode,
393 CONST PBYTE lpKeyState,
394 LPWORD lpChar,
395 UINT uFlags)
396 {
397 return ToAsciiEx(uVirtKey, uScanCode, lpKeyState, lpChar, uFlags, 0);
398 }
399
400
401 /*
402 * @implemented
403 */
404 int WINAPI
405 ToAsciiEx(UINT uVirtKey,
406 UINT uScanCode,
407 CONST PBYTE lpKeyState,
408 LPWORD lpChar,
409 UINT uFlags,
410 HKL dwhkl)
411 {
412 WCHAR UniChars[2];
413 int Ret, CharCount;
414
415 Ret = ToUnicodeEx(uVirtKey, uScanCode, lpKeyState, UniChars, 2, uFlags, dwhkl);
416 CharCount = (Ret < 0 ? 1 : Ret);
417 WideCharToMultiByte(CP_ACP, 0, UniChars, CharCount, (LPSTR) lpChar, 2, NULL, NULL);
418
419 return Ret;
420 }
421
422
423 /*
424 * @implemented
425 */
426 int WINAPI
427 ToUnicode(UINT wVirtKey,
428 UINT wScanCode,
429 CONST PBYTE lpKeyState,
430 LPWSTR pwszBuff,
431 int cchBuff,
432 UINT wFlags)
433 {
434 return ToUnicodeEx( wVirtKey, wScanCode, lpKeyState, pwszBuff, cchBuff,
435 wFlags, 0 );
436 }
437
438
439 /*
440 * @implemented
441 */
442 int WINAPI
443 ToUnicodeEx(UINT wVirtKey,
444 UINT wScanCode,
445 CONST PBYTE lpKeyState,
446 LPWSTR pwszBuff,
447 int cchBuff,
448 UINT wFlags,
449 HKL dwhkl)
450 {
451 return NtUserToUnicodeEx( wVirtKey, wScanCode, lpKeyState, pwszBuff, cchBuff,
452 wFlags, dwhkl );
453 }
454
455
456
457 /*
458 * @implemented
459 */
460 SHORT WINAPI
461 VkKeyScanA(CHAR ch)
462 {
463 WCHAR wChar;
464
465 if (IsDBCSLeadByte(ch)) return -1;
466
467 MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wChar, 1);
468 return VkKeyScanW(wChar);
469 }
470
471
472 /*
473 * @implemented
474 */
475 SHORT WINAPI
476 VkKeyScanExA(CHAR ch,
477 HKL dwhkl)
478 {
479 WCHAR wChar;
480
481 if (IsDBCSLeadByte(ch)) return -1;
482
483 MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wChar, 1);
484 return VkKeyScanExW(wChar, dwhkl);
485 }
486
487
488 /*
489 * @implemented
490 */
491 SHORT WINAPI
492 VkKeyScanExW(WCHAR ch,
493 HKL dwhkl)
494 {
495 return (SHORT) NtUserVkKeyScanEx(ch, dwhkl, TRUE);
496 }
497
498
499 /*
500 * @implemented
501 */
502 SHORT WINAPI
503 VkKeyScanW(WCHAR ch)
504 {
505 return (SHORT) NtUserVkKeyScanEx(ch, 0, FALSE);
506 }
507
508
509 /*
510 * @implemented
511 */
512 VOID
513 WINAPI
514 keybd_event(
515 BYTE bVk,
516 BYTE bScan,
517 DWORD dwFlags,
518 ULONG_PTR dwExtraInfo)
519
520
521 {
522 INPUT Input;
523
524 Input.type = INPUT_KEYBOARD;
525 Input.ki.wVk = bVk;
526 Input.ki.wScan = bScan;
527 Input.ki.dwFlags = dwFlags;
528 Input.ki.time = 0;
529 Input.ki.dwExtraInfo = dwExtraInfo;
530
531 NtUserSendInput(1, &Input, sizeof(INPUT));
532 }
533
534
535 /*
536 * @implemented
537 */
538 VOID
539 WINAPI
540 mouse_event(
541 DWORD dwFlags,
542 DWORD dx,
543 DWORD dy,
544 DWORD dwData,
545 ULONG_PTR dwExtraInfo)
546 {
547 INPUT Input;
548
549 Input.type = INPUT_MOUSE;
550 Input.mi.dx = dx;
551 Input.mi.dy = dy;
552 Input.mi.mouseData = dwData;
553 Input.mi.dwFlags = dwFlags;
554 Input.mi.time = 0;
555 Input.mi.dwExtraInfo = dwExtraInfo;
556
557 NtUserSendInput(1, &Input, sizeof(INPUT));
558 }
559
560
561 /***********************************************************************
562 * get_key_state
563 */
564 static WORD get_key_state(void)
565 {
566 WORD ret = 0;
567
568 if (GetSystemMetrics( SM_SWAPBUTTON ))
569 {
570 if (GetAsyncKeyState(VK_RBUTTON) & 0x80) ret |= MK_LBUTTON;
571 if (GetAsyncKeyState(VK_LBUTTON) & 0x80) ret |= MK_RBUTTON;
572 }
573 else
574 {
575 if (GetAsyncKeyState(VK_LBUTTON) & 0x80) ret |= MK_LBUTTON;
576 if (GetAsyncKeyState(VK_RBUTTON) & 0x80) ret |= MK_RBUTTON;
577 }
578 if (GetAsyncKeyState(VK_MBUTTON) & 0x80) ret |= MK_MBUTTON;
579 if (GetAsyncKeyState(VK_SHIFT) & 0x80) ret |= MK_SHIFT;
580 if (GetAsyncKeyState(VK_CONTROL) & 0x80) ret |= MK_CONTROL;
581 if (GetAsyncKeyState(VK_XBUTTON1) & 0x80) ret |= MK_XBUTTON1;
582 if (GetAsyncKeyState(VK_XBUTTON2) & 0x80) ret |= MK_XBUTTON2;
583 return ret;
584 }
585
586 static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT_PTR idEvent,
587 DWORD dwTime)
588 {
589 POINT pos;
590 POINT posClient;
591 HWND hwnd;
592 INT hoverwidth = 0, hoverheight = 0;
593 RECT client;
594 PUSER32_TRACKINGLIST ptracking_info;
595
596 ptracking_info = & User32GetThreadData()->tracking_info;
597
598 GetCursorPos(&pos);
599 hwnd = WindowFromPoint(pos);
600
601 SystemParametersInfoW(SPI_GETMOUSEHOVERWIDTH, 0, &hoverwidth, 0);
602 SystemParametersInfoW(SPI_GETMOUSEHOVERHEIGHT, 0, &hoverheight, 0);
603
604 /* see if this tracking event is looking for TME_LEAVE and that the */
605 /* mouse has left the window */
606 if (ptracking_info->tme.dwFlags & TME_LEAVE)
607 {
608 if (ptracking_info->tme.hwndTrack != hwnd)
609 {
610 if (ptracking_info->tme.dwFlags & TME_NONCLIENT)
611 {
612 PostMessageW(ptracking_info->tme.hwndTrack, WM_NCMOUSELEAVE, 0, 0);
613 }
614 else
615 {
616 PostMessageW(ptracking_info->tme.hwndTrack, WM_MOUSELEAVE, 0, 0);
617 }
618
619 /* remove the TME_LEAVE flag */
620 ptracking_info->tme.dwFlags &= ~TME_LEAVE;
621 }
622 else
623 {
624 GetClientRect(hwnd, &client);
625 MapWindowPoints(hwnd, NULL, (LPPOINT)&client, 2);
626 if (PtInRect(&client, pos))
627 {
628 if (ptracking_info->tme.dwFlags & TME_NONCLIENT)
629 {
630 PostMessageW(ptracking_info->tme.hwndTrack, WM_NCMOUSELEAVE, 0, 0);
631 /* remove the TME_LEAVE flag */
632 ptracking_info->tme.dwFlags &= ~TME_LEAVE;
633 }
634 }
635 else
636 {
637 if (!(ptracking_info->tme.dwFlags & TME_NONCLIENT))
638 {
639 PostMessageW(ptracking_info->tme.hwndTrack, WM_MOUSELEAVE, 0, 0);
640 /* remove the TME_LEAVE flag */
641 ptracking_info->tme.dwFlags &= ~TME_LEAVE;
642 }
643 }
644 }
645 }
646
647 /* see if we are tracking hovering for this hwnd */
648 if (ptracking_info->tme.dwFlags & TME_HOVER)
649 {
650 /* has the cursor moved outside the rectangle centered around pos? */
651 if ((abs(pos.x - ptracking_info->pos.x) > (hoverwidth / 2.0)) ||
652 (abs(pos.y - ptracking_info->pos.y) > (hoverheight / 2.0)))
653 {
654 /* record this new position as the current position and reset */
655 /* the iHoverTime variable to 0 */
656 ptracking_info->pos = pos;
657 }
658 else
659 {
660 posClient.x = pos.x;
661 posClient.y = pos.y;
662 ScreenToClient(hwnd, &posClient);
663
664 if (ptracking_info->tme.dwFlags & TME_NONCLIENT)
665 {
666 PostMessageW(ptracking_info->tme.hwndTrack, WM_NCMOUSEHOVER,
667 get_key_state(), MAKELPARAM( posClient.x, posClient.y ));
668 }
669 else
670 {
671 PostMessageW(ptracking_info->tme.hwndTrack, WM_MOUSEHOVER,
672 get_key_state(), MAKELPARAM( posClient.x, posClient.y ));
673 }
674
675 /* stop tracking mouse hover */
676 ptracking_info->tme.dwFlags &= ~TME_HOVER;
677 }
678 }
679
680 /* stop the timer if the tracking list is empty */
681 if (!(ptracking_info->tme.dwFlags & (TME_HOVER | TME_LEAVE)))
682 {
683 KillTimer(0, ptracking_info->timer);
684 RtlZeroMemory(ptracking_info,sizeof(USER32_TRACKINGLIST));
685 }
686 }
687
688
689 /***********************************************************************
690 * TrackMouseEvent [USER32]
691 *
692 * Requests notification of mouse events
693 *
694 * During mouse tracking WM_MOUSEHOVER or WM_MOUSELEAVE events are posted
695 * to the hwnd specified in the ptme structure. After the event message
696 * is posted to the hwnd, the entry in the queue is removed.
697 *
698 * If the current hwnd isn't ptme->hwndTrack the TME_HOVER flag is completely
699 * ignored. The TME_LEAVE flag results in a WM_MOUSELEAVE message being posted
700 * immediately and the TME_LEAVE flag being ignored.
701 *
702 * PARAMS
703 * ptme [I,O] pointer to TRACKMOUSEEVENT information structure.
704 *
705 * RETURNS
706 * Success: non-zero
707 * Failure: zero
708 *
709 */
710 /*
711 * @implemented
712 */
713 BOOL
714 WINAPI
715 TrackMouseEvent(
716 LPTRACKMOUSEEVENT ptme)
717 {
718 HWND hwnd;
719 POINT pos;
720 DWORD hover_time;
721 PUSER32_TRACKINGLIST ptracking_info;
722
723 TRACE("%lx, %lx, %p, %lx\n", ptme->cbSize, ptme->dwFlags, ptme->hwndTrack, ptme->dwHoverTime);
724
725 if (ptme->cbSize != sizeof(TRACKMOUSEEVENT)) {
726 WARN("wrong TRACKMOUSEEVENT size from app\n");
727 SetLastError(ERROR_INVALID_PARAMETER);
728 return FALSE;
729 }
730
731 ptracking_info = & User32GetThreadData()->tracking_info;
732
733 /* fill the TRACKMOUSEEVENT struct with the current tracking for the given hwnd */
734 if (ptme->dwFlags & TME_QUERY )
735 {
736 *ptme = ptracking_info->tme;
737 ptme->cbSize = sizeof(TRACKMOUSEEVENT);
738
739 return TRUE; /* return here, TME_QUERY is retrieving information */
740 }
741
742 if (!IsWindow(ptme->hwndTrack))
743 {
744 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
745 return FALSE;
746 }
747
748 hover_time = ptme->dwHoverTime;
749
750 /* if HOVER_DEFAULT was specified replace this with the systems current value */
751 if (hover_time == HOVER_DEFAULT || hover_time == 0)
752 {
753 SystemParametersInfoW(SPI_GETMOUSEHOVERTIME, 0, &hover_time, 0);
754 }
755
756 GetCursorPos(&pos);
757 hwnd = WindowFromPoint(pos);
758
759 if (ptme->dwFlags & ~(TME_CANCEL | TME_HOVER | TME_LEAVE | TME_NONCLIENT))
760 {
761 FIXME("Unknown flag(s) %08lx\n", ptme->dwFlags & ~(TME_CANCEL | TME_HOVER | TME_LEAVE | TME_NONCLIENT));
762 }
763
764 if (ptme->dwFlags & TME_CANCEL)
765 {
766 if (ptracking_info->tme.hwndTrack == ptme->hwndTrack)
767 {
768 ptracking_info->tme.dwFlags &= ~(ptme->dwFlags & ~TME_CANCEL);
769
770 /* if we aren't tracking on hover or leave remove this entry */
771 if (!(ptracking_info->tme.dwFlags & (TME_HOVER | TME_LEAVE)))
772 {
773 KillTimer(0, ptracking_info->timer);
774 RtlZeroMemory(ptracking_info,sizeof(USER32_TRACKINGLIST));
775 }
776 }
777 } else {
778 if (ptme->hwndTrack == hwnd)
779 {
780 /* Adding new mouse event to the tracking list */
781 ptracking_info->tme = *ptme;
782 ptracking_info->tme.dwHoverTime = hover_time;
783
784 /* Initialize HoverInfo variables even if not hover tracking */
785 ptracking_info->pos = pos;
786
787 if (!ptracking_info->timer)
788 {
789 ptracking_info->timer = SetTimer(0, 0, hover_time, TrackMouseEventProc);
790 }
791 }
792 }
793
794 return TRUE;
795
796 }
797
798 /* EOF */