2 * Common controls functions
4 * Copyright 1997 Dimitrie O. Paun
5 * Copyright 1998,2000 Eric Kohl
16 #define NO_SHLWAPI_STREAM
19 #include "debugtools.h"
21 DEFAULT_DEBUG_CHANNEL(commctrl);
23 extern void ANIMATE_Register(void);
24 extern void ANIMATE_Unregister(void);
25 extern void COMBOEX_Register(void);
26 extern void COMBOEX_Unregister(void);
27 extern void DATETIME_Register(void);
28 extern void DATETIME_Unregister(void);
29 extern void FLATSB_Register(void);
30 extern void FLATSB_Unregister(void);
31 extern void HEADER_Register(void);
32 extern void HEADER_Unregister(void);
33 extern void HOTKEY_Register(void);
34 extern void HOTKEY_Unregister(void);
35 extern void IPADDRESS_Register(void);
36 extern void IPADDRESS_Unregister(void);
37 extern void LISTVIEW_Register(void);
38 extern void LISTVIEW_Unregister(void);
39 extern void MONTHCAL_Register(void);
40 extern void MONTHCAL_Unregister(void);
41 extern void NATIVEFONT_Register(void);
42 extern void NATIVEFONT_Unregister(void);
43 extern void PAGER_Register(void);
44 extern void PAGER_Unregister(void);
45 extern void PROGRESS_Register(void);
46 extern void PROGRESS_Unregister(void);
47 extern void REBAR_Register(void);
48 extern void REBAR_Unregister(void);
49 extern void STATUS_Register(void);
50 extern void STATUS_Unregister(void);
51 extern void TAB_Register(void);
52 extern void TAB_Unregister(void);
53 extern void TOOLBAR_Register(void);
54 extern void TOOLBAR_Unregister(void);
55 extern void TOOLTIPS_Register(void);
56 extern void TOOLTIPS_Unregister(void);
57 extern void TRACKBAR_Register(void);
58 extern void TRACKBAR_Unregister(void);
59 extern void TREEVIEW_Register(void);
60 extern void TREEVIEW_Unregister(void);
61 extern void UPDOWN_Register(void);
62 extern void UPDOWN_Unregister(void);
65 HANDLE COMCTL32_hHeap = (HANDLE)NULL;
66 LPSTR COMCTL32_aSubclass = (LPSTR)NULL;
67 HMODULE COMCTL32_hModule = 0;
68 LANGID COMCTL32_uiLang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL);
69 HBRUSH COMCTL32_hPattern55AABrush = (HANDLE)NULL;
71 static HBITMAP COMCTL32_hPattern55AABitmap = (HANDLE)NULL;
73 static const WORD wPattern55AA[] =
75 0x5555, 0xaaaa, 0x5555, 0xaaaa,
76 0x5555, 0xaaaa, 0x5555, 0xaaaa
80 /***********************************************************************
81 * COMCTL32_LibMain [Internal] Initializes the internal 'COMCTL32.DLL'.
84 * hinstDLL [I] handle to the 'dlls' instance
86 * lpvReserved [I] reserverd, must be NULL
94 COMCTL32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
96 TRACE("%x,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
99 case DLL_PROCESS_ATTACH:
100 COMCTL32_hModule = (HMODULE)hinstDLL;
102 /* create private heap */
103 COMCTL32_hHeap = HeapCreate (0, 0x10000, 0);
104 TRACE("Heap created: 0x%x\n", COMCTL32_hHeap);
106 /* add global subclassing atom (used by 'tooltip' and 'updown') */
107 COMCTL32_aSubclass = (LPSTR)(DWORD)GlobalAddAtomA ("CC32SubclassInfo");
108 TRACE("Subclassing atom added: %p\n", COMCTL32_aSubclass);
110 /* create local pattern brush */
111 COMCTL32_hPattern55AABitmap = CreateBitmap (8, 8, 1, 1, wPattern55AA);
112 COMCTL32_hPattern55AABrush = CreatePatternBrush (COMCTL32_hPattern55AABitmap);
114 /* register all Win95 common control classes */
119 LISTVIEW_Register ();
120 PROGRESS_Register ();
124 TOOLTIPS_Register ();
125 TRACKBAR_Register ();
126 TREEVIEW_Register ();
130 case DLL_PROCESS_DETACH:
131 /* unregister all common control classes */
132 ANIMATE_Unregister ();
133 COMBOEX_Unregister ();
134 DATETIME_Unregister ();
135 FLATSB_Unregister ();
136 HEADER_Unregister ();
137 HOTKEY_Unregister ();
138 IPADDRESS_Unregister ();
139 LISTVIEW_Unregister ();
140 MONTHCAL_Unregister ();
141 NATIVEFONT_Unregister ();
143 PROGRESS_Unregister ();
145 STATUS_Unregister ();
147 TOOLBAR_Unregister ();
148 TOOLTIPS_Unregister ();
149 TRACKBAR_Unregister ();
150 TREEVIEW_Unregister ();
151 UPDOWN_Unregister ();
153 /* delete local pattern brush */
154 DeleteObject (COMCTL32_hPattern55AABrush);
155 COMCTL32_hPattern55AABrush = (HANDLE)NULL;
156 DeleteObject (COMCTL32_hPattern55AABitmap);
157 COMCTL32_hPattern55AABitmap = (HANDLE)NULL;
159 /* delete global subclassing atom */
160 GlobalDeleteAtom (LOWORD(COMCTL32_aSubclass));
161 TRACE("Subclassing atom deleted: %p\n", COMCTL32_aSubclass);
162 COMCTL32_aSubclass = (LPSTR)NULL;
164 /* destroy private heap */
165 HeapDestroy (COMCTL32_hHeap);
166 TRACE("Heap destroyed: 0x%x\n", COMCTL32_hHeap);
167 COMCTL32_hHeap = (HANDLE)NULL;
175 /***********************************************************************
176 * MenuHelp [COMCTL32.2]
179 * uMsg [I] message (WM_MENUSELECT) (see NOTES)
180 * wParam [I] wParam of the message uMsg
181 * lParam [I] lParam of the message uMsg
182 * hMainMenu [I] handle to the application's main menu
183 * hInst [I] handle to the module that contains string resources
184 * hwndStatus [I] handle to the status bar window
185 * lpwIDs [I] pointer to an array of integers (see NOTES)
191 * The official documentation is incomplete!
192 * This is the correct documentation:
195 * MenuHelp() does NOT handle WM_COMMAND messages! It only handles
196 * WM_MENUSELECT messages.
199 * (will be written ...)
203 MenuHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu,
204 HINSTANCE hInst, HWND hwndStatus, LPUINT lpwIDs)
208 if (!IsWindow (hwndStatus))
213 TRACE("WM_MENUSELECT wParam=0x%X lParam=0x%lX\n",
216 if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
217 /* menu was closed */
218 TRACE("menu was closed!\n");
219 SendMessageA (hwndStatus, SB_SIMPLE, FALSE, 0);
222 /* menu item was selected */
223 if (HIWORD(wParam) & MF_POPUP)
224 uMenuID = (UINT)*(lpwIDs+1);
226 uMenuID = (UINT)LOWORD(wParam);
227 TRACE("uMenuID = %u\n", uMenuID);
232 if (!LoadStringA (hInst, uMenuID, szText, 256))
235 SendMessageA (hwndStatus, SB_SETTEXTA,
236 255 | SBT_NOBORDERS, (LPARAM)szText);
237 SendMessageA (hwndStatus, SB_SIMPLE, TRUE, 0);
243 TRACE("WM_COMMAND wParam=0x%X lParam=0x%lX\n",
245 /* WM_COMMAND is not invalid since it is documented
246 * in the windows api reference. So don't output
247 * any FIXME for WM_COMMAND
249 WARN("We don't care about the WM_COMMAND\n");
253 FIXME("Invalid Message 0x%x!\n", uMsg);
259 /***********************************************************************
260 * ShowHideMenuCtl [COMCTL32.3]
262 * Shows or hides controls and updates the corresponding menu item.
265 * hwnd [I] handle to the client window.
266 * uFlags [I] menu command id.
267 * lpInfo [I] pointer to an array of integers. (See NOTES.)
274 * The official documentation is incomplete!
275 * This is the correct documentation:
278 * Handle to the window that contains the menu and controls.
281 * Identifier of the menu item to receive or loose a check mark.
284 * The array of integers contains pairs of values. BOTH values of
285 * the first pair must be the handles to the application's main menu.
286 * Each subsequent pair consists of a menu id and control id.
290 ShowHideMenuCtl (HWND hwnd, UINT uFlags, LPINT lpInfo)
294 TRACE("%x, %x, %p\n", hwnd, uFlags, lpInfo);
299 if (!(lpInfo[0]) || !(lpInfo[1]))
302 /* search for control */
303 lpMenuId = &lpInfo[2];
304 while (*lpMenuId != uFlags)
307 if (GetMenuState (lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
308 /* uncheck menu item */
309 CheckMenuItem (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
313 SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
317 /* check menu item */
318 CheckMenuItem (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
322 SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
330 /***********************************************************************
331 * GetEffectiveClientRect [COMCTL32.4]
334 * hwnd [I] handle to the client window.
335 * lpRect [O] pointer to the rectangle of the client window
336 * lpInfo [I] pointer to an array of integers (see NOTES)
342 * The official documentation is incomplete!
343 * This is the correct documentation:
346 * (will be written...)
350 GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, LPINT lpInfo)
356 TRACE("(0x%08lx 0x%08lx 0x%08lx)\n",
357 (DWORD)hwnd, (DWORD)lpRect, (DWORD)lpInfo);
359 GetClientRect (hwnd, lpRect);
367 hwndCtrl = GetDlgItem (hwnd, *lpRun);
368 if (GetWindowLongA (hwndCtrl, GWL_STYLE) & WS_VISIBLE) {
369 TRACE("control id 0x%x\n", *lpRun);
370 GetWindowRect (hwndCtrl, &rcCtrl);
371 MapWindowPoints ((HWND)0, hwnd, (LPPOINT)&rcCtrl, 2);
372 SubtractRect (lpRect, lpRect, &rcCtrl);
379 /***********************************************************************
380 * DrawStatusTextW [COMCTL32.28]
382 * Draws text with borders, like in a status bar.
385 * hdc [I] handle to the window's display context
386 * lprc [I] pointer to a rectangle
387 * text [I] pointer to the text
388 * style [I] drawing style
394 * The style variable can have one of the following values:
395 * (will be written ...)
399 DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style)
402 UINT border = BDR_SUNKENOUTER;
404 if (style & SBT_POPOUT)
405 border = BDR_RAISEDOUTER;
406 else if (style & SBT_NOBORDERS)
409 DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST|BF_MIDDLE);
413 int oldbkmode = SetBkMode (hdc, TRANSPARENT);
415 DrawTextW (hdc, text, lstrlenW(text),
416 &r, DT_LEFT|DT_VCENTER|DT_SINGLELINE);
417 if (oldbkmode != TRANSPARENT)
418 SetBkMode(hdc, oldbkmode);
423 /***********************************************************************
424 * DrawStatusText [COMCTL32.27]
425 * DrawStatusTextA [COMCTL32.5]
427 * Draws text with borders, like in a status bar.
430 * hdc [I] handle to the window's display context
431 * lprc [I] pointer to a rectangle
432 * text [I] pointer to the text
433 * style [I] drawing style
440 DrawStatusTextA (HDC hdc, LPRECT lprc, LPCSTR text, UINT style)
446 if ( (len = MultiByteToWideChar( CP_ACP, 0, text, -1, NULL, 0 )) ) {
447 if ( (textW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )) )
448 MultiByteToWideChar( CP_ACP, 0, text, -1, textW, len );
451 DrawStatusTextW( hdc, lprc, textW, style );
452 HeapFree( GetProcessHeap(), 0, textW );
456 /***********************************************************************
457 * CreateStatusWindow [COMCTL32.21]
458 * CreateStatusWindowA [COMCTL32.6]
460 * Creates a status bar
463 * style [I] window style
464 * text [I] pointer to the window text
465 * parent [I] handle to the parent window
466 * wid [I] control id of the status bar
469 * Success: handle to the status window
474 CreateStatusWindowA (INT style, LPCSTR text, HWND parent, UINT wid)
476 return CreateWindowA(STATUSCLASSNAMEA, text, style,
477 CW_USEDEFAULT, CW_USEDEFAULT,
478 CW_USEDEFAULT, CW_USEDEFAULT,
483 /***********************************************************************
484 * CreateStatusWindowW [COMCTL32.22] Creates a status bar control
487 * style [I] window style
488 * text [I] pointer to the window text
489 * parent [I] handle to the parent window
490 * wid [I] control id of the status bar
493 * Success: handle to the status window
498 CreateStatusWindowW (INT style, LPCWSTR text, HWND parent, UINT wid)
500 return CreateWindowW(STATUSCLASSNAMEW, text, style,
501 CW_USEDEFAULT, CW_USEDEFAULT,
502 CW_USEDEFAULT, CW_USEDEFAULT,
507 /***********************************************************************
508 * CreateUpDownControl [COMCTL32.16] Creates an up-down control
511 * style [I] window styles
512 * x [I] horizontal position of the control
513 * y [I] vertical position of the control
514 * cx [I] with of the control
515 * cy [I] height of the control
516 * parent [I] handle to the parent window
517 * id [I] the control's identifier
518 * inst [I] handle to the application's module instance
519 * buddy [I] handle to the buddy window, can be NULL
520 * maxVal [I] upper limit of the control
521 * minVal [I] lower limit of the control
522 * curVal [I] current value of the control
525 * Success: handle to the updown control
530 CreateUpDownControl (DWORD style, INT x, INT y, INT cx, INT cy,
531 HWND parent, INT id, HINSTANCE inst,
532 HWND buddy, INT maxVal, INT minVal, INT curVal)
535 CreateWindowA (UPDOWN_CLASSA, 0, style, x, y, cx, cy,
536 parent, id, inst, 0);
538 SendMessageA (hUD, UDM_SETBUDDY, buddy, 0);
539 SendMessageA (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
540 SendMessageA (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
547 /***********************************************************************
548 * InitCommonControls [COMCTL32.17]
550 * Registers the common controls.
559 * This function is just a dummy.
560 * The Win95 controls are registered at the DLL's initialization.
561 * To register other controls InitCommonControlsEx() must be used.
565 InitCommonControls (void)
570 /***********************************************************************
571 * InitCommonControlsEx [COMCTL32.84]
573 * Registers the common controls.
576 * lpInitCtrls [I] pointer to an INITCOMMONCONTROLS structure.
583 * Only the additional common controls are registered by this function.
584 * The Win95 controls are registered at the DLL's initialization.
588 InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
595 if (lpInitCtrls->dwSize != sizeof(INITCOMMONCONTROLSEX))
598 TRACE("(0x%08lx)\n", lpInitCtrls->dwICC);
600 for (cCount = 0; cCount < 32; cCount++) {
601 dwMask = 1 << cCount;
602 if (!(lpInitCtrls->dwICC & dwMask))
605 switch (lpInitCtrls->dwICC & dwMask) {
606 /* dummy initialization */
607 case ICC_ANIMATE_CLASS:
608 case ICC_BAR_CLASSES:
609 case ICC_LISTVIEW_CLASSES:
610 case ICC_TREEVIEW_CLASSES:
611 case ICC_TAB_CLASSES:
612 case ICC_UPDOWN_CLASS:
613 case ICC_PROGRESS_CLASS:
614 case ICC_HOTKEY_CLASS:
617 /* advanced classes - not included in Win95 */
618 case ICC_DATE_CLASSES:
619 MONTHCAL_Register ();
620 DATETIME_Register ();
623 case ICC_USEREX_CLASSES:
627 case ICC_COOL_CLASSES:
631 case ICC_INTERNET_CLASSES:
632 IPADDRESS_Register ();
635 case ICC_PAGESCROLLER_CLASS:
639 case ICC_NATIVEFNTCTL_CLASS:
640 NATIVEFONT_Register ();
644 FIXME("Unknown class! dwICC=0x%lX\n", dwMask);
653 /***********************************************************************
654 * CreateToolbarEx [COMCTL32.23] Creates a tool bar window
672 * Success: handle to the tool bar control
677 CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
678 HINSTANCE hBMInst, UINT wBMID, LPCTBBUTTON lpButtons,
679 INT iNumButtons, INT dxButton, INT dyButton,
680 INT dxBitmap, INT dyBitmap, UINT uStructSize)
684 /* If not position is specified then put it at the top */
685 if ((style & CCS_BOTTOM) == 0) {
690 CreateWindowExA (0, TOOLBARCLASSNAMEA, "", style|WS_CHILD, 0, 0, 0, 0,
691 hwnd, (HMENU)wID, 0, NULL);
695 SendMessageA (hwndTB, TB_BUTTONSTRUCTSIZE,
696 (WPARAM)uStructSize, 0);
698 /* set bitmap and button size */
699 /*If CreateToolbarEx receives 0, windows sets default values*/
704 SendMessageA (hwndTB, TB_SETBITMAPSIZE, 0,
705 MAKELPARAM((WORD)dxBitmap, (WORD)dyBitmap));
711 SendMessageA (hwndTB, TB_SETBUTTONSIZE, 0,
712 MAKELPARAM((WORD)dxButton, (WORD)dyButton));
718 tbab.hInst = hBMInst;
721 SendMessageA (hwndTB, TB_ADDBITMAP,
722 (WPARAM)nBitmaps, (LPARAM)&tbab);
726 SendMessageA (hwndTB, TB_ADDBUTTONSA,
727 (WPARAM)iNumButtons, (LPARAM)lpButtons);
734 /***********************************************************************
735 * CreateMappedBitmap [COMCTL32.8]
745 * Success: handle to the new bitmap
750 CreateMappedBitmap (HINSTANCE hInstance, INT idBitmap, UINT wFlags,
751 LPCOLORMAP lpColorMap, INT iNumMaps)
755 LPBITMAPINFOHEADER lpBitmap, lpBitmapInfo;
756 UINT nSize, nColorTableSize;
757 RGBQUAD *pColorTable;
758 INT iColor, i, iMaps, nWidth, nHeight;
761 LPCOLORMAP sysColorMap;
763 COLORMAP internalColorMap[4] =
764 {{0x000000, 0}, {0x808080, 0}, {0xC0C0C0, 0}, {0xFFFFFF, 0}};
766 /* initialize pointer to colortable and default color table */
769 sysColorMap = lpColorMap;
772 internalColorMap[0].to = GetSysColor (COLOR_BTNTEXT);
773 internalColorMap[1].to = GetSysColor (COLOR_BTNSHADOW);
774 internalColorMap[2].to = GetSysColor (COLOR_BTNFACE);
775 internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT);
777 sysColorMap = (LPCOLORMAP)internalColorMap;
780 hRsrc = FindResourceA (hInstance, (LPSTR)idBitmap, RT_BITMAPA);
783 hglb = LoadResource (hInstance, hRsrc);
786 lpBitmap = (LPBITMAPINFOHEADER)LockResource (hglb);
787 if (lpBitmap == NULL)
790 nColorTableSize = (1 << lpBitmap->biBitCount);
791 nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
792 lpBitmapInfo = (LPBITMAPINFOHEADER)GlobalAlloc (GMEM_FIXED, nSize);
793 if (lpBitmapInfo == NULL)
795 RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
797 pColorTable = (RGBQUAD*)(((LPBYTE)lpBitmapInfo)+(UINT)lpBitmapInfo->biSize);
799 for (iColor = 0; iColor < nColorTableSize; iColor++) {
800 for (i = 0; i < iMaps; i++) {
801 cRef = RGB(pColorTable[iColor].rgbRed,
802 pColorTable[iColor].rgbGreen,
803 pColorTable[iColor].rgbBlue);
804 if ( cRef == sysColorMap[i].from) {
806 if (wFlags & CBS_MASKED) {
807 if (sysColorMap[i].to != COLOR_BTNTEXT)
808 pColorTable[iColor] = RGB(255, 255, 255);
812 pColorTable[iColor].rgbBlue = GetBValue(sysColorMap[i].to);
813 pColorTable[iColor].rgbGreen = GetGValue(sysColorMap[i].to);
814 pColorTable[iColor].rgbRed = GetRValue(sysColorMap[i].to);
819 nWidth = (INT)lpBitmapInfo->biWidth;
820 nHeight = (INT)lpBitmapInfo->biHeight;
821 hdcScreen = GetDC ((HWND)0);
822 hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
824 HDC hdcDst = CreateCompatibleDC (hdcScreen);
825 HBITMAP hbmOld = SelectObject (hdcDst, hbm);
826 LPBYTE lpBits = (LPBYTE)(lpBitmap + 1);
827 lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD);
828 StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
829 lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
831 SelectObject (hdcDst, hbmOld);
834 ReleaseDC ((HWND)0, hdcScreen);
835 GlobalFree ((HGLOBAL)lpBitmapInfo);
842 /***********************************************************************
843 * CreateToolbar [COMCTL32.7] Creates a tool bar control
856 * Success: handle to the tool bar control
860 * Do not use this functions anymore. Use CreateToolbarEx instead.
864 CreateToolbar (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
865 HINSTANCE hBMInst, UINT wBMID,
866 LPCOLDTBBUTTON lpButtons,INT iNumButtons)
868 return CreateToolbarEx (hwnd, style | CCS_NODIVIDER, wID, nBitmaps,
869 hBMInst, wBMID, (LPCTBBUTTON)lpButtons,
870 iNumButtons, 0, 0, 0, 0, sizeof (OLDTBBUTTON));
874 /***********************************************************************
875 * DllGetVersion [COMCTL32.25]
877 * Retrieves version information of the 'COMCTL32.DLL'
880 * pdvi [O] pointer to version information structure.
884 * Failure: E_INVALIDARG
887 * Returns version of a comctl32.dll from IE4.01 SP1.
891 COMCTL32_DllGetVersion (DLLVERSIONINFO *pdvi)
893 if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
894 WARN("wrong DLLVERSIONINFO size from app\n");
898 pdvi->dwMajorVersion = COMCTL32_VERSION;
899 pdvi->dwMinorVersion = COMCTL32_VERSION_MINOR;
900 pdvi->dwBuildNumber = 2919;
901 pdvi->dwPlatformID = 6304;
903 TRACE("%lu.%lu.%lu.%lu\n",
904 pdvi->dwMajorVersion, pdvi->dwMinorVersion,
905 pdvi->dwBuildNumber, pdvi->dwPlatformID);
910 /***********************************************************************
911 * DllInstall (COMCTL32.26)
913 HRESULT WINAPI COMCTL32_DllInstall(BOOL bInstall, LPCWSTR cmdline)
915 FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
916 debugstr_w(cmdline));
921 /***********************************************************************
922 * _TrackMouseEvent [COMCTL32.91]
924 * Requests notification of mouse events
926 * During mouse tracking WM_MOUSEHOVER or WM_MOUSELEAVE events are posted
927 * to the hwnd specified in the ptme structure. After the event message
928 * is posted to the hwnd, the entry in the queue is removed.
930 * If the current hwnd isn't ptme->hwndTrack the TME_HOVER flag is completely
931 * ignored. The TME_LEAVE flag results in a WM_MOUSELEAVE message being posted
932 * immediately and the TME_LEAVE flag being ignored.
935 * ptme [I,O] pointer to TRACKMOUSEEVENT information structure.
941 * IMPLEMENTATION moved to USER32.TrackMouseEvent
946 _TrackMouseEvent (TRACKMOUSEEVENT *ptme)
948 return TrackMouseEvent (ptme);
951 /*************************************************************************
952 * GetMUILanguage [COMCTL32.39]
954 * FIXME: What's this supposed to do? Apparently some i18n thing.
957 LANGID WINAPI GetMUILanguage (VOID)
959 return COMCTL32_uiLang;
963 /*************************************************************************
964 * InitMUILanguage [COMCTL32.85]
966 * FIXME: What's this supposed to do? Apparently some i18n thing.
970 VOID WINAPI InitMUILanguage (LANGID uiLang)
972 COMCTL32_uiLang = uiLang;
976 /***********************************************************************
977 * COMCTL32_CreateToolTip [NOT AN API]
979 * Creates a tooltip for the control specified in hwnd and does all
980 * necessary setup and notifications.
983 * hwndOwner [I] Handle to the window that will own the tool tip.
986 * Success: Handle of tool tip window.
990 COMCTL32_CreateToolTip(HWND hwndOwner)
994 hwndToolTip = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0,
995 CW_USEDEFAULT, CW_USEDEFAULT,
996 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner,
999 /* Send NM_TOOLTIPSCREATED notification */
1002 NMTOOLTIPSCREATED nmttc;
1003 /* true owner can be different if hwndOwner is a child window */
1004 HWND hwndTrueOwner = GetWindow(hwndToolTip, GW_OWNER);
1005 nmttc.hdr.hwndFrom = hwndTrueOwner;
1006 nmttc.hdr.idFrom = GetWindowLongA(hwndTrueOwner, GWL_ID);
1007 nmttc.hdr.code = NM_TOOLTIPSCREATED;
1008 nmttc.hwndToolTips = hwndToolTip;
1010 SendMessageA(GetParent(hwndTrueOwner), WM_NOTIFY,
1011 (WPARAM)GetWindowLongA(hwndTrueOwner, GWL_ID),