ReactOS 0.4.16-dev-1163-gec5b142
commctrl.c
Go to the documentation of this file.
1/*
2 * Common controls functions
3 *
4 * Copyright 1997 Dimitrie O. Paun
5 * Copyright 1998,2000 Eric Kohl
6 * Copyright 2014-2015 Michael M�ller
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 *
22 * NOTES
23 *
24 * This code was audited for completeness against the documented features
25 * of Comctl32.dll version 6.0 on Oct. 21, 2002, by Christian Neumair.
26 *
27 * Unless otherwise noted, we believe this code to be complete, as per
28 * the specification mentioned above.
29 * If you discover missing features, or bugs, please note them below.
30 *
31 * TODO
32 * -- implement GetMUILanguage + InitMUILanguage
33 * -- finish NOTES for MenuHelp, GetEffectiveClientRect and GetStatusTextW
34 * -- FIXMEs + BUGS (search for them)
35 *
36 * Control Classes
37 * -- ICC_ANIMATE_CLASS
38 * -- ICC_BAR_CLASSES
39 * -- ICC_COOL_CLASSES
40 * -- ICC_DATE_CLASSES
41 * -- ICC_HOTKEY_CLASS
42 * -- ICC_INTERNET_CLASSES
43 * -- ICC_LINK_CLASS
44 * -- ICC_LISTVIEW_CLASSES
45 * -- ICC_NATIVEFNTCTL_CLASS
46 * -- ICC_PAGESCROLLER_CLASS
47 * -- ICC_PROGRESS_CLASS
48 * -- ICC_STANDARD_CLASSES (not yet implemented)
49 * -- ICC_TAB_CLASSES
50 * -- ICC_TREEVIEW_CLASSES
51 * -- ICC_UPDOWN_CLASS
52 * -- ICC_USEREX_CLASSES
53 * -- ICC_WIN95_CLASSES
54 */
55
56#include <stdarg.h>
57#include <string.h>
58#include <stdlib.h>
59
60#include "windef.h"
61#include "winbase.h"
62#include "wingdi.h"
63#include "winuser.h"
64#include "winnls.h"
65#include "commctrl.h"
66#include "winerror.h"
67#include "winreg.h"
68#define NO_SHLWAPI_STREAM
69#include "shlwapi.h"
70#include "comctl32.h"
71#include "wine/debug.h"
72
74
75
77
83
85
86static const WORD wPattern55AA[] =
87{
88 0x5555, 0xaaaa, 0x5555, 0xaaaa,
89 0x5555, 0xaaaa, 0x5555, 0xaaaa
90};
91
92static const WCHAR strCC32SubclassInfo[] = {
93 'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0
94};
95
96#ifdef __REACTOS__
97
98#include <strsafe.h>
99
100#define NAME L"microsoft.windows.common-controls"
101#define VERSION_V5 L"5.82.2600.2982"
102#define VERSION L"6.0.2600.2982"
103#define PUBLIC_KEY L"6595b64144ccf1df"
104
105#ifdef __i386__
106#define ARCH L"x86"
107#elif defined __x86_64__
108#define ARCH L"amd64"
109#else
110#define ARCH L"none"
111#endif
112
113static const WCHAR manifest_filename[] = ARCH L"_" NAME L"_" PUBLIC_KEY L"_" VERSION L"_none_deadbeef.manifest";
114static const WCHAR manifest_filename_v5[] = ARCH L"_" NAME L"_" PUBLIC_KEY L"_" VERSION_V5 L"_none_deadbeef.manifest";
115
116static WCHAR* GetManifestPath(BOOL create, BOOL bV6)
117{
118 WCHAR *pwszBuf;
120
121 pwszBuf = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR));
122 if (!pwszBuf)
123 return NULL;
124
126 hres = StringCchCatW(pwszBuf, MAX_PATH, L"\\winsxs");
127 if (FAILED(hres))
128 return NULL;
129 if (create)
130 CreateDirectoryW(pwszBuf, NULL);
131 hres = StringCchCatW(pwszBuf, MAX_PATH, L"\\manifests\\");
132 if (FAILED(hres))
133 return NULL;
134 if (create)
135 CreateDirectoryW(pwszBuf, NULL);
136
137 hres = StringCchCatW(pwszBuf, MAX_PATH, bV6 ? manifest_filename : manifest_filename_v5);
138 if (FAILED(hres))
139 return NULL;
140
141 return pwszBuf;
142}
143
144static HANDLE CreateComctl32ActCtx(BOOL bV6)
145{
146 HANDLE ret;
147 WCHAR* pwstrSource;
148 ACTCTXW ActCtx = {sizeof(ACTCTX)};
149
150 pwstrSource = GetManifestPath(FALSE, bV6);
151 if (!pwstrSource)
152 {
153 ERR("GetManifestPath failed! bV6=%d\n", bV6);
155 }
156 ActCtx.lpSource = pwstrSource;
158 HeapFree(GetProcessHeap(), 0, pwstrSource);
160 ERR("CreateActCtxW failed! bV6=%d\n", bV6);
161 return ret;
162}
163
164static void RegisterControls(BOOL bV6)
165{
181 TAB_Register ();
186
187 if (!bV6)
188 {
190 }
191 else
192 {
196 EDIT_Register ();
199
200 TOOLBARv6_Register();
201 }
202}
203
204static void UnregisterControls(BOOL bV6)
205{
226
227 if (!bV6)
228 {
230 }
231 else
232 {
233 BUTTON_Unregister();
234 COMBO_Unregister ();
235 COMBOLBOX_Unregister ();
236 EDIT_Unregister ();
237 LISTBOX_Unregister ();
238 STATIC_Unregister ();
239
240 TOOLBARv6_Unregister ();
241 }
242
243}
244
245static void InitializeClasses()
246{
247 HANDLE hActCtx5, hActCtx6;
249 ULONG_PTR ulCookie;
250
251 /* like comctl32 5.82+ register all the common control classes */
252 /* Register the classes once no matter what */
253 hActCtx5 = CreateComctl32ActCtx(FALSE);
254 activated = (hActCtx5 != INVALID_HANDLE_VALUE ? ActivateActCtx(hActCtx5, &ulCookie) : FALSE);
255 RegisterControls(FALSE); /* Register the classes pretending to be v5 */
256 if (activated) DeactivateActCtx(0, ulCookie);
257
258 hActCtx6 = CreateComctl32ActCtx(TRUE);
259 if (hActCtx6 != INVALID_HANDLE_VALUE)
260 {
261 activated = ActivateActCtx(hActCtx6, &ulCookie);
262 RegisterControls(TRUE); /* Register the classes pretending to be v6 */
263 if (activated) DeactivateActCtx(0, ulCookie);
264
265 /* Initialize the themed controls only when the v6 manifest is present */
266 THEMING_Initialize (hActCtx5, hActCtx6);
267 }
268}
269
270static void UninitializeClasses()
271{
272 HANDLE hActCtx5, hActCtx6;
274 ULONG_PTR ulCookie;
275
276 hActCtx5 = CreateComctl32ActCtx(FALSE);
277 activated = (hActCtx5 != INVALID_HANDLE_VALUE ? ActivateActCtx(hActCtx5, &ulCookie) : FALSE);
278 UnregisterControls(FALSE);
279 if (activated) DeactivateActCtx(0, ulCookie);
280
281 hActCtx6 = CreateComctl32ActCtx(TRUE);
282 if (hActCtx6 != INVALID_HANDLE_VALUE)
283 {
284 activated = ActivateActCtx(hActCtx6, &ulCookie);
286 UnregisterControls(TRUE);
287 if (activated) DeactivateActCtx(0, ulCookie);
288 }
289}
290
291/***********************************************************************
292 * RegisterClassNameW [COMCTL32.@]
293 *
294 * Register window class again while using as SxS module.
295 */
296BOOLEAN WINAPI RegisterClassNameW(LPCWSTR className)
297{
298 InitializeClasses();
299 return TRUE;
300}
301
302#endif /* __REACTOS__ */
303
304#ifndef __REACTOS__
306{
307#define VERSION "6.0.2600.2982!"
308 static const char *classes[] =
309 {
312 VERSION "ComboLBox",
316 };
317 int i;
318
319 for (i = 0; i < ARRAY_SIZE(classes); i++)
320 UnregisterClassA(classes[i], NULL);
321
322#undef VERSION
323}
324#endif
325
326/***********************************************************************
327 * DllMain [Internal]
328 *
329 * Initializes the internal 'COMCTL32.DLL'.
330 *
331 * PARAMS
332 * hinstDLL [I] handle to the 'dlls' instance
333 * fdwReason [I]
334 * lpvReserved [I] reserved, must be NULL
335 *
336 * RETURNS
337 * Success: TRUE
338 * Failure: FALSE
339 */
340
342{
343 TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
344
345 switch (fdwReason) {
348
349 COMCTL32_hModule = hinstDLL;
350
351 /* add global subclassing atom (used by 'tooltip' and 'updown') */
353 TRACE("Subclassing atom added: %p\n", COMCTL32_wSubclass);
354
355 /* create local pattern brush */
358
359 /* Get all the colors at DLL load */
361
362#ifndef __REACTOS__
363 /* like comctl32 5.82+ register all the common control classes */
379 TAB_Register ();
385
389 EDIT_Register ();
392
393 /* subclass user32 controls */
395#else
396 InitializeClasses();
397#endif
398
399 break;
400
402 if (lpvReserved) break;
403#ifndef __REACTOS__
404 /* clean up subclassing */
406
407 /* unregister all common control classes */
429
431
432#else
433 UninitializeClasses();
434#endif
435 /* delete local pattern brush */
438
439 /* delete global subclassing atom */
441 TRACE("Subclassing atom deleted: %p\n", COMCTL32_wSubclass);
442 break;
443 }
444
445 return TRUE;
446}
447
448
449/***********************************************************************
450 * MenuHelp [COMCTL32.2]
451 *
452 * Handles the setting of status bar help messages when the user
453 * selects menu items.
454 *
455 * PARAMS
456 * uMsg [I] message (WM_MENUSELECT) (see NOTES)
457 * wParam [I] wParam of the message uMsg
458 * lParam [I] lParam of the message uMsg
459 * hMainMenu [I] handle to the application's main menu
460 * hInst [I] handle to the module that contains string resources
461 * hwndStatus [I] handle to the status bar window
462 * lpwIDs [I] pointer to an array of integers (see NOTES)
463 *
464 * RETURNS
465 * No return value
466 *
467 * NOTES
468 * The official documentation is incomplete!
469 * This is the correct documentation:
470 *
471 * uMsg:
472 * MenuHelp() does NOT handle WM_COMMAND messages! It only handles
473 * WM_MENUSELECT messages.
474 *
475 * lpwIDs:
476 * (will be written ...)
477 */
478
482{
483 UINT uMenuID = 0;
484
485 if (!IsWindow (hwndStatus))
486 return;
487
488 switch (uMsg) {
489 case WM_MENUSELECT:
490 TRACE("WM_MENUSELECT wParam=0x%lX lParam=0x%lX\n",
491 wParam, lParam);
492
493 if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
494 /* menu was closed */
495 TRACE("menu was closed!\n");
497 }
498 else {
499 /* menu item was selected */
500 if (HIWORD(wParam) & MF_POPUP)
501 uMenuID = *(lpwIDs+1);
502 else
503 uMenuID = (UINT)LOWORD(wParam);
504 TRACE("uMenuID = %u\n", uMenuID);
505
506 if (uMenuID) {
507 WCHAR szText[256];
508
509 if (!LoadStringW (hInst, uMenuID, szText, ARRAY_SIZE(szText)))
510 szText[0] = '\0';
511
513 255 | SBT_NOBORDERS, (LPARAM)szText);
515 }
516 }
517 break;
518
519 case WM_COMMAND :
520 TRACE("WM_COMMAND wParam=0x%lX lParam=0x%lX\n",
521 wParam, lParam);
522 /* WM_COMMAND is not invalid since it is documented
523 * in the windows api reference. So don't output
524 * any FIXME for WM_COMMAND
525 */
526 WARN("We don't care about the WM_COMMAND\n");
527 break;
528
529 default:
530 FIXME("Invalid Message 0x%x!\n", uMsg);
531 break;
532 }
533}
534
535
536/***********************************************************************
537 * ShowHideMenuCtl [COMCTL32.3]
538 *
539 * Shows or hides controls and updates the corresponding menu item.
540 *
541 * PARAMS
542 * hwnd [I] handle to the client window.
543 * uFlags [I] menu command id.
544 * lpInfo [I] pointer to an array of integers. (See NOTES.)
545 *
546 * RETURNS
547 * Success: TRUE
548 * Failure: FALSE
549 *
550 * NOTES
551 * The official documentation is incomplete!
552 * This is the correct documentation:
553 *
554 * hwnd
555 * Handle to the window that contains the menu and controls.
556 *
557 * uFlags
558 * Identifier of the menu item to receive or lose a check mark.
559 *
560 * lpInfo
561 * The array of integers contains pairs of values. BOTH values of
562 * the first pair must be the handles to the application's main menu.
563 * Each subsequent pair consists of a menu id and control id.
564 */
565
568{
569 LPINT lpMenuId;
570
571 TRACE("%p, %lx, %p\n", hwnd, uFlags, lpInfo);
572
573 if (lpInfo == NULL)
574 return FALSE;
575
576 if (!(lpInfo[0]) || !(lpInfo[1]))
577 return FALSE;
578
579 /* search for control */
580 lpMenuId = &lpInfo[2];
581 while (*lpMenuId != uFlags)
582 lpMenuId += 2;
583
585 /* uncheck menu item */
586 CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
587
588 /* hide control */
589 lpMenuId++;
590 SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
592 }
593 else {
594 /* check menu item */
595 CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
596
597 /* show control */
598 lpMenuId++;
599 SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
601 }
602
603 return TRUE;
604}
605
606
607/***********************************************************************
608 * GetEffectiveClientRect [COMCTL32.4]
609 *
610 * Calculates the coordinates of a rectangle in the client area.
611 *
612 * PARAMS
613 * hwnd [I] handle to the client window.
614 * lpRect [O] pointer to the rectangle of the client window
615 * lpInfo [I] pointer to an array of integers (see NOTES)
616 *
617 * RETURNS
618 * No return value.
619 *
620 * NOTES
621 * The official documentation is incomplete!
622 * This is the correct documentation:
623 *
624 * lpInfo
625 * (will be written ...)
626 */
627
629GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, const INT *lpInfo)
630{
631 RECT rcCtrl;
632 const INT *lpRun;
633 HWND hwndCtrl;
634
635 TRACE("(%p %p %p)\n",
636 hwnd, lpRect, lpInfo);
637
638 GetClientRect (hwnd, lpRect);
639 lpRun = lpInfo;
640
641 do {
642 lpRun += 2;
643 if (*lpRun == 0)
644 return;
645 lpRun++;
646 hwndCtrl = GetDlgItem (hwnd, *lpRun);
647 if (GetWindowLongW (hwndCtrl, GWL_STYLE) & WS_VISIBLE) {
648 TRACE("control id 0x%x\n", *lpRun);
649 GetWindowRect (hwndCtrl, &rcCtrl);
650 MapWindowPoints (NULL, hwnd, (LPPOINT)&rcCtrl, 2);
651 SubtractRect (lpRect, lpRect, &rcCtrl);
652 }
653 lpRun++;
654 } while (*lpRun);
655}
656
657
658/***********************************************************************
659 * DrawStatusTextW [COMCTL32.@]
660 *
661 * Draws text with borders, like in a status bar.
662 *
663 * PARAMS
664 * hdc [I] handle to the window's display context
665 * lprc [I] pointer to a rectangle
666 * text [I] pointer to the text
667 * style [I] drawing style
668 *
669 * RETURNS
670 * No return value.
671 *
672 * NOTES
673 * The style variable can have one of the following values:
674 * (will be written ...)
675 */
676
678{
679 RECT r = *lprc;
681 COLORREF oldbkcolor;
682
683 if (style & SBT_POPOUT)
685 else if (style & SBT_NOBORDERS)
686 border = 0;
687
688 oldbkcolor = SetBkColor (hdc, comctl32_color.clrBtnFace);
689#ifdef __REACTOS__ // HACK for CORE-19854.
691#else
693#endif
694
695 /* now draw text */
696 if (text) {
697 int oldbkmode = SetBkMode (hdc, TRANSPARENT);
698 COLORREF oldtextcolor;
700 int strCnt = 0;
701
702 oldtextcolor = SetTextColor (hdc, comctl32_color.clrBtnText);
703 if (style & SBT_RTLREADING)
704 FIXME("Unsupported RTL style!\n");
705 r.left += 3;
706 do {
707 if (*text == '\t') {
708 if (strCnt) {
710 strCnt = 0;
711 }
712 if (align==DT_RIGHT) {
713 break;
714 }
716 } else {
717 strCnt++;
718 }
719 } while(*text++);
720
721 if (strCnt) DrawTextW (hdc, text - strCnt, -1, &r, align|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX);
722 SetBkMode (hdc, oldbkmode);
723 SetTextColor (hdc, oldtextcolor);
724 }
725
726 SetBkColor (hdc, oldbkcolor);
727}
728
729
730/***********************************************************************
731 * DrawStatusText [COMCTL32.@]
732 * DrawStatusTextA [COMCTL32.5]
733 *
734 * Draws text with borders, like in a status bar.
735 *
736 * PARAMS
737 * hdc [I] handle to the window's display context
738 * lprc [I] pointer to a rectangle
739 * text [I] pointer to the text
740 * style [I] drawing style
741 *
742 * RETURNS
743 * No return value.
744 */
745
747{
748 INT len;
749 LPWSTR textW = NULL;
750
751 if ( text ) {
752 if ( (len = MultiByteToWideChar( CP_ACP, 0, text, -1, NULL, 0 )) ) {
753 if ( (textW = Alloc( len * sizeof(WCHAR) )) )
755 }
756 }
758 Free( textW );
759}
760
761
762/***********************************************************************
763 * CreateStatusWindow [COMCTL32.@]
764 * CreateStatusWindowA [COMCTL32.6]
765 *
766 * Creates a status bar
767 *
768 * PARAMS
769 * style [I] window style
770 * text [I] pointer to the window text
771 * parent [I] handle to the parent window
772 * wid [I] control id of the status bar
773 *
774 * RETURNS
775 * Success: handle to the status window
776 * Failure: 0
777 */
778
781{
785 parent, (HMENU)(DWORD_PTR)wid, 0, 0);
786}
787
788
789/***********************************************************************
790 * CreateStatusWindowW [COMCTL32.@]
791 *
792 * Creates a status bar control
793 *
794 * PARAMS
795 * style [I] window style
796 * text [I] pointer to the window text
797 * parent [I] handle to the parent window
798 * wid [I] control id of the status bar
799 *
800 * RETURNS
801 * Success: handle to the status window
802 * Failure: 0
803 */
804
807{
811 parent, (HMENU)(DWORD_PTR)wid, 0, 0);
812}
813
814
815/***********************************************************************
816 * CreateUpDownControl [COMCTL32.16]
817 *
818 * Creates an up-down control
819 *
820 * PARAMS
821 * style [I] window styles
822 * x [I] horizontal position of the control
823 * y [I] vertical position of the control
824 * cx [I] with of the control
825 * cy [I] height of the control
826 * parent [I] handle to the parent window
827 * id [I] the control's identifier
828 * inst [I] handle to the application's module instance
829 * buddy [I] handle to the buddy window, can be NULL
830 * maxVal [I] upper limit of the control
831 * minVal [I] lower limit of the control
832 * curVal [I] current value of the control
833 *
834 * RETURNS
835 * Success: handle to the updown control
836 * Failure: 0
837 */
838
841 HWND parent, INT id, HINSTANCE inst,
842 HWND buddy, INT maxVal, INT minVal, INT curVal)
843{
844 HWND hUD =
846 parent, (HMENU)(DWORD_PTR)id, inst, 0);
847 if (hUD) {
848 SendMessageW (hUD, UDM_SETBUDDY, (WPARAM)buddy, 0);
849 SendMessageW (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
850 SendMessageW (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
851 }
852
853 return hUD;
854}
855
856
857/***********************************************************************
858 * InitCommonControls [COMCTL32.17]
859 *
860 * Registers the common controls.
861 *
862 * PARAMS
863 * No parameters.
864 *
865 * RETURNS
866 * No return values.
867 *
868 * NOTES
869 * This function is just a dummy - all the controls are registered at
870 * the DLL initialization time. See InitCommonControlsEx for details.
871 */
872
875{
876}
877
878
879/***********************************************************************
880 * InitCommonControlsEx [COMCTL32.@]
881 *
882 * Registers the common controls.
883 *
884 * PARAMS
885 * lpInitCtrls [I] pointer to an INITCOMMONCONTROLS structure.
886 *
887 * RETURNS
888 * Success: TRUE
889 * Failure: FALSE
890 *
891 * NOTES
892 * Probably all versions of comctl32 initializes the Win95 controls in DllMain
893 * during DLL initialization. Starting from comctl32 v5.82 all the controls
894 * are initialized there. We follow this behaviour and this function is just
895 * a dummy.
896 *
897 * Note: when writing programs under Windows, if you don't call any function
898 * from comctl32 the linker may not link this DLL. If InitCommonControlsEx
899 * was the only comctl32 function you were calling and you remove it you may
900 * have a false impression that InitCommonControlsEx actually did something.
901 */
902
905{
906 if (!lpInitCtrls || lpInitCtrls->dwSize != sizeof(INITCOMMONCONTROLSEX))
907 return FALSE;
908
909 TRACE("(0x%08x)\n", lpInitCtrls->dwICC);
910 return TRUE;
911}
912
913
914/***********************************************************************
915 * CreateToolbarEx [COMCTL32.@]
916 *
917 * Creates a toolbar window.
918 *
919 * PARAMS
920 * hwnd
921 * style
922 * wID
923 * nBitmaps
924 * hBMInst
925 * wBMID
926 * lpButtons
927 * iNumButtons
928 * dxButton
929 * dyButton
930 * dxBitmap
931 * dyBitmap
932 * uStructSize
933 *
934 * RETURNS
935 * Success: handle to the tool bar control
936 * Failure: 0
937 */
938
941 HINSTANCE hBMInst, UINT_PTR wBMID, LPCTBBUTTON lpButtons,
942 INT iNumButtons, INT dxButton, INT dyButton,
943 INT dxBitmap, INT dyBitmap, UINT uStructSize)
944{
945 HWND hwndTB;
946
947 hwndTB =
950 if(hwndTB) {
951 TBADDBITMAP tbab;
952
953 SendMessageW (hwndTB, TB_BUTTONSTRUCTSIZE, uStructSize, 0);
954
955 /* set bitmap and button size */
956 /*If CreateToolbarEx receives 0, windows sets default values*/
957 if (dxBitmap < 0)
958 dxBitmap = 16;
959 if (dyBitmap < 0)
960 dyBitmap = 16;
961 if (dxBitmap == 0 || dyBitmap == 0)
962 dxBitmap = dyBitmap = 16;
963 SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxBitmap, dyBitmap));
964
965 if (dxButton < 0)
966 dxButton = dxBitmap;
967 if (dyButton < 0)
968 dyButton = dyBitmap;
969 /* TB_SETBUTTONSIZE -> TB_SETBITMAPSIZE bug introduced for Windows compatibility */
970 if (dxButton != 0 && dyButton != 0)
971 SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxButton, dyButton));
972
973
974 /* add bitmaps */
975 if (nBitmaps > 0 || hBMInst == HINST_COMMCTRL)
976 {
977 tbab.hInst = hBMInst;
978 tbab.nID = wBMID;
979
980 SendMessageW (hwndTB, TB_ADDBITMAP, nBitmaps, (LPARAM)&tbab);
981 }
982 /* add buttons */
983 if(iNumButtons > 0)
984 SendMessageW (hwndTB, TB_ADDBUTTONSW, iNumButtons, (LPARAM)lpButtons);
985 }
986
987 return hwndTB;
988}
989
990
991/***********************************************************************
992 * CreateMappedBitmap [COMCTL32.8]
993 *
994 * Loads a bitmap resource using a colour map.
995 *
996 * PARAMS
997 * hInstance [I] Handle to the module containing the bitmap.
998 * idBitmap [I] The bitmap resource ID.
999 * wFlags [I] CMB_MASKED for using bitmap as a mask or 0 for normal.
1000 * lpColorMap [I] Colour information needed for the bitmap or NULL (uses system colours).
1001 * iNumMaps [I] Number of COLORMAP's pointed to by lpColorMap.
1002 *
1003 * RETURNS
1004 * Success: handle to the new bitmap
1005 * Failure: 0
1006 */
1007
1010 LPCOLORMAP lpColorMap, INT iNumMaps)
1011{
1012 HGLOBAL hglb;
1013 HRSRC hRsrc;
1014 const BITMAPINFOHEADER *lpBitmap;
1015 LPBITMAPINFOHEADER lpBitmapInfo;
1016 UINT nSize, nColorTableSize, iColor;
1017 RGBQUAD *pColorTable;
1018 INT i, iMaps, nWidth, nHeight;
1019 HDC hdcScreen;
1020 HBITMAP hbm;
1021 LPCOLORMAP sysColorMap;
1022 COLORREF cRef;
1023 COLORMAP internalColorMap[4] =
1024 {{0x000000, 0}, {0x808080, 0}, {0xC0C0C0, 0}, {0xFFFFFF, 0}};
1025
1026 /* initialize pointer to colortable and default color table */
1027 if (lpColorMap) {
1028 iMaps = iNumMaps;
1029 sysColorMap = lpColorMap;
1030 }
1031 else {
1032 internalColorMap[0].to = GetSysColor (COLOR_BTNTEXT);
1033 internalColorMap[1].to = GetSysColor (COLOR_BTNSHADOW);
1034 internalColorMap[2].to = GetSysColor (COLOR_BTNFACE);
1035 internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT);
1036 iMaps = 4;
1037 sysColorMap = internalColorMap;
1038 }
1039
1040 hRsrc = FindResourceW (hInstance, (LPWSTR)idBitmap, (LPWSTR)RT_BITMAP);
1041 if (hRsrc == 0)
1042 return 0;
1043 hglb = LoadResource (hInstance, hRsrc);
1044 if (hglb == 0)
1045 return 0;
1046 lpBitmap = LockResource (hglb);
1047 if (lpBitmap == NULL)
1048 return 0;
1049
1050 if (lpBitmap->biSize >= sizeof(BITMAPINFOHEADER) && lpBitmap->biClrUsed)
1051 nColorTableSize = lpBitmap->biClrUsed;
1052 else if (lpBitmap->biBitCount <= 8)
1053 nColorTableSize = (1 << lpBitmap->biBitCount);
1054 else
1055 nColorTableSize = 0;
1056 nSize = lpBitmap->biSize;
1057 if (nSize == sizeof(BITMAPINFOHEADER) && lpBitmap->biCompression == BI_BITFIELDS)
1058 nSize += 3 * sizeof(DWORD);
1059 nSize += nColorTableSize * sizeof(RGBQUAD);
1060 lpBitmapInfo = GlobalAlloc (GMEM_FIXED, nSize);
1061 if (lpBitmapInfo == NULL)
1062 return 0;
1063 RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
1064
1065 pColorTable = (RGBQUAD*)(((LPBYTE)lpBitmapInfo) + lpBitmapInfo->biSize);
1066
1067 for (iColor = 0; iColor < nColorTableSize; iColor++) {
1068 for (i = 0; i < iMaps; i++) {
1069 cRef = RGB(pColorTable[iColor].rgbRed,
1070 pColorTable[iColor].rgbGreen,
1071 pColorTable[iColor].rgbBlue);
1072 if ( cRef == sysColorMap[i].from) {
1073#if 0
1074 if (wFlags & CBS_MASKED) {
1075 if (sysColorMap[i].to != COLOR_BTNTEXT)
1076 pColorTable[iColor] = RGB(255, 255, 255);
1077 }
1078 else
1079#endif
1080 pColorTable[iColor].rgbBlue = GetBValue(sysColorMap[i].to);
1081 pColorTable[iColor].rgbGreen = GetGValue(sysColorMap[i].to);
1082 pColorTable[iColor].rgbRed = GetRValue(sysColorMap[i].to);
1083 break;
1084 }
1085 }
1086 }
1087 nWidth = lpBitmapInfo->biWidth;
1088 nHeight = lpBitmapInfo->biHeight;
1089 hdcScreen = GetDC (NULL);
1090 hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
1091 if (hbm) {
1092 HDC hdcDst = CreateCompatibleDC (hdcScreen);
1093 HBITMAP hbmOld = SelectObject (hdcDst, hbm);
1094 const BYTE *lpBits = (const BYTE *)lpBitmap + nSize;
1095 StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
1096 lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
1097 SRCCOPY);
1098 SelectObject (hdcDst, hbmOld);
1099 DeleteDC (hdcDst);
1100 }
1101 ReleaseDC (NULL, hdcScreen);
1102 GlobalFree (lpBitmapInfo);
1103 FreeResource (hglb);
1104
1105 return hbm;
1106}
1107
1108
1109/***********************************************************************
1110 * CreateToolbar [COMCTL32.7]
1111 *
1112 * Creates a toolbar control.
1113 *
1114 * PARAMS
1115 * hwnd
1116 * style
1117 * wID
1118 * nBitmaps
1119 * hBMInst
1120 * wBMID
1121 * lpButtons
1122 * iNumButtons
1123 *
1124 * RETURNS
1125 * Success: handle to the tool bar control
1126 * Failure: 0
1127 *
1128 * NOTES
1129 * Do not use this function anymore. Use CreateToolbarEx instead.
1130 */
1131
1134 HINSTANCE hBMInst, UINT wBMID,
1135 LPCTBBUTTON lpButtons,INT iNumButtons)
1136{
1137 return CreateToolbarEx (hwnd, style | CCS_NODIVIDER, wID, nBitmaps,
1138 hBMInst, wBMID, lpButtons,
1139 iNumButtons, 0, 0, 0, 0, CCSIZEOF_STRUCT(TBBUTTON, dwData));
1140}
1141
1142
1143/***********************************************************************
1144 * DllGetVersion [COMCTL32.@]
1145 *
1146 * Retrieves version information of the 'COMCTL32.DLL'
1147 *
1148 * PARAMS
1149 * pdvi [O] pointer to version information structure.
1150 *
1151 * RETURNS
1152 * Success: S_OK
1153 * Failure: E_INVALIDARG
1154 *
1155 * NOTES
1156 * Returns version of a comctl32.dll from IE4.01 SP1.
1157 */
1158
1160{
1161 if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
1162 WARN("wrong DLLVERSIONINFO size from app\n");
1163 return E_INVALIDARG;
1164 }
1165
1168 pdvi->dwBuildNumber = 2919;
1169 pdvi->dwPlatformID = 6304;
1170
1171 TRACE("%u.%u.%u.%u\n",
1172 pdvi->dwMajorVersion, pdvi->dwMinorVersion,
1173 pdvi->dwBuildNumber, pdvi->dwPlatformID);
1174
1175 return S_OK;
1176}
1177
1178/***********************************************************************
1179 * DllInstall (COMCTL32.@)
1180 *
1181 * Installs the ComCtl32 DLL.
1182 *
1183 * RETURNS
1184 * Success: S_OK
1185 * Failure: A HRESULT error
1186 */
1188{
1189 TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
1190 return S_OK;
1191}
1192
1193/***********************************************************************
1194 * _TrackMouseEvent [COMCTL32.@]
1195 *
1196 * Requests notification of mouse events
1197 *
1198 * During mouse tracking WM_MOUSEHOVER or WM_MOUSELEAVE events are posted
1199 * to the hwnd specified in the ptme structure. After the event message
1200 * is posted to the hwnd, the entry in the queue is removed.
1201 *
1202 * If the current hwnd isn't ptme->hwndTrack the TME_HOVER flag is completely
1203 * ignored. The TME_LEAVE flag results in a WM_MOUSELEAVE message being posted
1204 * immediately and the TME_LEAVE flag being ignored.
1205 *
1206 * PARAMS
1207 * ptme [I,O] pointer to TRACKMOUSEEVENT information structure.
1208 *
1209 * RETURNS
1210 * Success: non-zero
1211 * Failure: zero
1212 *
1213 * IMPLEMENTATION moved to USER32.TrackMouseEvent
1214 *
1215 */
1216
1219{
1220 return TrackMouseEvent (ptme);
1221}
1222
1223/*************************************************************************
1224 * GetMUILanguage [COMCTL32.@]
1225 *
1226 * Returns the user interface language in use by the current process.
1227 *
1228 * RETURNS
1229 * Language ID in use by the current process.
1230 */
1232{
1233 return COMCTL32_uiLang;
1234}
1235
1236
1237/*************************************************************************
1238 * InitMUILanguage [COMCTL32.@]
1239 *
1240 * Sets the user interface language to be used by the current process.
1241 *
1242 * RETURNS
1243 * Nothing.
1244 */
1246{
1247 COMCTL32_uiLang = uiLang;
1248}
1249
1250
1251/***********************************************************************
1252 * SetWindowSubclass [COMCTL32.410]
1253 *
1254 * Starts a window subclass
1255 *
1256 * PARAMS
1257 * hWnd [in] handle to window subclass.
1258 * pfnSubclass [in] Pointer to new window procedure.
1259 * uIDSubclass [in] Unique identifier of subclass together with pfnSubclass.
1260 * dwRef [in] Reference data to pass to window procedure.
1261 *
1262 * RETURNS
1263 * Success: non-zero
1264 * Failure: zero
1265 *
1266 * BUGS
1267 * If an application manually subclasses a window after subclassing it with
1268 * this API and then with this API again, then none of the previous
1269 * subclasses get called or the original window procedure.
1270 */
1271
1273 UINT_PTR uIDSubclass, DWORD_PTR dwRef)
1274{
1277
1278 TRACE ("(%p, %p, %lx, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
1279
1280 if (!hWnd || !pfnSubclass)
1281 return FALSE;
1282
1283 /* Since the window procedure that we set here has two additional arguments,
1284 * we can't simply set it as the new window procedure of the window. So we
1285 * set our own window procedure and then calculate the other two arguments
1286 * from there. */
1287
1288 /* See if we have been called for this window */
1290 if (!stack) {
1291 /* allocate stack */
1292 stack = Alloc (sizeof(SUBCLASS_INFO));
1293 if (!stack) {
1294 ERR ("Failed to allocate our Subclassing stack\n");
1295 return FALSE;
1296 }
1298
1299 /* set window procedure to our own and save the current one */
1300 if (IsWindowUnicode (hWnd))
1303 else
1306 }
1307 else {
1308 /* Check to see if we have called this function with the same uIDSubClass
1309 * and pfnSubclass */
1310 proc = stack->SubclassProcs;
1311 while (proc) {
1312 if ((proc->id == uIDSubclass) &&
1313 (proc->subproc == pfnSubclass)) {
1314 proc->ref = dwRef;
1315 return TRUE;
1316 }
1317 proc = proc->next;
1318 }
1319 }
1320
1321 proc = Alloc(sizeof(SUBCLASSPROCS));
1322 if (!proc) {
1323 ERR ("Failed to allocate subclass entry in stack\n");
1324 if (IsWindowUnicode (hWnd))
1326 else
1328 Free (stack);
1330 return FALSE;
1331 }
1332
1333 proc->subproc = pfnSubclass;
1334 proc->ref = dwRef;
1335 proc->id = uIDSubclass;
1336 proc->next = stack->SubclassProcs;
1337 stack->SubclassProcs = proc;
1338
1339 return TRUE;
1340}
1341
1342
1343/***********************************************************************
1344 * GetWindowSubclass [COMCTL32.411]
1345 *
1346 * Gets the Reference data from a subclass.
1347 *
1348 * PARAMS
1349 * hWnd [in] Handle to the window which we are subclassing
1350 * pfnSubclass [in] Pointer to the subclass procedure
1351 * uID [in] Unique identifier of the subclassing procedure
1352 * pdwRef [out] Pointer to the reference data
1353 *
1354 * RETURNS
1355 * Success: Non-zero
1356 * Failure: 0
1357 */
1358
1360 UINT_PTR uID, DWORD_PTR *pdwRef)
1361{
1362 const SUBCLASS_INFO *stack;
1363 const SUBCLASSPROCS *proc;
1364
1365 TRACE ("(%p, %p, %lx, %p)\n", hWnd, pfnSubclass, uID, pdwRef);
1366
1367 /* See if we have been called for this window */
1369 if (!stack)
1370 return FALSE;
1371
1372 proc = stack->SubclassProcs;
1373 while (proc) {
1374 if ((proc->id == uID) &&
1375 (proc->subproc == pfnSubclass)) {
1376 *pdwRef = proc->ref;
1377 return TRUE;
1378 }
1379 proc = proc->next;
1380 }
1381
1382 return FALSE;
1383}
1384
1385
1386/***********************************************************************
1387 * RemoveWindowSubclass [COMCTL32.412]
1388 *
1389 * Removes a window subclass.
1390 *
1391 * PARAMS
1392 * hWnd [in] Handle to the window which we are subclassing
1393 * pfnSubclass [in] Pointer to the subclass procedure
1394 * uID [in] Unique identifier of this subclass
1395 *
1396 * RETURNS
1397 * Success: non-zero
1398 * Failure: zero
1399 */
1400
1402{
1404 LPSUBCLASSPROCS prevproc = NULL;
1406 BOOL ret = FALSE;
1407
1408 TRACE ("(%p, %p, %lx)\n", hWnd, pfnSubclass, uID);
1409
1410 /* Find the Subclass to remove */
1412 if (!stack)
1413 return FALSE;
1414
1415 proc = stack->SubclassProcs;
1416 while (proc) {
1417 if ((proc->id == uID) &&
1418 (proc->subproc == pfnSubclass)) {
1419
1420 if (!prevproc)
1421 stack->SubclassProcs = proc->next;
1422 else
1423 prevproc->next = proc->next;
1424
1425 if (stack->stackpos == proc)
1426 stack->stackpos = stack->stackpos->next;
1427
1428 Free (proc);
1429 ret = TRUE;
1430 break;
1431 }
1432 prevproc = proc;
1433 proc = proc->next;
1434 }
1435
1436 if (!stack->SubclassProcs && !stack->running) {
1437 TRACE("Last Subclass removed, cleaning up\n");
1438 /* clean up our heap and reset the original window procedure */
1439 if (IsWindowUnicode (hWnd))
1441 else
1443 Free (stack);
1445 }
1446
1447 return ret;
1448}
1449
1450/***********************************************************************
1451 * COMCTL32_SubclassProc (internal)
1452 *
1453 * Window procedure for all subclassed windows.
1454 * Saves the current subclassing stack position to support nested messages
1455 */
1457{
1460 LRESULT ret;
1461
1462 TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
1463
1465 if (!stack) {
1466 ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
1467 return 0;
1468 }
1469
1470 /* Save our old stackpos to properly handle nested messages */
1471 proc = stack->stackpos;
1472 stack->stackpos = stack->SubclassProcs;
1473 stack->running++;
1475 stack->running--;
1476 stack->stackpos = proc;
1477
1478 if (!stack->SubclassProcs && !stack->running) {
1479 TRACE("Last Subclass removed, cleaning up\n");
1480 /* clean up our heap and reset the original window procedure */
1481 if (IsWindowUnicode (hWnd))
1483 else
1485 Free (stack);
1487 }
1488 return ret;
1489}
1490
1491/***********************************************************************
1492 * DefSubclassProc [COMCTL32.413]
1493 *
1494 * Calls the next window procedure (i.e. the one before this subclass)
1495 *
1496 * PARAMS
1497 * hWnd [in] The window that we're subclassing
1498 * uMsg [in] Message
1499 * wParam [in] WPARAM
1500 * lParam [in] LPARAM
1501 *
1502 * RETURNS
1503 * Success: non-zero
1504 * Failure: zero
1505 */
1506
1508{
1510 LRESULT ret;
1511
1512 TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
1513
1514 /* retrieve our little stack from the Properties */
1516 if (!stack) {
1517 ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
1518 return 0;
1519 }
1520
1521 /* If we are at the end of stack then we have to call the original
1522 * window procedure */
1523 if (!stack->stackpos) {
1524 if (IsWindowUnicode (hWnd))
1525 ret = CallWindowProcW (stack->origproc, hWnd, uMsg, wParam, lParam);
1526 else
1527 ret = CallWindowProcA (stack->origproc, hWnd, uMsg, wParam, lParam);
1528 } else {
1529 const SUBCLASSPROCS *proc = stack->stackpos;
1530 stack->stackpos = stack->stackpos->next;
1531 /* call the Subclass procedure from the stack */
1532 ret = proc->subproc (hWnd, uMsg, wParam, lParam,
1533 proc->id, proc->ref);
1534 }
1535
1536 return ret;
1537}
1538
1539
1540/***********************************************************************
1541 * COMCTL32_CreateToolTip [NOT AN API]
1542 *
1543 * Creates a tooltip for the control specified in hwnd and does all
1544 * necessary setup and notifications.
1545 *
1546 * PARAMS
1547 * hwndOwner [I] Handle to the window that will own the tool tip.
1548 *
1549 * RETURNS
1550 * Success: Handle of tool tip window.
1551 * Failure: NULL
1552 */
1553
1554HWND
1556{
1557 HWND hwndToolTip;
1558
1559 hwndToolTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP,
1561 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner,
1562 0, 0, 0);
1563
1564 /* Send NM_TOOLTIPSCREATED notification */
1565 if (hwndToolTip)
1566 {
1567 NMTOOLTIPSCREATED nmttc;
1568 /* true owner can be different if hwndOwner is a child window */
1569 HWND hwndTrueOwner = GetWindow(hwndToolTip, GW_OWNER);
1570 nmttc.hdr.hwndFrom = hwndTrueOwner;
1571 nmttc.hdr.idFrom = GetWindowLongPtrW(hwndTrueOwner, GWLP_ID);
1572 nmttc.hdr.code = NM_TOOLTIPSCREATED;
1573 nmttc.hwndToolTips = hwndToolTip;
1574
1575 SendMessageW(GetParent(hwndTrueOwner), WM_NOTIFY,
1576 GetWindowLongPtrW(hwndTrueOwner, GWLP_ID), (LPARAM)&nmttc);
1577 }
1578
1579 return hwndToolTip;
1580}
1581
1582
1583/***********************************************************************
1584 * COMCTL32_RefreshSysColors [NOT AN API]
1585 *
1586 * Invoked on any control recognizing a WM_SYSCOLORCHANGE message to
1587 * refresh the color values in the color structure
1588 *
1589 * PARAMS
1590 * none
1591 *
1592 * RETURNS
1593 * none
1594 */
1595
1596VOID
1598{
1616}
1617
1618/***********************************************************************
1619 * COMCTL32_DrawInsertMark [NOT AN API]
1620 *
1621 * Draws an insertion mark (which looks similar to an 'I').
1622 *
1623 * PARAMS
1624 * hDC [I] Device context to draw onto.
1625 * lpRect [I] Co-ordinates of insertion mark.
1626 * clrInsertMark [I] Colour of the insertion mark.
1627 * bHorizontal [I] True if insert mark should be drawn horizontally,
1628 * vertical otherwise.
1629 *
1630 * RETURNS
1631 * none
1632 *
1633 * NOTES
1634 * Draws up to but not including the bottom co-ordinate when drawing
1635 * vertically or the right co-ordinate when horizontal.
1636 */
1637void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal)
1638{
1639 HPEN hPen = CreatePen(PS_SOLID, 1, clrInsertMark);
1640 HPEN hOldPen;
1641 static const DWORD adwPolyPoints[] = {4,4,4};
1642 LONG lCentre = (bHorizontal ?
1643 lpRect->top + (lpRect->bottom - lpRect->top)/2 :
1644 lpRect->left + (lpRect->right - lpRect->left)/2);
1645 LONG l1 = (bHorizontal ? lpRect->left : lpRect->top);
1646 LONG l2 = (bHorizontal ? lpRect->right : lpRect->bottom);
1647 const POINT aptInsertMark[] =
1648 {
1649 /* top (V) or left (H) arrow */
1650 {lCentre , l1 + 2},
1651 {lCentre - 2, l1 },
1652 {lCentre + 3, l1 },
1653 {lCentre + 1, l1 + 2},
1654 /* middle line */
1655 {lCentre , l2 - 2},
1656 {lCentre , l1 - 1},
1657 {lCentre + 1, l1 - 1},
1658 {lCentre + 1, l2 - 2},
1659 /* bottom (V) or right (H) arrow */
1660 {lCentre , l2 - 3},
1661 {lCentre - 2, l2 - 1},
1662 {lCentre + 3, l2 - 1},
1663 {lCentre + 1, l2 - 3},
1664 };
1665 hOldPen = SelectObject(hDC, hPen);
1666 PolyPolyline(hDC, aptInsertMark, adwPolyPoints, ARRAY_SIZE(adwPolyPoints));
1667 SelectObject(hDC, hOldPen);
1668 DeleteObject(hPen);
1669}
1670
1671/***********************************************************************
1672 * COMCTL32_EnsureBitmapSize [internal]
1673 *
1674 * If needed, enlarge the bitmap so that the width is at least cxMinWidth and
1675 * the height is at least cyMinHeight. If the bitmap already has these
1676 * dimensions nothing changes.
1677 *
1678 * PARAMS
1679 * hBitmap [I/O] Bitmap to modify. The handle may change
1680 * cxMinWidth [I] If the width of the bitmap is smaller, then it will
1681 * be enlarged to this value
1682 * cyMinHeight [I] If the height of the bitmap is smaller, then it will
1683 * be enlarged to this value
1684 * cyBackground [I] The color with which the new area will be filled
1685 *
1686 * RETURNS
1687 * none
1688 */
1689void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground)
1690{
1691 int cxNew, cyNew;
1692 BITMAP bmp;
1693 HBITMAP hNewBitmap;
1694 HBITMAP hNewDCBitmap, hOldDCBitmap;
1695 HBRUSH hNewDCBrush;
1696 HDC hdcNew, hdcOld;
1697
1698 if (!GetObjectW(*pBitmap, sizeof(BITMAP), &bmp))
1699 return;
1700 cxNew = (cxMinWidth > bmp.bmWidth ? cxMinWidth : bmp.bmWidth);
1701 cyNew = (cyMinHeight > bmp.bmHeight ? cyMinHeight : bmp.bmHeight);
1702 if (cxNew == bmp.bmWidth && cyNew == bmp.bmHeight)
1703 return;
1704
1705 hdcNew = CreateCompatibleDC(NULL);
1706 hNewBitmap = CreateBitmap(cxNew, cyNew, bmp.bmPlanes, bmp.bmBitsPixel, NULL);
1707 hNewDCBitmap = SelectObject(hdcNew, hNewBitmap);
1708 hNewDCBrush = SelectObject(hdcNew, CreateSolidBrush(crBackground));
1709
1710 hdcOld = CreateCompatibleDC(NULL);
1711 hOldDCBitmap = SelectObject(hdcOld, *pBitmap);
1712
1713 BitBlt(hdcNew, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcOld, 0, 0, SRCCOPY);
1714 if (bmp.bmWidth < cxMinWidth)
1715 PatBlt(hdcNew, bmp.bmWidth, 0, cxNew, bmp.bmHeight, PATCOPY);
1716 if (bmp.bmHeight < cyMinHeight)
1717 PatBlt(hdcNew, 0, bmp.bmHeight, bmp.bmWidth, cyNew, PATCOPY);
1718 if (bmp.bmWidth < cxMinWidth && bmp.bmHeight < cyMinHeight)
1719 PatBlt(hdcNew, bmp.bmWidth, bmp.bmHeight, cxNew, cyNew, PATCOPY);
1720
1721 SelectObject(hdcNew, hNewDCBitmap);
1722 DeleteObject(SelectObject(hdcNew, hNewDCBrush));
1723 DeleteDC(hdcNew);
1724 SelectObject(hdcOld, hOldDCBitmap);
1725 DeleteDC(hdcOld);
1726
1727 DeleteObject(*pBitmap);
1728 *pBitmap = hNewBitmap;
1729 return;
1730}
1731
1733{
1734 HDC hdc = GetDC(NULL);
1735 HFONT hOldFont;
1736
1737 hOldFont = SelectObject(hdc, hFont);
1738 GetTextMetricsW(hdc, ptm);
1739 SelectObject(hdc, hOldFont);
1740 ReleaseDC(NULL, hdc);
1741}
1742
1743#ifndef OCM__BASE /* avoid including olectl.h */
1744#define OCM__BASE (WM_USER+0x1c00)
1745#endif
1746
1747/***********************************************************************
1748 * COMCTL32_IsReflectedMessage [internal]
1749 *
1750 * Some parents reflect notify messages - for some messages sent by the child,
1751 * they send it back with the message code increased by OCM__BASE (0x2000).
1752 * This allows better subclassing of controls. We don't need to handle such
1753 * messages but we don't want to print ERRs for them, so this helper function
1754 * identifies them.
1755 *
1756 * Some of the codes are in the CCM_FIRST..CCM_LAST range, but there is no
1757 * collision with defined CCM_ codes.
1758 */
1760{
1761 switch (uMsg)
1762 {
1763 case OCM__BASE + WM_COMMAND:
1771 case OCM__BASE + WM_DRAWITEM:
1773 case OCM__BASE + WM_DELETEITEM:
1774 case OCM__BASE + WM_VKEYTOITEM:
1775 case OCM__BASE + WM_CHARTOITEM:
1777 case OCM__BASE + WM_HSCROLL:
1778 case OCM__BASE + WM_VSCROLL:
1780 case OCM__BASE + WM_NOTIFY:
1781 return TRUE;
1782 default:
1783 return FALSE;
1784 }
1785}
1786
1787/***********************************************************************
1788 * MirrorIcon [COMCTL32.414]
1789 *
1790 * Mirrors an icon so that it will appear correctly on a mirrored DC.
1791 *
1792 * PARAMS
1793 * phicon1 [I/O] Icon.
1794 * phicon2 [I/O] Icon.
1795 *
1796 * RETURNS
1797 * Success: TRUE.
1798 * Failure: FALSE.
1799 */
1800BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2)
1801{
1802 FIXME("(%p, %p): stub\n", phicon1, phicon2);
1803 return FALSE;
1804}
1805
1806static inline BOOL IsDelimiter(WCHAR c)
1807{
1808 switch(c)
1809 {
1810 case '/':
1811 case '\\':
1812 case '.':
1813 case ' ':
1814 return TRUE;
1815 }
1816 return FALSE;
1817}
1818
1819static int CALLBACK PathWordBreakProc(LPCWSTR lpch, int ichCurrent, int cch, int code)
1820{
1821 if (code == WB_ISDELIMITER)
1822 return IsDelimiter(lpch[ichCurrent]);
1823 else
1824 {
1825 int dir = (code == WB_LEFT) ? -1 : 1;
1826 for(; 0 <= ichCurrent && ichCurrent < cch; ichCurrent += dir)
1827 if (IsDelimiter(lpch[ichCurrent])) return ichCurrent;
1828 }
1829 return ichCurrent;
1830}
1831
1832/***********************************************************************
1833 * SetPathWordBreakProc [COMCTL32.384]
1834 *
1835 * Sets the word break procedure for an edit control to one that understands
1836 * paths so that the user can jump over directories.
1837 *
1838 * PARAMS
1839 * hwnd [I] Handle to edit control.
1840 * bSet [I] If this is TRUE then the word break proc is set, otherwise it is removed.
1841 *
1842 * RETURNS
1843 * Result from EM_SETWORDBREAKPROC message.
1844 */
1846{
1848 (LPARAM)(bSet ? PathWordBreakProc : NULL));
1849}
1850
1851/***********************************************************************
1852 * DrawShadowText [COMCTL32.@]
1853 *
1854 * Draw text with shadow.
1855 */
1857 COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
1858{
1859 COLORREF crOldText;
1860 RECT rcText;
1861 INT iRet, x, y, x2, y2;
1862 BYTE *pBits;
1863 HBITMAP hbm, hbmOld;
1864 BITMAPINFO bi;
1865 HDC hdcMem;
1866 HFONT hOldFont;
1867 BLENDFUNCTION bf;
1868
1869 /* Create 32 bit DIB section for the shadow */
1870 ZeroMemory(&bi, sizeof(bi));
1871 bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
1872 bi.bmiHeader.biWidth = prc->right - prc->left + 4;
1873 bi.bmiHeader.biHeight = prc->bottom - prc->top + 5; // bottom-up DIB
1874 bi.bmiHeader.biPlanes = 1;
1875 bi.bmiHeader.biBitCount = 32;
1877 hbm = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, (PVOID*)&pBits, NULL, 0);
1878 if(!hbm)
1879 {
1880 ERR("CreateDIBSection failed\n");
1881 return 0;
1882 }
1883
1884 /* Create memory device context for new DIB section and select it */
1886 if(!hdcMem)
1887 {
1888 ERR("CreateCompatibleDC failed\n");
1890 return 0;
1891 }
1892
1893 hbmOld = (HBITMAP)SelectObject(hdcMem, hbm);
1894
1895 /* Draw text on our helper bitmap */
1897 SetTextColor(hdcMem, RGB(16, 16, 16));
1898 SetBkColor(hdcMem, RGB(0, 0, 0));
1900 SetRect(&rcText, 0, 0, prc->right - prc->left, prc->bottom - prc->top);
1901 DrawTextW(hdcMem, pszText, cch, &rcText, dwFlags);
1902 SelectObject(hdcMem, hOldFont);
1903
1904 /* Flush GDI so data pointed by pBits is valid */
1905 GdiFlush();
1906
1907 /* Set alpha of pixels (forget about colors for now. They will be changed in next loop).
1908 We copy text image 4*5 times and each time alpha is added */
1909 for (x = 0; x < bi.bmiHeader.biWidth; ++x)
1910 for (y = 0; y < bi.bmiHeader.biHeight; ++y)
1911 {
1912 BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4];
1913 UINT Alpha = 0;
1914
1915 for (x2 = x - 4 + 1; x2 <= x; ++x2)
1916 for (y2 = y; y2 < y + 5; ++y2)
1917 {
1918 if (x2 >= 0 && x2 < bi.bmiHeader.biWidth && y2 >= 0 && y2 < bi.bmiHeader.biHeight)
1919 {
1920 BYTE *pSrc = &pBits[(y2 * bi.bmiHeader.biWidth + x2) * 4];
1921 Alpha += pSrc[0];
1922 }
1923 }
1924
1925 if (Alpha > 255)
1926 Alpha = 255;
1927 pDest[3] = Alpha;
1928 }
1929
1930 /* Now set the color of each pixel to shadow color * alpha (see GdiAlphaBlend) */
1931 for (x = 0; x < bi.bmiHeader.biWidth; ++x)
1932 for (y = 0; y < bi.bmiHeader.biHeight; ++y)
1933 {
1934 BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4];
1935 pDest[0] = GetBValue(crShadow) * pDest[3] / 255;
1936 pDest[1] = GetGValue(crShadow) * pDest[3] / 255;
1937 pDest[2] = GetRValue(crShadow) * pDest[3] / 255;
1938 }
1939
1940 /* Fix ixOffset of the shadow (tested on Win) */
1941 ixOffset -= 3;
1942 iyOffset -= 3;
1943
1944 /* Alpha blend helper image to destination DC */
1945 bf.BlendOp = AC_SRC_OVER;
1946 bf.BlendFlags = 0;
1947 bf.SourceConstantAlpha = 255;
1949 GdiAlphaBlend(hdc, prc->left + ixOffset, prc->top + iyOffset, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, hdcMem, 0, 0, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, bf);
1950
1951 /* Delete the helper bitmap */
1952 SelectObject(hdcMem, hbmOld);
1955
1956 /* Finally draw the text over shadow */
1957 crOldText = SetTextColor(hdc, crText);
1959 iRet = DrawTextW(hdc, pszText, cch, prc, dwFlags);
1960 SetTextColor(hdc, crOldText);
1961
1962 return iRet;
1963}
1964
1965/***********************************************************************
1966 * LoadIconWithScaleDown [COMCTL32.@]
1967 */
1969{
1970 TRACE("(%p, %s, %d, %d, %p)\n", hinst, debugstr_w(name), cx, cy, icon);
1971
1972 *icon = NULL;
1973
1974 if (!name)
1975 return E_INVALIDARG;
1976
1977 *icon = LoadImageW(hinst, name, IMAGE_ICON, cx, cy,
1979 if (!*icon)
1981
1982 return S_OK;
1983}
1984
1985/***********************************************************************
1986 * LoadIconMetric [COMCTL32.@]
1987 */
1989{
1990 int cx, cy;
1991
1992 TRACE("(%p, %s, %d, %p)\n", hinst, debugstr_w(name), size, icon);
1993
1994 if (size == LIM_SMALL)
1995 {
1998 }
1999 else if (size == LIM_LARGE)
2000 {
2003 }
2004 else
2005 {
2006 *icon = NULL;
2007 return E_INVALIDARG;
2008 }
2009
2010 return LoadIconWithScaleDown(hinst, name, cx, cy, icon);
2011}
static HDC hDC
Definition: 3dtext.c:33
unsigned char BOOLEAN
Arabic default style
Definition: afstyles.h:94
static DWORD const fdwReason
unsigned int dir
Definition: maze.c:112
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
HFONT hFont
Definition: main.c:53
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
HINSTANCE hInstance
Definition: charmap.c:19
void COMBOEX_Unregister(void)
Definition: comboex.c:2185
void COMBOEX_Register(void)
Definition: comboex.c:2168
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
void REBAR_Register(void) DECLSPEC_HIDDEN
Definition: rebar.c:3837
void TOOLTIPS_Unregister(void) DECLSPEC_HIDDEN
Definition: tooltips.c:2401
void EDIT_Register(void) DECLSPEC_HIDDEN
Definition: edit.c:5289
void PAGER_Register(void) DECLSPEC_HIDDEN
Definition: pager.c:1563
void HOTKEY_Unregister(void) DECLSPEC_HIDDEN
Definition: hotkey.c:559
void HEADER_Register(void) DECLSPEC_HIDDEN
Definition: header.c:2287
void IPADDRESS_Register(void) DECLSPEC_HIDDEN
Definition: ipaddress.c:662
void STATUS_Unregister(void) DECLSPEC_HIDDEN
Definition: status.c:1360
void FLATSB_Register(void) DECLSPEC_HIDDEN
Definition: flatsb.c:267
void TREEVIEW_Unregister(void) DECLSPEC_HIDDEN
Definition: treeview.c:5961
void SYSLINK_Register(void) DECLSPEC_HIDDEN
Definition: syslink.c:1749
void PROGRESS_Register(void) DECLSPEC_HIDDEN
Definition: progress.c:748
void STATIC_Register(void) DECLSPEC_HIDDEN
Definition: static.c:803
void THEMING_Uninitialize(void) DECLSPEC_HIDDEN
Definition: theming.c:191
void SYSLINK_Unregister(void) DECLSPEC_HIDDEN
Definition: syslink.c:1770
void TOOLBAR_Unregister(void) DECLSPEC_HIDDEN
Definition: toolbar.c:7299
void REBAR_Unregister(void) DECLSPEC_HIDDEN
Definition: rebar.c:3862
void TAB_Register(void) DECLSPEC_HIDDEN
Definition: tab.c:3480
void LISTBOX_Register(void) DECLSPEC_HIDDEN
Definition: listbox.c:3163
void MONTHCAL_Register(void) DECLSPEC_HIDDEN
Definition: monthcal.c:3034
void HOTKEY_Register(void) DECLSPEC_HIDDEN
Definition: hotkey.c:541
void TOOLTIPS_Register(void) DECLSPEC_HIDDEN
Definition: tooltips.c:2375
void STATUS_Register(void) DECLSPEC_HIDDEN
Definition: status.c:1336
void UPDOWN_Register(void) DECLSPEC_HIDDEN
Definition: updown.c:1177
void HEADER_Unregister(void) DECLSPEC_HIDDEN
Definition: header.c:2304
void PROGRESS_Unregister(void) DECLSPEC_HIDDEN
Definition: progress.c:769
void UPDOWN_Unregister(void) DECLSPEC_HIDDEN
Definition: updown.c:1199
void THEMING_Initialize(void) DECLSPEC_HIDDEN
Definition: theming.c:108
void TRACKBAR_Register(void) DECLSPEC_HIDDEN
Definition: trackbar.c:2068
void FLATSB_Unregister(void) DECLSPEC_HIDDEN
Definition: flatsb.c:285
void DATETIME_Unregister(void) DECLSPEC_HIDDEN
Definition: datetime.c:1737
void IPADDRESS_Unregister(void) DECLSPEC_HIDDEN
Definition: ipaddress.c:679
#define COMCTL32_VERSION_MINOR
Definition: comctl32.h:205
void DATETIME_Register(void) DECLSPEC_HIDDEN
Definition: datetime.c:1719
void TOOLBAR_Register(void) DECLSPEC_HIDDEN
Definition: toolbar.c:7281
void MONTHCAL_Unregister(void) DECLSPEC_HIDDEN
Definition: monthcal.c:3052
void COMBOLBOX_Register(void) DECLSPEC_HIDDEN
Definition: listbox.c:3178
void LISTVIEW_Unregister(void) DECLSPEC_HIDDEN
Definition: listview.c:12084
void PAGER_Unregister(void) DECLSPEC_HIDDEN
Definition: pager.c:1581
void NATIVEFONT_Unregister(void) DECLSPEC_HIDDEN
Definition: nativefont.c:131
void NATIVEFONT_Register(void) DECLSPEC_HIDDEN
Definition: nativefont.c:113
void LISTVIEW_Register(void) DECLSPEC_HIDDEN
Definition: listview.c:12059
void TREEVIEW_Register(void) DECLSPEC_HIDDEN
Definition: treeview.c:5940
void TAB_Unregister(void) DECLSPEC_HIDDEN
Definition: tab.c:3498
void TRACKBAR_Unregister(void) DECLSPEC_HIDDEN
Definition: trackbar.c:2085
static const WORD wPattern55AA[]
Definition: commctrl.c:86
HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE hinst, const WCHAR *name, int cx, int cy, HICON *icon)
Definition: commctrl.c:1968
VOID WINAPI GetEffectiveClientRect(HWND hwnd, LPRECT lpRect, const INT *lpInfo)
Definition: commctrl.c:629
#define VERSION
COMCTL32_SysColor comctl32_color
Definition: commctrl.c:82
static LANGID COMCTL32_uiLang
Definition: commctrl.c:80
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:904
HWND COMCTL32_CreateToolTip(HWND hwndOwner)
Definition: commctrl.c:1555
BOOL WINAPI _TrackMouseEvent(TRACKMOUSEEVENT *ptme)
Definition: commctrl.c:1218
BOOL WINAPI ShowHideMenuCtl(HWND hwnd, UINT_PTR uFlags, LPINT lpInfo)
Definition: commctrl.c:567
BOOL WINAPI GetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID, DWORD_PTR *pdwRef)
Definition: commctrl.c:1359
HRESULT WINAPI LoadIconMetric(HINSTANCE hinst, const WCHAR *name, int size, HICON *icon)
Definition: commctrl.c:1988
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
Definition: commctrl.c:341
HMODULE COMCTL32_hModule
Definition: commctrl.c:79
void WINAPI DrawStatusTextA(HDC hdc, LPCRECT lprc, LPCSTR text, UINT style)
Definition: commctrl.c:746
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:874
void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal)
Definition: commctrl.c:1637
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
Definition: commctrl.c:1272
VOID WINAPI MenuHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu, HINSTANCE hInst, HWND hwndStatus, UINT *lpwIDs)
Definition: commctrl.c:480
static LPWSTR COMCTL32_wSubclass
Definition: commctrl.c:78
HWND WINAPI CreateStatusWindowW(LONG style, LPCWSTR text, HWND parent, UINT wid)
Definition: commctrl.c:806
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
Definition: commctrl.c:1187
void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground)
Definition: commctrl.c:1689
LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet)
Definition: commctrl.c:1845
HBITMAP WINAPI CreateMappedBitmap(HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags, LPCOLORMAP lpColorMap, INT iNumMaps)
Definition: commctrl.c:1009
void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm)
Definition: commctrl.c:1732
static BOOL IsDelimiter(WCHAR c)
Definition: commctrl.c:1806
int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
Definition: commctrl.c:1856
VOID WINAPI InitMUILanguage(LANGID uiLang)
Definition: commctrl.c:1245
BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID)
Definition: commctrl.c:1401
static HBITMAP COMCTL32_hPattern55AABitmap
Definition: commctrl.c:84
HWND WINAPI CreateUpDownControl(DWORD style, INT x, INT y, INT cx, INT cy, HWND parent, INT id, HINSTANCE inst, HWND buddy, INT maxVal, INT minVal, INT curVal)
Definition: commctrl.c:840
HWND WINAPI CreateToolbar(HWND hwnd, DWORD style, UINT wID, INT nBitmaps, HINSTANCE hBMInst, UINT wBMID, LPCTBBUTTON lpButtons, INT iNumButtons)
Definition: commctrl.c:1133
BOOL COMCTL32_IsReflectedMessage(UINT uMsg)
Definition: commctrl.c:1759
VOID COMCTL32_RefreshSysColors(void)
Definition: commctrl.c:1597
HWND WINAPI CreateToolbarEx(HWND hwnd, DWORD style, UINT wID, INT nBitmaps, HINSTANCE hBMInst, UINT_PTR wBMID, LPCTBBUTTON lpButtons, INT iNumButtons, INT dxButton, INT dyButton, INT dxBitmap, INT dyBitmap, UINT uStructSize)
Definition: commctrl.c:940
static LRESULT WINAPI COMCTL32_SubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: commctrl.c:1456
void WINAPI DrawStatusTextW(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style)
Definition: commctrl.c:677
HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *pdvi)
Definition: commctrl.c:1159
static int CALLBACK PathWordBreakProc(LPCWSTR lpch, int ichCurrent, int cch, int code)
Definition: commctrl.c:1819
#define OCM__BASE
Definition: commctrl.c:1744
HWND WINAPI CreateStatusWindowA(LONG style, LPCSTR text, HWND parent, UINT wid)
Definition: commctrl.c:780
static const WCHAR strCC32SubclassInfo[]
Definition: commctrl.c:92
static void unregister_versioned_classes(void)
Definition: commctrl.c:305
HBRUSH COMCTL32_hPattern55AABrush
Definition: commctrl.c:81
LRESULT WINAPI DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: commctrl.c:1507
BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2)
Definition: commctrl.c:1800
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
UINT uFlags
Definition: api.c:59
void ANIMATE_Register(void)
Definition: animate.c:965
void ANIMATE_Unregister(void)
Definition: animate.c:982
void BUTTON_Register(void)
Definition: button.c:2223
void COMBO_Register(void)
Definition: combo.c:2120
#define COMCTL32_VERSION
Definition: resource.h:72
#define GetProcessHeap()
Definition: compat.h:736
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define CP_ACP
Definition: compat.h:109
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define MultiByteToWideChar
Definition: compat.h:110
@ NAME
Definition: inflate.c:164
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
Definition: actctx.c:268
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
Definition: actctx.c:237
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:454
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx)
Definition: actctx.c:102
BOOL WINAPI FreeResource(HGLOBAL handle)
Definition: res.c:559
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
const WCHAR * text
Definition: package.c:1794
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
Definition: common.c:57
#define BI_RGB
Definition: precomp.h:56
#define RGB(r, g, b)
Definition: precomp.h:71
#define GetBValue(quad)
Definition: precomp.h:75
#define GetGValue(quad)
Definition: precomp.h:74
ULONG RGBQUAD
Definition: precomp.h:59
#define GetRValue(quad)
Definition: precomp.h:73
r parent
Definition: btrfs.c:3010
int align(int length, int align)
Definition: dsound8.c:36
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
pKey DeleteObject()
GLint GLint GLsizei GLsizei GLsizei GLint border
Definition: gl.h:1546
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLsizeiptr size
Definition: glext.h:5919
const GLubyte * c
Definition: glext.h:8905
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_w
Definition: kernel32.h:32
_In_ PCWSTR _Out_ PVOID * ActCtx
Definition: ldrtypes.h:264
USHORT LANGID
Definition: mui.h:9
static IN DWORD IN LPVOID lpvReserved
#define BI_BITFIELDS
Definition: mmreg.h:507
BITMAP bmp
Definition: alphablend.c:62
BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, BLENDFUNCTION blendFunction)
#define AC_SRC_ALPHA
Definition: alphablend.c:9
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HINSTANCE hinst
Definition: edit.c:551
static HDC
Definition: imagelist.c:88
static HICON
Definition: imagelist.c:80
static const WCHAR textW[]
Definition: itemdlg.c:1559
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:202
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
HRESULT hres
Definition: protocol.c:465
static HANDLE ULONG_PTR dwData
Definition: file.c:35
static const struct access_res create[16]
Definition: package.c:7505
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
HMENU hMainMenu
Definition: mplay32.c:25
static UINT activated
Definition: msctf.c:70
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
_Out_ LPRECT prc
Definition: ntgdi.h:1658
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
#define L(x)
Definition: ntvdm.h:50
#define OBJ_FONT
Definition: objidl.idl:1414
static HANDLE proc()
Definition: pdb.c:34
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define RT_BITMAP
Definition: pedump.c:364
#define WS_POPUP
Definition: pedump.c:616
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define UPDOWN_CLASSW
Definition: commctrl.h:2124
LANGID WINAPI GetMUILanguage(void)
Definition: commctrl.c:1231
@ LIM_LARGE
Definition: commctrl.h:5254
@ LIM_SMALL
Definition: commctrl.h:5253
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
#define SB_SIMPLE
Definition: commctrl.h:1963
#define SBT_NOBORDERS
Definition: commctrl.h:1976
#define SBT_POPOUT
Definition: commctrl.h:1977
#define UDM_SETPOS
Definition: commctrl.h:2148
#define HINST_COMMCTRL
Definition: commctrl.h:1063
#define WC_COMBOBOXA
Definition: commctrl.h:4721
LRESULT(CALLBACK * SUBCLASSPROC)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
Definition: commctrl.h:5054
#define WC_STATICA
Definition: commctrl.h:4684
#define WC_EDITA
Definition: commctrl.h:4691
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1134
#define TOOLTIPS_CLASSW
Definition: commctrl.h:1707
#define WC_LISTBOXA
Definition: commctrl.h:4715
_Out_opt_ int * cx
Definition: commctrl.h:585
#define STATUSCLASSNAMEW
Definition: commctrl.h:1941
#define UDM_SETRANGE
Definition: commctrl.h:2146
#define NM_TOOLTIPSCREATED
Definition: commctrl.h:144
#define WC_BUTTONA
Definition: commctrl.h:4627
_In_ SUBCLASSPROC pfnSubclass
Definition: commctrl.h:5061
#define STATUSCLASSNAMEA
Definition: commctrl.h:1942
#define CCS_NODIVIDER
Definition: commctrl.h:2253
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
#define CCSIZEOF_STRUCT(structname, member)
Definition: commctrl.h:153
#define SBT_RTLREADING
Definition: commctrl.h:1978
#define TB_SETBITMAPSIZE
Definition: commctrl.h:1136
#define UDM_SETBUDDY
Definition: commctrl.h:2150
#define SB_SETTEXTW
Definition: commctrl.h:1947
#define TB_ADDBUTTONSW
Definition: commctrl.h:1266
#define TB_ADDBITMAP
Definition: commctrl.h:1056
#define WM_NOTIFY
Definition: richedit.h:61
#define LANG_NEUTRAL
Definition: nls.h:22
#define MAKELANGID(p, s)
Definition: nls.h:15
#define SUBLANG_NEUTRAL
Definition: nls.h:167
#define TRACE(s)
Definition: solgame.cpp:4
HWND hwndStatus
Definition: solitaire.cpp:14
CardRegion * from
Definition: spigame.cpp:19
TCHAR * cmdline
Definition: stretchblt.cpp:32
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
DWORD biCompression
Definition: amvideo.idl:35
COLORREF clrHighlightText
Definition: comctl32.h:176
COLORREF clrBtnShadow
Definition: comctl32.h:172
COLORREF clrBtnText
Definition: comctl32.h:173
COLORREF clrBtnFace
Definition: comctl32.h:174
COLORREF clrInfoText
Definition: comctl32.h:187
COLORREF clrWindow
Definition: comctl32.h:182
COLORREF clr3dFace
Definition: comctl32.h:181
COLORREF clrActiveCaption
Definition: comctl32.h:185
COLORREF clrBtnHighlight
Definition: comctl32.h:171
COLORREF clr3dShadow
Definition: comctl32.h:179
COLORREF clrGrayText
Definition: comctl32.h:184
COLORREF clr3dDkShadow
Definition: comctl32.h:180
COLORREF clrInfoBk
Definition: comctl32.h:186
COLORREF clrHotTrackingColor
Definition: comctl32.h:177
COLORREF clrWindowText
Definition: comctl32.h:183
COLORREF clr3dHilight
Definition: comctl32.h:178
COLORREF clrHighlight
Definition: comctl32.h:175
Definition: bl.h:1331
BYTE BlendOp
Definition: wingdi.h:2759
BYTE BlendFlags
Definition: wingdi.h:2760
BYTE AlphaFormat
Definition: wingdi.h:2762
BYTE SourceConstantAlpha
Definition: wingdi.h:2761
COLORREF to
Definition: commctrl.h:965
DWORD dwMajorVersion
Definition: shlwapi.h:2000
DWORD dwBuildNumber
Definition: shlwapi.h:2002
DWORD dwMinorVersion
Definition: shlwapi.h:2001
DWORD dwPlatformID
Definition: shlwapi.h:2003
struct _SUBCLASSPROCS * next
Definition: comctl32.h:213
Definition: inflate.c:139
Definition: name.c:39
Definition: format.c:80
USHORT biBitCount
Definition: precomp.h:46
ULONG biCompression
Definition: precomp.h:47
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1476
UINT_PTR idFrom
Definition: winuser.h:3169
UINT code
Definition: winuser.h:3170
HWND hwndFrom
Definition: winuser.h:3168
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
UINT_PTR nID
Definition: commctrl.h:1060
HINSTANCE hInst
Definition: commctrl.h:1059
#define GWLP_WNDPROC
Definition: treelist.c:66
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
#define HIWORD(l)
Definition: typedefs.h:247
#define ARCH
Definition: v6util.h:36
int ret
HDC hdcMem
Definition: welcome.c:104
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:245
#define ZeroMemory
Definition: winbase.h:1744
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define GMEM_FIXED
Definition: winbase.h:320
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2116
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3711
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
int * LPINT
Definition: windef.h:178
DWORD COLORREF
Definition: windef.h:300
#define WINAPI
Definition: msvc.h:6
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define DIB_RGB_COLORS
Definition: wingdi.h:367
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:999
#define AC_SRC_OVER
Definition: wingdi.h:1369
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:428
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
BOOL WINAPI GdiFlush(void)
Definition: misc.c:44
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define TRANSPARENT
Definition: wingdi.h:950
#define SRCCOPY
Definition: wingdi.h:333
#define PATCOPY
Definition: wingdi.h:335
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1056
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:917
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define PS_SOLID
Definition: wingdi.h:586
BOOL WINAPI PolyPolyline(_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const DWORD *asz, _In_ DWORD csz)
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
#define GW_OWNER
Definition: winuser.h:777
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
#define SetWindowLongPtrA
Definition: winuser.h:5365
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1783
#define MF_BYCOMMAND
Definition: winuser.h:202
#define DT_NOPREFIX
Definition: winuser.h:537
#define BDR_SUNKENOUTER
Definition: winuser.h:443
#define COLOR_BTNTEXT
Definition: winuser.h:944
#define GetWindowLongPtrW
Definition: winuser.h:4840
#define COLOR_INFOBK
Definition: winuser.h:953
#define WM_HSCROLL
Definition: winuser.h:1754
#define MAKELPARAM(l, h)
Definition: winuser.h:4019
#define COLOR_GRAYTEXT
Definition: winuser.h:943
#define COLOR_WINDOW
Definition: winuser.h:929
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
#define WM_CHARTOITEM
Definition: winuser.h:1660
#define DT_CENTER
Definition: winuser.h:527
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
#define LR_LOADFROMFILE
Definition: winuser.h:1103
#define IMAGE_ICON
Definition: winuser.h:212
#define COLOR_WINDOWTEXT
Definition: winuser.h:932
#define WM_VSCROLL
Definition: winuser.h:1755
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4326
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WB_ISDELIMITER
Definition: winuser.h:549
#define COLOR_HIGHLIGHT
Definition: winuser.h:937
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define DT_SINGLELINE
Definition: winuser.h:540
#define WM_COMMAND
Definition: winuser.h:1751
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define COLOR_ACTIVECAPTION
Definition: winuser.h:926
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2540
#define COLOR_3DDKSHADOW
Definition: winuser.h:950
#define SM_CYSMICON
Definition: winuser.h:1024
#define BF_ADJUST
Definition: winuser.h:470
#define COLOR_3DSHADOW
Definition: winuser.h:942
#define MF_CHECKED
Definition: winuser.h:132
#define WM_CTLCOLORSCROLLBAR
Definition: winuser.h:1782
BOOL WINAPI TrackMouseEvent(_Inout_ LPTRACKMOUSEEVENT)
#define BF_MIDDLE
Definition: winuser.h:468
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WM_DELETEITEM
Definition: winuser.h:1658
#define MF_POPUP
Definition: winuser.h:136
#define WM_CTLCOLORMSGBOX
Definition: winuser.h:1777
#define MF_UNCHECKED
Definition: winuser.h:204
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_DRAWITEM
Definition: winuser.h:1656
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define WM_CTLCOLORBTN
Definition: winuser.h:1780
BOOL WINAPI IsWindowUnicode(_In_ HWND)
#define SM_CXSMICON
Definition: winuser.h:1023
#define DT_LEFT
Definition: winuser.h:534
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SM_CYICON
Definition: winuser.h:984
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define COLOR_INFOTEXT
Definition: winuser.h:952
#define COLOR_HOTLIGHT
Definition: winuser.h:954
#define WB_LEFT
Definition: winuser.h:550
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
#define EM_SETWORDBREAKPROC
Definition: winuser.h:2031
#define SWP_SHOWWINDOW
Definition: winuser.h:1259
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:938
#define MFS_CHECKED
Definition: winuser.h:758
HDC WINAPI GetDC(_In_opt_ HWND)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4327
#define WM_MEASUREITEM
Definition: winuser.h:1657
#define COLOR_BTNSHADOW
Definition: winuser.h:941
#define DT_VCENTER
Definition: winuser.h:543
#define CW_USEDEFAULT
Definition: winuser.h:225
HWND WINAPI GetParent(_In_ HWND)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define SWP_HIDEWINDOW
Definition: winuser.h:1252
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4477
#define COLOR_3DHILIGHT
Definition: winuser.h:948
#define GWLP_ID
Definition: winuser.h:871
#define WM_CTLCOLORLISTBOX
Definition: winuser.h:1779
#define BDR_RAISEDOUTER
Definition: winuser.h:442
#define DT_RIGHT
Definition: winuser.h:538
#define WM_COMPAREITEM
Definition: winuser.h:1666
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2917
#define WM_PARENTNOTIFY
Definition: winuser.h:1814
#define SetWindowLongPtrW
Definition: winuser.h:5366
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define COLOR_BTNHIGHLIGHT
Definition: winuser.h:946
#define BF_RECT
Definition: winuser.h:462
#define GWL_STYLE
Definition: winuser.h:863
#define SM_CXICON
Definition: winuser.h:983
#define WM_CTLCOLOREDIT
Definition: winuser.h:1778
#define WM_MENUSELECT
Definition: winuser.h:1758
#define WM_CTLCOLORDLG
Definition: winuser.h:1781
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define COLOR_BTNFACE
Definition: winuser.h:939
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define WM_VKEYTOITEM
Definition: winuser.h:1659
BOOL WINAPI SubtractRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define COLOR_3DFACE
Definition: winuser.h:940
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815
static HDC hdcDst
Definition: xlate.c:32
_In_ ULONG iColor
Definition: xlateobj.h:17
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193