ReactOS 0.4.17-dev-1321-g5c122a9
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#elif defined __aarch64__
110#define ARCH L"arm64"
111#else
112#define ARCH L"none"
113#endif
114
115static const WCHAR manifest_filename[] = ARCH L"_" NAME L"_" PUBLIC_KEY L"_" VERSION L"_none_deadbeef.manifest";
116static const WCHAR manifest_filename_v5[] = ARCH L"_" NAME L"_" PUBLIC_KEY L"_" VERSION_V5 L"_none_deadbeef.manifest";
117
118static WCHAR* GetManifestPath(BOOL create, BOOL bV6)
119{
120 WCHAR *pwszBuf;
122
123 pwszBuf = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR));
124 if (!pwszBuf)
125 return NULL;
126
128 hres = StringCchCatW(pwszBuf, MAX_PATH, L"\\winsxs");
129 if (FAILED(hres))
130 return NULL;
131 if (create)
132 CreateDirectoryW(pwszBuf, NULL);
133 hres = StringCchCatW(pwszBuf, MAX_PATH, L"\\manifests\\");
134 if (FAILED(hres))
135 return NULL;
136 if (create)
137 CreateDirectoryW(pwszBuf, NULL);
138
139 hres = StringCchCatW(pwszBuf, MAX_PATH, bV6 ? manifest_filename : manifest_filename_v5);
140 if (FAILED(hres))
141 return NULL;
142
143 return pwszBuf;
144}
145
146static HANDLE CreateComctl32ActCtx(BOOL bV6)
147{
148 HANDLE ret;
149 WCHAR* pwstrSource;
150 ACTCTXW ActCtx = {sizeof(ACTCTX)};
151
152 pwstrSource = GetManifestPath(FALSE, bV6);
153 if (!pwstrSource)
154 {
155 ERR("GetManifestPath failed! bV6=%d\n", bV6);
157 }
158 ActCtx.lpSource = pwstrSource;
160 HeapFree(GetProcessHeap(), 0, pwstrSource);
162 ERR("CreateActCtxW failed! bV6=%d\n", bV6);
163 return ret;
164}
165
166static void RegisterControls(BOOL bV6)
167{
183 TAB_Register ();
188
189 if (!bV6)
190 {
192 }
193 else
194 {
198 EDIT_Register ();
201
202 TOOLBARv6_Register();
203 }
204}
205
206static void UnregisterControls(BOOL bV6)
207{
228
229 if (!bV6)
230 {
232 }
233 else
234 {
235 BUTTON_Unregister();
236 COMBO_Unregister ();
237 COMBOLBOX_Unregister ();
238 EDIT_Unregister ();
239 LISTBOX_Unregister ();
240 STATIC_Unregister ();
241
242 TOOLBARv6_Unregister ();
243 }
244
245}
246
247static void InitializeClasses()
248{
249 HANDLE hActCtx5, hActCtx6;
251 ULONG_PTR ulCookie;
252
253 /* like comctl32 5.82+ register all the common control classes */
254 /* Register the classes once no matter what */
255 hActCtx5 = CreateComctl32ActCtx(FALSE);
256 activated = (hActCtx5 != INVALID_HANDLE_VALUE ? ActivateActCtx(hActCtx5, &ulCookie) : FALSE);
257 RegisterControls(FALSE); /* Register the classes pretending to be v5 */
258 if (activated) DeactivateActCtx(0, ulCookie);
259
260 hActCtx6 = CreateComctl32ActCtx(TRUE);
261 if (hActCtx6 != INVALID_HANDLE_VALUE)
262 {
263 activated = ActivateActCtx(hActCtx6, &ulCookie);
264 RegisterControls(TRUE); /* Register the classes pretending to be v6 */
265 if (activated) DeactivateActCtx(0, ulCookie);
266
267 /* Initialize the themed controls only when the v6 manifest is present */
268 THEMING_Initialize (hActCtx5, hActCtx6);
269 }
270}
271
272static void UninitializeClasses()
273{
274 HANDLE hActCtx5, hActCtx6;
276 ULONG_PTR ulCookie;
277
278 hActCtx5 = CreateComctl32ActCtx(FALSE);
279 activated = (hActCtx5 != INVALID_HANDLE_VALUE ? ActivateActCtx(hActCtx5, &ulCookie) : FALSE);
280 UnregisterControls(FALSE);
281 if (activated) DeactivateActCtx(0, ulCookie);
282
283 hActCtx6 = CreateComctl32ActCtx(TRUE);
284 if (hActCtx6 != INVALID_HANDLE_VALUE)
285 {
286 activated = ActivateActCtx(hActCtx6, &ulCookie);
288 UnregisterControls(TRUE);
289 if (activated) DeactivateActCtx(0, ulCookie);
290 }
291}
292
293/***********************************************************************
294 * RegisterClassNameW [COMCTL32.@]
295 *
296 * Register window class again while using as SxS module.
297 */
298BOOLEAN WINAPI RegisterClassNameW(LPCWSTR className)
299{
300 InitializeClasses();
301 return TRUE;
302}
303
304#endif /* __REACTOS__ */
305
306#ifndef __REACTOS__
308{
309#define VERSION "6.0.2600.2982!"
310 static const char *classes[] =
311 {
314 VERSION "ComboLBox",
318 };
319 int i;
320
321 for (i = 0; i < ARRAY_SIZE(classes); i++)
323
324#undef VERSION
325}
326#endif
327
328/***********************************************************************
329 * DllMain [Internal]
330 *
331 * Initializes the internal 'COMCTL32.DLL'.
332 *
333 * PARAMS
334 * hinstDLL [I] handle to the 'dlls' instance
335 * fdwReason [I]
336 * lpvReserved [I] reserved, must be NULL
337 *
338 * RETURNS
339 * Success: TRUE
340 * Failure: FALSE
341 */
342
344{
345 TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
346
347 switch (fdwReason) {
350
351 COMCTL32_hModule = hinstDLL;
352
353 /* add global subclassing atom (used by 'tooltip' and 'updown') */
355 TRACE("Subclassing atom added: %p\n", COMCTL32_wSubclass);
356
357 /* create local pattern brush */
360
361 /* Get all the colors at DLL load */
363
364#ifndef __REACTOS__
365 /* like comctl32 5.82+ register all the common control classes */
381 TAB_Register ();
387
391 EDIT_Register ();
394
395 /* subclass user32 controls */
397#else
398 InitializeClasses();
399#endif
400
401 break;
402
404 if (lpvReserved) break;
405#ifndef __REACTOS__
406 /* clean up subclassing */
408
409 /* unregister all common control classes */
431
433
434#else
435 UninitializeClasses();
436#endif
437 /* delete local pattern brush */
440
441 /* delete global subclassing atom */
443 TRACE("Subclassing atom deleted: %p\n", COMCTL32_wSubclass);
444 break;
445 }
446
447 return TRUE;
448}
449
450
451/***********************************************************************
452 * MenuHelp [COMCTL32.2]
453 *
454 * Handles the setting of status bar help messages when the user
455 * selects menu items.
456 *
457 * PARAMS
458 * uMsg [I] message (WM_MENUSELECT) (see NOTES)
459 * wParam [I] wParam of the message uMsg
460 * lParam [I] lParam of the message uMsg
461 * hMainMenu [I] handle to the application's main menu
462 * hInst [I] handle to the module that contains string resources
463 * hwndStatus [I] handle to the status bar window
464 * lpwIDs [I] pointer to an array of integers (see NOTES)
465 *
466 * RETURNS
467 * No return value
468 *
469 * NOTES
470 * The official documentation is incomplete!
471 * This is the correct documentation:
472 *
473 * uMsg:
474 * MenuHelp() does NOT handle WM_COMMAND messages! It only handles
475 * WM_MENUSELECT messages.
476 *
477 * lpwIDs:
478 * (will be written ...)
479 */
480
484{
485 UINT uMenuID = 0;
486
487 if (!IsWindow (hwndStatus))
488 return;
489
490 switch (uMsg) {
491 case WM_MENUSELECT:
492 TRACE("WM_MENUSELECT wParam=0x%lX lParam=0x%lX\n",
493 wParam, lParam);
494
495 if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
496 /* menu was closed */
497 TRACE("menu was closed!\n");
499 }
500 else {
501 /* menu item was selected */
502 if (HIWORD(wParam) & MF_POPUP)
503 uMenuID = *(lpwIDs+1);
504 else
505 uMenuID = (UINT)LOWORD(wParam);
506 TRACE("uMenuID = %u\n", uMenuID);
507
508 if (uMenuID) {
509 WCHAR szText[256];
510
511 if (!LoadStringW (hInst, uMenuID, szText, ARRAY_SIZE(szText)))
512 szText[0] = '\0';
513
515 255 | SBT_NOBORDERS, (LPARAM)szText);
517 }
518 }
519 break;
520
521 case WM_COMMAND :
522 TRACE("WM_COMMAND wParam=0x%lX lParam=0x%lX\n",
523 wParam, lParam);
524 /* WM_COMMAND is not invalid since it is documented
525 * in the windows api reference. So don't output
526 * any FIXME for WM_COMMAND
527 */
528 WARN("We don't care about the WM_COMMAND\n");
529 break;
530
531 default:
532 FIXME("Invalid Message 0x%x!\n", uMsg);
533 break;
534 }
535}
536
537
538/***********************************************************************
539 * ShowHideMenuCtl [COMCTL32.3]
540 *
541 * Shows or hides controls and updates the corresponding menu item.
542 *
543 * PARAMS
544 * hwnd [I] handle to the client window.
545 * uFlags [I] menu command id.
546 * lpInfo [I] pointer to an array of integers. (See NOTES.)
547 *
548 * RETURNS
549 * Success: TRUE
550 * Failure: FALSE
551 *
552 * NOTES
553 * The official documentation is incomplete!
554 * This is the correct documentation:
555 *
556 * hwnd
557 * Handle to the window that contains the menu and controls.
558 *
559 * uFlags
560 * Identifier of the menu item to receive or lose a check mark.
561 *
562 * lpInfo
563 * The array of integers contains pairs of values. BOTH values of
564 * the first pair must be the handles to the application's main menu.
565 * Each subsequent pair consists of a menu id and control id.
566 */
567
570{
571 LPINT lpMenuId;
572
573 TRACE("%p, %lx, %p\n", hwnd, uFlags, lpInfo);
574
575 if (lpInfo == NULL)
576 return FALSE;
577
578 if (!(lpInfo[0]) || !(lpInfo[1]))
579 return FALSE;
580
581 /* search for control */
582 lpMenuId = &lpInfo[2];
583 while (*lpMenuId != uFlags)
584 lpMenuId += 2;
585
587 /* uncheck menu item */
588 CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
589
590 /* hide control */
591 lpMenuId++;
592 SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
594 }
595 else {
596 /* check menu item */
597 CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
598
599 /* show control */
600 lpMenuId++;
601 SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
603 }
604
605 return TRUE;
606}
607
608
609/***********************************************************************
610 * GetEffectiveClientRect [COMCTL32.4]
611 *
612 * Calculates the coordinates of a rectangle in the client area.
613 *
614 * PARAMS
615 * hwnd [I] handle to the client window.
616 * lpRect [O] pointer to the rectangle of the client window
617 * lpInfo [I] pointer to an array of integers (see NOTES)
618 *
619 * RETURNS
620 * No return value.
621 *
622 * NOTES
623 * The official documentation is incomplete!
624 * This is the correct documentation:
625 *
626 * lpInfo
627 * (will be written ...)
628 */
629
631GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, const INT *lpInfo)
632{
633 RECT rcCtrl;
634 const INT *lpRun;
635 HWND hwndCtrl;
636
637 TRACE("(%p %p %p)\n",
638 hwnd, lpRect, lpInfo);
639
640 GetClientRect (hwnd, lpRect);
641 lpRun = lpInfo;
642
643 do {
644 lpRun += 2;
645 if (*lpRun == 0)
646 return;
647 lpRun++;
648 hwndCtrl = GetDlgItem (hwnd, *lpRun);
649 if (GetWindowLongW (hwndCtrl, GWL_STYLE) & WS_VISIBLE) {
650 TRACE("control id 0x%x\n", *lpRun);
651 GetWindowRect (hwndCtrl, &rcCtrl);
652 MapWindowPoints (NULL, hwnd, (LPPOINT)&rcCtrl, 2);
653 SubtractRect (lpRect, lpRect, &rcCtrl);
654 }
655 lpRun++;
656 } while (*lpRun);
657}
658
659
660/***********************************************************************
661 * DrawStatusTextW [COMCTL32.@]
662 *
663 * Draws text with borders, like in a status bar.
664 *
665 * PARAMS
666 * hdc [I] handle to the window's display context
667 * lprc [I] pointer to a rectangle
668 * text [I] pointer to the text
669 * style [I] drawing style
670 *
671 * RETURNS
672 * No return value.
673 *
674 * NOTES
675 * The style variable can have one of the following values:
676 * (will be written ...)
677 */
678
680{
681 RECT r = *lprc;
683 COLORREF oldbkcolor;
684
685 if (style & SBT_POPOUT)
687 else if (style & SBT_NOBORDERS)
688 border = 0;
689
690 oldbkcolor = SetBkColor (hdc, comctl32_color.clrBtnFace);
691#ifdef __REACTOS__ // HACK for CORE-19854.
693#else
695#endif
696
697 /* now draw text */
698 if (text) {
699 int oldbkmode = SetBkMode (hdc, TRANSPARENT);
700 COLORREF oldtextcolor;
702 int strCnt = 0;
703
704 oldtextcolor = SetTextColor (hdc, comctl32_color.clrBtnText);
705 if (style & SBT_RTLREADING)
706 FIXME("Unsupported RTL style!\n");
707 r.left += 3;
708 do {
709 if (*text == '\t') {
710 if (strCnt) {
712 strCnt = 0;
713 }
714 if (align==DT_RIGHT) {
715 break;
716 }
718 } else {
719 strCnt++;
720 }
721 } while(*text++);
722
723 if (strCnt) DrawTextW (hdc, text - strCnt, -1, &r, align|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX);
724 SetBkMode (hdc, oldbkmode);
725 SetTextColor (hdc, oldtextcolor);
726 }
727
728 SetBkColor (hdc, oldbkcolor);
729}
730
731
732/***********************************************************************
733 * DrawStatusText [COMCTL32.@]
734 * DrawStatusTextA [COMCTL32.5]
735 *
736 * Draws text with borders, like in a status bar.
737 *
738 * PARAMS
739 * hdc [I] handle to the window's display context
740 * lprc [I] pointer to a rectangle
741 * text [I] pointer to the text
742 * style [I] drawing style
743 *
744 * RETURNS
745 * No return value.
746 */
747
749{
750 INT len;
751 LPWSTR textW = NULL;
752
753 if ( text ) {
754 if ( (len = MultiByteToWideChar( CP_ACP, 0, text, -1, NULL, 0 )) ) {
755 if ( (textW = Alloc( len * sizeof(WCHAR) )) )
757 }
758 }
760 Free( textW );
761}
762
763
764/***********************************************************************
765 * CreateStatusWindow [COMCTL32.@]
766 * CreateStatusWindowA [COMCTL32.6]
767 *
768 * Creates a status bar
769 *
770 * PARAMS
771 * style [I] window style
772 * text [I] pointer to the window text
773 * parent [I] handle to the parent window
774 * wid [I] control id of the status bar
775 *
776 * RETURNS
777 * Success: handle to the status window
778 * Failure: 0
779 */
780
783{
787 parent, (HMENU)(DWORD_PTR)wid, 0, 0);
788}
789
790
791/***********************************************************************
792 * CreateStatusWindowW [COMCTL32.@]
793 *
794 * Creates a status bar control
795 *
796 * PARAMS
797 * style [I] window style
798 * text [I] pointer to the window text
799 * parent [I] handle to the parent window
800 * wid [I] control id of the status bar
801 *
802 * RETURNS
803 * Success: handle to the status window
804 * Failure: 0
805 */
806
809{
813 parent, (HMENU)(DWORD_PTR)wid, 0, 0);
814}
815
816
817/***********************************************************************
818 * CreateUpDownControl [COMCTL32.16]
819 *
820 * Creates an up-down control
821 *
822 * PARAMS
823 * style [I] window styles
824 * x [I] horizontal position of the control
825 * y [I] vertical position of the control
826 * cx [I] with of the control
827 * cy [I] height of the control
828 * parent [I] handle to the parent window
829 * id [I] the control's identifier
830 * inst [I] handle to the application's module instance
831 * buddy [I] handle to the buddy window, can be NULL
832 * maxVal [I] upper limit of the control
833 * minVal [I] lower limit of the control
834 * curVal [I] current value of the control
835 *
836 * RETURNS
837 * Success: handle to the updown control
838 * Failure: 0
839 */
840
843 HWND parent, INT id, HINSTANCE inst,
844 HWND buddy, INT maxVal, INT minVal, INT curVal)
845{
846 HWND hUD =
848 parent, (HMENU)(DWORD_PTR)id, inst, 0);
849 if (hUD) {
850 SendMessageW (hUD, UDM_SETBUDDY, (WPARAM)buddy, 0);
851 SendMessageW (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
852 SendMessageW (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
853 }
854
855 return hUD;
856}
857
858
859/***********************************************************************
860 * InitCommonControls [COMCTL32.17]
861 *
862 * Registers the common controls.
863 *
864 * PARAMS
865 * No parameters.
866 *
867 * RETURNS
868 * No return values.
869 *
870 * NOTES
871 * This function is just a dummy - all the controls are registered at
872 * the DLL initialization time. See InitCommonControlsEx for details.
873 */
874
877{
878}
879
880
881/***********************************************************************
882 * InitCommonControlsEx [COMCTL32.@]
883 *
884 * Registers the common controls.
885 *
886 * PARAMS
887 * lpInitCtrls [I] pointer to an INITCOMMONCONTROLS structure.
888 *
889 * RETURNS
890 * Success: TRUE
891 * Failure: FALSE
892 *
893 * NOTES
894 * Probably all versions of comctl32 initializes the Win95 controls in DllMain
895 * during DLL initialization. Starting from comctl32 v5.82 all the controls
896 * are initialized there. We follow this behaviour and this function is just
897 * a dummy.
898 *
899 * Note: when writing programs under Windows, if you don't call any function
900 * from comctl32 the linker may not link this DLL. If InitCommonControlsEx
901 * was the only comctl32 function you were calling and you remove it you may
902 * have a false impression that InitCommonControlsEx actually did something.
903 */
904
907{
908 if (!lpInitCtrls || lpInitCtrls->dwSize != sizeof(INITCOMMONCONTROLSEX))
909 return FALSE;
910
911 TRACE("(0x%08x)\n", lpInitCtrls->dwICC);
912 return TRUE;
913}
914
915
916/***********************************************************************
917 * CreateToolbarEx [COMCTL32.@]
918 *
919 * Creates a toolbar window.
920 *
921 * PARAMS
922 * hwnd
923 * style
924 * wID
925 * nBitmaps
926 * hBMInst
927 * wBMID
928 * lpButtons
929 * iNumButtons
930 * dxButton
931 * dyButton
932 * dxBitmap
933 * dyBitmap
934 * uStructSize
935 *
936 * RETURNS
937 * Success: handle to the tool bar control
938 * Failure: 0
939 */
940
943 HINSTANCE hBMInst, UINT_PTR wBMID, LPCTBBUTTON lpButtons,
944 INT iNumButtons, INT dxButton, INT dyButton,
945 INT dxBitmap, INT dyBitmap, UINT uStructSize)
946{
947 HWND hwndTB;
948
949 hwndTB =
952 if(hwndTB) {
953 TBADDBITMAP tbab;
954
955 SendMessageW (hwndTB, TB_BUTTONSTRUCTSIZE, uStructSize, 0);
956
957 /* set bitmap and button size */
958 /*If CreateToolbarEx receives 0, windows sets default values*/
959 if (dxBitmap < 0)
960 dxBitmap = 16;
961 if (dyBitmap < 0)
962 dyBitmap = 16;
963 if (dxBitmap == 0 || dyBitmap == 0)
964 dxBitmap = dyBitmap = 16;
965 SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxBitmap, dyBitmap));
966
967 if (dxButton < 0)
968 dxButton = dxBitmap;
969 if (dyButton < 0)
970 dyButton = dyBitmap;
971 /* TB_SETBUTTONSIZE -> TB_SETBITMAPSIZE bug introduced for Windows compatibility */
972 if (dxButton != 0 && dyButton != 0)
973 SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxButton, dyButton));
974
975
976 /* add bitmaps */
977 if (nBitmaps > 0 || hBMInst == HINST_COMMCTRL)
978 {
979 tbab.hInst = hBMInst;
980 tbab.nID = wBMID;
981
982 SendMessageW (hwndTB, TB_ADDBITMAP, nBitmaps, (LPARAM)&tbab);
983 }
984 /* add buttons */
985 if(iNumButtons > 0)
986 SendMessageW (hwndTB, TB_ADDBUTTONSW, iNumButtons, (LPARAM)lpButtons);
987 }
988
989 return hwndTB;
990}
991
992
993/***********************************************************************
994 * CreateMappedBitmap [COMCTL32.8]
995 *
996 * Loads a bitmap resource using a colour map.
997 *
998 * PARAMS
999 * hInstance [I] Handle to the module containing the bitmap.
1000 * idBitmap [I] The bitmap resource ID.
1001 * wFlags [I] CMB_MASKED for using bitmap as a mask or 0 for normal.
1002 * lpColorMap [I] Colour information needed for the bitmap or NULL (uses system colours).
1003 * iNumMaps [I] Number of COLORMAP's pointed to by lpColorMap.
1004 *
1005 * RETURNS
1006 * Success: handle to the new bitmap
1007 * Failure: 0
1008 */
1009
1012 LPCOLORMAP lpColorMap, INT iNumMaps)
1013{
1014 HGLOBAL hglb;
1015 HRSRC hRsrc;
1016 const BITMAPINFOHEADER *lpBitmap;
1017 LPBITMAPINFOHEADER lpBitmapInfo;
1018 UINT nSize, nColorTableSize, iColor;
1019 RGBQUAD *pColorTable;
1020 INT i, iMaps, nWidth, nHeight;
1021 HDC hdcScreen;
1022 HBITMAP hbm;
1023 LPCOLORMAP sysColorMap;
1024 COLORREF cRef;
1025 COLORMAP internalColorMap[4] =
1026 {{0x000000, 0}, {0x808080, 0}, {0xC0C0C0, 0}, {0xFFFFFF, 0}};
1027
1028 /* initialize pointer to colortable and default color table */
1029 if (lpColorMap) {
1030 iMaps = iNumMaps;
1031 sysColorMap = lpColorMap;
1032 }
1033 else {
1034 internalColorMap[0].to = GetSysColor (COLOR_BTNTEXT);
1035 internalColorMap[1].to = GetSysColor (COLOR_BTNSHADOW);
1036 internalColorMap[2].to = GetSysColor (COLOR_BTNFACE);
1037 internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT);
1038 iMaps = 4;
1039 sysColorMap = internalColorMap;
1040 }
1041
1042 hRsrc = FindResourceW (hInstance, (LPWSTR)idBitmap, (LPWSTR)RT_BITMAP);
1043 if (hRsrc == 0)
1044 return 0;
1045 hglb = LoadResource (hInstance, hRsrc);
1046 if (hglb == 0)
1047 return 0;
1048 lpBitmap = LockResource (hglb);
1049 if (lpBitmap == NULL)
1050 return 0;
1051
1052 if (lpBitmap->biSize >= sizeof(BITMAPINFOHEADER) && lpBitmap->biClrUsed)
1053 nColorTableSize = lpBitmap->biClrUsed;
1054 else if (lpBitmap->biBitCount <= 8)
1055 nColorTableSize = (1 << lpBitmap->biBitCount);
1056 else
1057 nColorTableSize = 0;
1058 nSize = lpBitmap->biSize;
1059 if (nSize == sizeof(BITMAPINFOHEADER) && lpBitmap->biCompression == BI_BITFIELDS)
1060 nSize += 3 * sizeof(DWORD);
1061 nSize += nColorTableSize * sizeof(RGBQUAD);
1062 lpBitmapInfo = GlobalAlloc (GMEM_FIXED, nSize);
1063 if (lpBitmapInfo == NULL)
1064 return 0;
1065 RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
1066
1067 pColorTable = (RGBQUAD*)(((LPBYTE)lpBitmapInfo) + lpBitmapInfo->biSize);
1068
1069 for (iColor = 0; iColor < nColorTableSize; iColor++) {
1070 for (i = 0; i < iMaps; i++) {
1071 cRef = RGB(pColorTable[iColor].rgbRed,
1072 pColorTable[iColor].rgbGreen,
1073 pColorTable[iColor].rgbBlue);
1074 if ( cRef == sysColorMap[i].from) {
1075#if 0
1076 if (wFlags & CBS_MASKED) {
1077 if (sysColorMap[i].to != COLOR_BTNTEXT)
1078 pColorTable[iColor] = RGB(255, 255, 255);
1079 }
1080 else
1081#endif
1082 pColorTable[iColor].rgbBlue = GetBValue(sysColorMap[i].to);
1083 pColorTable[iColor].rgbGreen = GetGValue(sysColorMap[i].to);
1084 pColorTable[iColor].rgbRed = GetRValue(sysColorMap[i].to);
1085 break;
1086 }
1087 }
1088 }
1089 nWidth = lpBitmapInfo->biWidth;
1090 nHeight = lpBitmapInfo->biHeight;
1091 hdcScreen = GetDC (NULL);
1092 hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
1093 if (hbm) {
1094 HDC hdcDst = CreateCompatibleDC (hdcScreen);
1095 HBITMAP hbmOld = SelectObject (hdcDst, hbm);
1096 const BYTE *lpBits = (const BYTE *)lpBitmap + nSize;
1097 StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
1098 lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
1099 SRCCOPY);
1100 SelectObject (hdcDst, hbmOld);
1101 DeleteDC (hdcDst);
1102 }
1103 ReleaseDC (NULL, hdcScreen);
1104 GlobalFree (lpBitmapInfo);
1105 FreeResource (hglb);
1106
1107 return hbm;
1108}
1109
1110
1111/***********************************************************************
1112 * CreateToolbar [COMCTL32.7]
1113 *
1114 * Creates a toolbar control.
1115 *
1116 * PARAMS
1117 * hwnd
1118 * style
1119 * wID
1120 * nBitmaps
1121 * hBMInst
1122 * wBMID
1123 * lpButtons
1124 * iNumButtons
1125 *
1126 * RETURNS
1127 * Success: handle to the tool bar control
1128 * Failure: 0
1129 *
1130 * NOTES
1131 * Do not use this function anymore. Use CreateToolbarEx instead.
1132 */
1133
1136 HINSTANCE hBMInst, UINT wBMID,
1137 LPCTBBUTTON lpButtons,INT iNumButtons)
1138{
1139 return CreateToolbarEx (hwnd, style | CCS_NODIVIDER, wID, nBitmaps,
1140 hBMInst, wBMID, lpButtons,
1141 iNumButtons, 0, 0, 0, 0, CCSIZEOF_STRUCT(TBBUTTON, dwData));
1142}
1143
1144
1145/***********************************************************************
1146 * DllGetVersion [COMCTL32.@]
1147 *
1148 * Retrieves version information of the 'COMCTL32.DLL'
1149 *
1150 * PARAMS
1151 * pdvi [O] pointer to version information structure.
1152 *
1153 * RETURNS
1154 * Success: S_OK
1155 * Failure: E_INVALIDARG
1156 *
1157 * NOTES
1158 * Returns version of a comctl32.dll from IE4.01 SP1.
1159 */
1160
1162{
1163 if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
1164 WARN("wrong DLLVERSIONINFO size from app\n");
1165 return E_INVALIDARG;
1166 }
1167
1170 pdvi->dwBuildNumber = 2919;
1171 pdvi->dwPlatformID = 6304;
1172
1173 TRACE("%u.%u.%u.%u\n",
1174 pdvi->dwMajorVersion, pdvi->dwMinorVersion,
1175 pdvi->dwBuildNumber, pdvi->dwPlatformID);
1176
1177 return S_OK;
1178}
1179
1180/***********************************************************************
1181 * DllInstall (COMCTL32.@)
1182 *
1183 * Installs the ComCtl32 DLL.
1184 *
1185 * RETURNS
1186 * Success: S_OK
1187 * Failure: A HRESULT error
1188 */
1190{
1191 TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
1192 return S_OK;
1193}
1194
1195/***********************************************************************
1196 * _TrackMouseEvent [COMCTL32.@]
1197 *
1198 * Requests notification of mouse events
1199 *
1200 * During mouse tracking WM_MOUSEHOVER or WM_MOUSELEAVE events are posted
1201 * to the hwnd specified in the ptme structure. After the event message
1202 * is posted to the hwnd, the entry in the queue is removed.
1203 *
1204 * If the current hwnd isn't ptme->hwndTrack the TME_HOVER flag is completely
1205 * ignored. The TME_LEAVE flag results in a WM_MOUSELEAVE message being posted
1206 * immediately and the TME_LEAVE flag being ignored.
1207 *
1208 * PARAMS
1209 * ptme [I,O] pointer to TRACKMOUSEEVENT information structure.
1210 *
1211 * RETURNS
1212 * Success: non-zero
1213 * Failure: zero
1214 *
1215 * IMPLEMENTATION moved to USER32.TrackMouseEvent
1216 *
1217 */
1218
1221{
1222 return TrackMouseEvent (ptme);
1223}
1224
1225/*************************************************************************
1226 * GetMUILanguage [COMCTL32.@]
1227 *
1228 * Returns the user interface language in use by the current process.
1229 *
1230 * RETURNS
1231 * Language ID in use by the current process.
1232 */
1234{
1235 return COMCTL32_uiLang;
1236}
1237
1238
1239/*************************************************************************
1240 * InitMUILanguage [COMCTL32.@]
1241 *
1242 * Sets the user interface language to be used by the current process.
1243 *
1244 * RETURNS
1245 * Nothing.
1246 */
1248{
1249 COMCTL32_uiLang = uiLang;
1250}
1251
1252
1253/***********************************************************************
1254 * SetWindowSubclass [COMCTL32.410]
1255 *
1256 * Starts a window subclass
1257 *
1258 * PARAMS
1259 * hWnd [in] handle to window subclass.
1260 * pfnSubclass [in] Pointer to new window procedure.
1261 * uIDSubclass [in] Unique identifier of subclass together with pfnSubclass.
1262 * dwRef [in] Reference data to pass to window procedure.
1263 *
1264 * RETURNS
1265 * Success: non-zero
1266 * Failure: zero
1267 *
1268 * BUGS
1269 * If an application manually subclasses a window after subclassing it with
1270 * this API and then with this API again, then none of the previous
1271 * subclasses get called or the original window procedure.
1272 */
1273
1275 UINT_PTR uIDSubclass, DWORD_PTR dwRef)
1276{
1279
1280 TRACE ("(%p, %p, %lx, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
1281
1282 if (!hWnd || !pfnSubclass)
1283 return FALSE;
1284
1285 /* Since the window procedure that we set here has two additional arguments,
1286 * we can't simply set it as the new window procedure of the window. So we
1287 * set our own window procedure and then calculate the other two arguments
1288 * from there. */
1289
1290 /* See if we have been called for this window */
1292 if (!stack) {
1293 /* allocate stack */
1294 stack = Alloc (sizeof(SUBCLASS_INFO));
1295 if (!stack) {
1296 ERR ("Failed to allocate our Subclassing stack\n");
1297 return FALSE;
1298 }
1300
1301 /* set window procedure to our own and save the current one */
1302 if (IsWindowUnicode (hWnd))
1305 else
1308 }
1309 else {
1310 /* Check to see if we have called this function with the same uIDSubClass
1311 * and pfnSubclass */
1312 proc = stack->SubclassProcs;
1313 while (proc) {
1314 if ((proc->id == uIDSubclass) &&
1315 (proc->subproc == pfnSubclass)) {
1316 proc->ref = dwRef;
1317 return TRUE;
1318 }
1319 proc = proc->next;
1320 }
1321 }
1322
1323 proc = Alloc(sizeof(SUBCLASSPROCS));
1324 if (!proc) {
1325 ERR ("Failed to allocate subclass entry in stack\n");
1326 if (IsWindowUnicode (hWnd))
1328 else
1330 Free (stack);
1332 return FALSE;
1333 }
1334
1335 proc->subproc = pfnSubclass;
1336 proc->ref = dwRef;
1337 proc->id = uIDSubclass;
1338 proc->next = stack->SubclassProcs;
1339 stack->SubclassProcs = proc;
1340
1341 return TRUE;
1342}
1343
1344
1345/***********************************************************************
1346 * GetWindowSubclass [COMCTL32.411]
1347 *
1348 * Gets the Reference data from a subclass.
1349 *
1350 * PARAMS
1351 * hWnd [in] Handle to the window which we are subclassing
1352 * pfnSubclass [in] Pointer to the subclass procedure
1353 * uID [in] Unique identifier of the subclassing procedure
1354 * pdwRef [out] Pointer to the reference data
1355 *
1356 * RETURNS
1357 * Success: Non-zero
1358 * Failure: 0
1359 */
1360
1362 UINT_PTR uID, DWORD_PTR *pdwRef)
1363{
1364 const SUBCLASS_INFO *stack;
1365 const SUBCLASSPROCS *proc;
1366
1367 TRACE ("(%p, %p, %lx, %p)\n", hWnd, pfnSubclass, uID, pdwRef);
1368
1369 /* See if we have been called for this window */
1371 if (!stack)
1372 return FALSE;
1373
1374 proc = stack->SubclassProcs;
1375 while (proc) {
1376 if ((proc->id == uID) &&
1377 (proc->subproc == pfnSubclass)) {
1378 *pdwRef = proc->ref;
1379 return TRUE;
1380 }
1381 proc = proc->next;
1382 }
1383
1384 return FALSE;
1385}
1386
1387
1388/***********************************************************************
1389 * RemoveWindowSubclass [COMCTL32.412]
1390 *
1391 * Removes a window subclass.
1392 *
1393 * PARAMS
1394 * hWnd [in] Handle to the window which we are subclassing
1395 * pfnSubclass [in] Pointer to the subclass procedure
1396 * uID [in] Unique identifier of this subclass
1397 *
1398 * RETURNS
1399 * Success: non-zero
1400 * Failure: zero
1401 */
1402
1404{
1406 LPSUBCLASSPROCS prevproc = NULL;
1408 BOOL ret = FALSE;
1409
1410 TRACE ("(%p, %p, %lx)\n", hWnd, pfnSubclass, uID);
1411
1412 /* Find the Subclass to remove */
1414 if (!stack)
1415 return FALSE;
1416
1417 proc = stack->SubclassProcs;
1418 while (proc) {
1419 if ((proc->id == uID) &&
1420 (proc->subproc == pfnSubclass)) {
1421
1422 if (!prevproc)
1423 stack->SubclassProcs = proc->next;
1424 else
1425 prevproc->next = proc->next;
1426
1427 if (stack->stackpos == proc)
1428 stack->stackpos = stack->stackpos->next;
1429
1430 Free (proc);
1431 ret = TRUE;
1432 break;
1433 }
1434 prevproc = proc;
1435 proc = proc->next;
1436 }
1437
1438 if (!stack->SubclassProcs && !stack->running) {
1439 TRACE("Last Subclass removed, cleaning up\n");
1440 /* clean up our heap and reset the original window procedure */
1441 if (IsWindowUnicode (hWnd))
1443 else
1445 Free (stack);
1447 }
1448
1449 return ret;
1450}
1451
1452/***********************************************************************
1453 * COMCTL32_SubclassProc (internal)
1454 *
1455 * Window procedure for all subclassed windows.
1456 * Saves the current subclassing stack position to support nested messages
1457 */
1459{
1462 LRESULT ret;
1463
1464 TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
1465
1467 if (!stack) {
1468 ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
1469 return 0;
1470 }
1471
1472 /* Save our old stackpos to properly handle nested messages */
1473 proc = stack->stackpos;
1474 stack->stackpos = stack->SubclassProcs;
1475 stack->running++;
1477 stack->running--;
1478 stack->stackpos = proc;
1479
1480 if (!stack->SubclassProcs && !stack->running) {
1481 TRACE("Last Subclass removed, cleaning up\n");
1482 /* clean up our heap and reset the original window procedure */
1483 if (IsWindowUnicode (hWnd))
1485 else
1487 Free (stack);
1489 }
1490 return ret;
1491}
1492
1493/***********************************************************************
1494 * DefSubclassProc [COMCTL32.413]
1495 *
1496 * Calls the next window procedure (i.e. the one before this subclass)
1497 *
1498 * PARAMS
1499 * hWnd [in] The window that we're subclassing
1500 * uMsg [in] Message
1501 * wParam [in] WPARAM
1502 * lParam [in] LPARAM
1503 *
1504 * RETURNS
1505 * Success: non-zero
1506 * Failure: zero
1507 */
1508
1510{
1512 LRESULT ret;
1513
1514 TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
1515
1516 /* retrieve our little stack from the Properties */
1518 if (!stack) {
1519 ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
1520 return 0;
1521 }
1522
1523 /* If we are at the end of stack then we have to call the original
1524 * window procedure */
1525 if (!stack->stackpos) {
1526 if (IsWindowUnicode (hWnd))
1527 ret = CallWindowProcW (stack->origproc, hWnd, uMsg, wParam, lParam);
1528 else
1529 ret = CallWindowProcA (stack->origproc, hWnd, uMsg, wParam, lParam);
1530 } else {
1531 const SUBCLASSPROCS *proc = stack->stackpos;
1532 stack->stackpos = stack->stackpos->next;
1533 /* call the Subclass procedure from the stack */
1534 ret = proc->subproc (hWnd, uMsg, wParam, lParam,
1535 proc->id, proc->ref);
1536 }
1537
1538 return ret;
1539}
1540
1541
1542/***********************************************************************
1543 * COMCTL32_CreateToolTip [NOT AN API]
1544 *
1545 * Creates a tooltip for the control specified in hwnd and does all
1546 * necessary setup and notifications.
1547 *
1548 * PARAMS
1549 * hwndOwner [I] Handle to the window that will own the tool tip.
1550 *
1551 * RETURNS
1552 * Success: Handle of tool tip window.
1553 * Failure: NULL
1554 */
1555
1556HWND
1558{
1559 HWND hwndToolTip;
1560
1561 hwndToolTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP,
1563 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner,
1564 0, 0, 0);
1565
1566 /* Send NM_TOOLTIPSCREATED notification */
1567 if (hwndToolTip)
1568 {
1569 NMTOOLTIPSCREATED nmttc;
1570 /* true owner can be different if hwndOwner is a child window */
1571 HWND hwndTrueOwner = GetWindow(hwndToolTip, GW_OWNER);
1572 nmttc.hdr.hwndFrom = hwndTrueOwner;
1573 nmttc.hdr.idFrom = GetWindowLongPtrW(hwndTrueOwner, GWLP_ID);
1574 nmttc.hdr.code = NM_TOOLTIPSCREATED;
1575 nmttc.hwndToolTips = hwndToolTip;
1576
1577 SendMessageW(GetParent(hwndTrueOwner), WM_NOTIFY,
1578 GetWindowLongPtrW(hwndTrueOwner, GWLP_ID), (LPARAM)&nmttc);
1579 }
1580
1581 return hwndToolTip;
1582}
1583
1584
1585/***********************************************************************
1586 * COMCTL32_RefreshSysColors [NOT AN API]
1587 *
1588 * Invoked on any control recognizing a WM_SYSCOLORCHANGE message to
1589 * refresh the color values in the color structure
1590 *
1591 * PARAMS
1592 * none
1593 *
1594 * RETURNS
1595 * none
1596 */
1597
1598VOID
1600{
1618}
1619
1620/***********************************************************************
1621 * COMCTL32_DrawInsertMark [NOT AN API]
1622 *
1623 * Draws an insertion mark (which looks similar to an 'I').
1624 *
1625 * PARAMS
1626 * hDC [I] Device context to draw onto.
1627 * lpRect [I] Co-ordinates of insertion mark.
1628 * clrInsertMark [I] Colour of the insertion mark.
1629 * bHorizontal [I] True if insert mark should be drawn horizontally,
1630 * vertical otherwise.
1631 *
1632 * RETURNS
1633 * none
1634 *
1635 * NOTES
1636 * Draws up to but not including the bottom co-ordinate when drawing
1637 * vertically or the right co-ordinate when horizontal.
1638 */
1639void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal)
1640{
1641 HPEN hPen = CreatePen(PS_SOLID, 1, clrInsertMark);
1642 HPEN hOldPen;
1643 static const DWORD adwPolyPoints[] = {4,4,4};
1644 LONG lCentre = (bHorizontal ?
1645 lpRect->top + (lpRect->bottom - lpRect->top)/2 :
1646 lpRect->left + (lpRect->right - lpRect->left)/2);
1647 LONG l1 = (bHorizontal ? lpRect->left : lpRect->top);
1648 LONG l2 = (bHorizontal ? lpRect->right : lpRect->bottom);
1649 const POINT aptInsertMark[] =
1650 {
1651 /* top (V) or left (H) arrow */
1652 {lCentre , l1 + 2},
1653 {lCentre - 2, l1 },
1654 {lCentre + 3, l1 },
1655 {lCentre + 1, l1 + 2},
1656 /* middle line */
1657 {lCentre , l2 - 2},
1658 {lCentre , l1 - 1},
1659 {lCentre + 1, l1 - 1},
1660 {lCentre + 1, l2 - 2},
1661 /* bottom (V) or right (H) arrow */
1662 {lCentre , l2 - 3},
1663 {lCentre - 2, l2 - 1},
1664 {lCentre + 3, l2 - 1},
1665 {lCentre + 1, l2 - 3},
1666 };
1667 hOldPen = SelectObject(hDC, hPen);
1668 PolyPolyline(hDC, aptInsertMark, adwPolyPoints, ARRAY_SIZE(adwPolyPoints));
1669 SelectObject(hDC, hOldPen);
1670 DeleteObject(hPen);
1671}
1672
1673/***********************************************************************
1674 * COMCTL32_EnsureBitmapSize [internal]
1675 *
1676 * If needed, enlarge the bitmap so that the width is at least cxMinWidth and
1677 * the height is at least cyMinHeight. If the bitmap already has these
1678 * dimensions nothing changes.
1679 *
1680 * PARAMS
1681 * hBitmap [I/O] Bitmap to modify. The handle may change
1682 * cxMinWidth [I] If the width of the bitmap is smaller, then it will
1683 * be enlarged to this value
1684 * cyMinHeight [I] If the height of the bitmap is smaller, then it will
1685 * be enlarged to this value
1686 * cyBackground [I] The color with which the new area will be filled
1687 *
1688 * RETURNS
1689 * none
1690 */
1691void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground)
1692{
1693 int cxNew, cyNew;
1694 BITMAP bmp;
1695 HBITMAP hNewBitmap;
1696 HBITMAP hNewDCBitmap, hOldDCBitmap;
1697 HBRUSH hNewDCBrush;
1698 HDC hdcNew, hdcOld;
1699
1700 if (!GetObjectW(*pBitmap, sizeof(BITMAP), &bmp))
1701 return;
1702 cxNew = (cxMinWidth > bmp.bmWidth ? cxMinWidth : bmp.bmWidth);
1703 cyNew = (cyMinHeight > bmp.bmHeight ? cyMinHeight : bmp.bmHeight);
1704 if (cxNew == bmp.bmWidth && cyNew == bmp.bmHeight)
1705 return;
1706
1707 hdcNew = CreateCompatibleDC(NULL);
1708 hNewBitmap = CreateBitmap(cxNew, cyNew, bmp.bmPlanes, bmp.bmBitsPixel, NULL);
1709 hNewDCBitmap = SelectObject(hdcNew, hNewBitmap);
1710 hNewDCBrush = SelectObject(hdcNew, CreateSolidBrush(crBackground));
1711
1712 hdcOld = CreateCompatibleDC(NULL);
1713 hOldDCBitmap = SelectObject(hdcOld, *pBitmap);
1714
1715 BitBlt(hdcNew, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcOld, 0, 0, SRCCOPY);
1716 if (bmp.bmWidth < cxMinWidth)
1717 PatBlt(hdcNew, bmp.bmWidth, 0, cxNew, bmp.bmHeight, PATCOPY);
1718 if (bmp.bmHeight < cyMinHeight)
1719 PatBlt(hdcNew, 0, bmp.bmHeight, bmp.bmWidth, cyNew, PATCOPY);
1720 if (bmp.bmWidth < cxMinWidth && bmp.bmHeight < cyMinHeight)
1721 PatBlt(hdcNew, bmp.bmWidth, bmp.bmHeight, cxNew, cyNew, PATCOPY);
1722
1723 SelectObject(hdcNew, hNewDCBitmap);
1724 DeleteObject(SelectObject(hdcNew, hNewDCBrush));
1725 DeleteDC(hdcNew);
1726 SelectObject(hdcOld, hOldDCBitmap);
1727 DeleteDC(hdcOld);
1728
1729 DeleteObject(*pBitmap);
1730 *pBitmap = hNewBitmap;
1731 return;
1732}
1733
1735{
1736 HDC hdc = GetDC(NULL);
1737 HFONT hOldFont;
1738
1739 hOldFont = SelectObject(hdc, hFont);
1740 GetTextMetricsW(hdc, ptm);
1741 SelectObject(hdc, hOldFont);
1742 ReleaseDC(NULL, hdc);
1743}
1744
1745#ifndef OCM__BASE /* avoid including olectl.h */
1746#define OCM__BASE (WM_USER+0x1c00)
1747#endif
1748
1749/***********************************************************************
1750 * COMCTL32_IsReflectedMessage [internal]
1751 *
1752 * Some parents reflect notify messages - for some messages sent by the child,
1753 * they send it back with the message code increased by OCM__BASE (0x2000).
1754 * This allows better subclassing of controls. We don't need to handle such
1755 * messages but we don't want to print ERRs for them, so this helper function
1756 * identifies them.
1757 *
1758 * Some of the codes are in the CCM_FIRST..CCM_LAST range, but there is no
1759 * collision with defined CCM_ codes.
1760 */
1762{
1763 switch (uMsg)
1764 {
1765 case OCM__BASE + WM_COMMAND:
1773 case OCM__BASE + WM_DRAWITEM:
1775 case OCM__BASE + WM_DELETEITEM:
1776 case OCM__BASE + WM_VKEYTOITEM:
1777 case OCM__BASE + WM_CHARTOITEM:
1779 case OCM__BASE + WM_HSCROLL:
1780 case OCM__BASE + WM_VSCROLL:
1782 case OCM__BASE + WM_NOTIFY:
1783 return TRUE;
1784 default:
1785 return FALSE;
1786 }
1787}
1788
1789/***********************************************************************
1790 * MirrorIcon [COMCTL32.414]
1791 *
1792 * Mirrors an icon so that it will appear correctly on a mirrored DC.
1793 *
1794 * PARAMS
1795 * phicon1 [I/O] Icon.
1796 * phicon2 [I/O] Icon.
1797 *
1798 * RETURNS
1799 * Success: TRUE.
1800 * Failure: FALSE.
1801 */
1802BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2)
1803{
1804 FIXME("(%p, %p): stub\n", phicon1, phicon2);
1805 return FALSE;
1806}
1807
1808static inline BOOL IsDelimiter(WCHAR c)
1809{
1810 switch(c)
1811 {
1812 case '/':
1813 case '\\':
1814 case '.':
1815 case ' ':
1816 return TRUE;
1817 }
1818 return FALSE;
1819}
1820
1821static int CALLBACK PathWordBreakProc(LPCWSTR lpch, int ichCurrent, int cch, int code)
1822{
1823 if (code == WB_ISDELIMITER)
1824 return IsDelimiter(lpch[ichCurrent]);
1825 else
1826 {
1827 int dir = (code == WB_LEFT) ? -1 : 1;
1828 for(; 0 <= ichCurrent && ichCurrent < cch; ichCurrent += dir)
1829 if (IsDelimiter(lpch[ichCurrent])) return ichCurrent;
1830 }
1831 return ichCurrent;
1832}
1833
1834/***********************************************************************
1835 * SetPathWordBreakProc [COMCTL32.384]
1836 *
1837 * Sets the word break procedure for an edit control to one that understands
1838 * paths so that the user can jump over directories.
1839 *
1840 * PARAMS
1841 * hwnd [I] Handle to edit control.
1842 * bSet [I] If this is TRUE then the word break proc is set, otherwise it is removed.
1843 *
1844 * RETURNS
1845 * Result from EM_SETWORDBREAKPROC message.
1846 */
1848{
1850 (LPARAM)(bSet ? PathWordBreakProc : NULL));
1851}
1852
1853/***********************************************************************
1854 * DrawShadowText [COMCTL32.@]
1855 *
1856 * Draw text with shadow.
1857 */
1859 COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
1860{
1861 COLORREF crOldText;
1862 RECT rcText;
1863 INT iRet, x, y, x2, y2;
1864 BYTE *pBits;
1865 HBITMAP hbm, hbmOld;
1866 BITMAPINFO bi;
1867 HDC hdcMem;
1868 HFONT hOldFont;
1869 BLENDFUNCTION bf;
1870
1871 /* Create 32 bit DIB section for the shadow */
1872 ZeroMemory(&bi, sizeof(bi));
1873 bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
1874 bi.bmiHeader.biWidth = prc->right - prc->left + 4;
1875 bi.bmiHeader.biHeight = prc->bottom - prc->top + 5; // bottom-up DIB
1876 bi.bmiHeader.biPlanes = 1;
1877 bi.bmiHeader.biBitCount = 32;
1879 hbm = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, (PVOID*)&pBits, NULL, 0);
1880 if(!hbm)
1881 {
1882 ERR("CreateDIBSection failed\n");
1883 return 0;
1884 }
1885
1886 /* Create memory device context for new DIB section and select it */
1888 if(!hdcMem)
1889 {
1890 ERR("CreateCompatibleDC failed\n");
1892 return 0;
1893 }
1894
1895 hbmOld = (HBITMAP)SelectObject(hdcMem, hbm);
1896
1897 /* Draw text on our helper bitmap */
1898 hOldFont = (HFONT)SelectObject(hdcMem, GetCurrentObject(hdc, OBJ_FONT));
1899 SetTextColor(hdcMem, RGB(16, 16, 16));
1900 SetBkColor(hdcMem, RGB(0, 0, 0));
1902 SetRect(&rcText, 0, 0, prc->right - prc->left, prc->bottom - prc->top);
1903 DrawTextW(hdcMem, pszText, cch, &rcText, dwFlags);
1904 SelectObject(hdcMem, hOldFont);
1905
1906 /* Flush GDI so data pointed by pBits is valid */
1907 GdiFlush();
1908
1909 /* Set alpha of pixels (forget about colors for now. They will be changed in next loop).
1910 We copy text image 4*5 times and each time alpha is added */
1911 for (x = 0; x < bi.bmiHeader.biWidth; ++x)
1912 for (y = 0; y < bi.bmiHeader.biHeight; ++y)
1913 {
1914 BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4];
1915 UINT Alpha = 0;
1916
1917 for (x2 = x - 4 + 1; x2 <= x; ++x2)
1918 for (y2 = y; y2 < y + 5; ++y2)
1919 {
1920 if (x2 >= 0 && x2 < bi.bmiHeader.biWidth && y2 >= 0 && y2 < bi.bmiHeader.biHeight)
1921 {
1922 BYTE *pSrc = &pBits[(y2 * bi.bmiHeader.biWidth + x2) * 4];
1923 Alpha += pSrc[0];
1924 }
1925 }
1926
1927 if (Alpha > 255)
1928 Alpha = 255;
1929 pDest[3] = Alpha;
1930 }
1931
1932 /* Now set the color of each pixel to shadow color * alpha (see GdiAlphaBlend) */
1933 for (x = 0; x < bi.bmiHeader.biWidth; ++x)
1934 for (y = 0; y < bi.bmiHeader.biHeight; ++y)
1935 {
1936 BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4];
1937 pDest[0] = GetBValue(crShadow) * pDest[3] / 255;
1938 pDest[1] = GetGValue(crShadow) * pDest[3] / 255;
1939 pDest[2] = GetRValue(crShadow) * pDest[3] / 255;
1940 }
1941
1942 /* Fix ixOffset of the shadow (tested on Win) */
1943 ixOffset -= 3;
1944 iyOffset -= 3;
1945
1946 /* Alpha blend helper image to destination DC */
1947 bf.BlendOp = AC_SRC_OVER;
1948 bf.BlendFlags = 0;
1949 bf.SourceConstantAlpha = 255;
1951 GdiAlphaBlend(hdc, prc->left + ixOffset, prc->top + iyOffset, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, hdcMem, 0, 0, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, bf);
1952
1953 /* Delete the helper bitmap */
1954 SelectObject(hdcMem, hbmOld);
1957
1958 /* Finally draw the text over shadow */
1959 crOldText = SetTextColor(hdc, crText);
1961 iRet = DrawTextW(hdc, pszText, cch, prc, dwFlags);
1962 SetTextColor(hdc, crOldText);
1963
1964 return iRet;
1965}
1966
1967/***********************************************************************
1968 * LoadIconWithScaleDown [COMCTL32.@]
1969 */
1971{
1972 TRACE("(%p, %s, %d, %d, %p)\n", hinst, debugstr_w(name), cx, cy, icon);
1973
1974 *icon = NULL;
1975
1976 if (!name)
1977 return E_INVALIDARG;
1978
1979 *icon = LoadImageW(hinst, name, IMAGE_ICON, cx, cy,
1981 if (!*icon)
1983
1984 return S_OK;
1985}
1986
1987/***********************************************************************
1988 * LoadIconMetric [COMCTL32.@]
1989 */
1991{
1992 int cx, cy;
1993
1994 TRACE("(%p, %s, %d, %p)\n", hinst, debugstr_w(name), size, icon);
1995
1996 if (size == LIM_SMALL)
1997 {
2000 }
2001 else if (size == LIM_LARGE)
2002 {
2005 }
2006 else
2007 {
2008 *icon = NULL;
2009 return E_INVALIDARG;
2010 }
2011
2012 return LoadIconWithScaleDown(hinst, name, cx, cy, icon);
2013}
static HDC hDC
Definition: 3dtext.c:33
unsigned char BOOLEAN
Definition: actypes.h:127
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:3845
void TOOLTIPS_Unregister(void) DECLSPEC_HIDDEN
Definition: tooltips.c:2401
void EDIT_Register(void) DECLSPEC_HIDDEN
Definition: edit.c:5318
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:192
void SYSLINK_Unregister(void) DECLSPEC_HIDDEN
Definition: syslink.c:1770
void TOOLBAR_Unregister(void) DECLSPEC_HIDDEN
Definition: toolbar.c:7297
void REBAR_Unregister(void) DECLSPEC_HIDDEN
Definition: rebar.c:3870
void TAB_Register(void) DECLSPEC_HIDDEN
Definition: tab.c:3480
void LISTBOX_Register(void) DECLSPEC_HIDDEN
Definition: listbox.c:3197
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:7279
void MONTHCAL_Unregister(void) DECLSPEC_HIDDEN
Definition: monthcal.c:3052
void COMBOLBOX_Register(void) DECLSPEC_HIDDEN
Definition: listbox.c:3212
void LISTVIEW_Unregister(void) DECLSPEC_HIDDEN
Definition: listview.c:12095
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:12070
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:1970
VOID WINAPI GetEffectiveClientRect(HWND hwnd, LPRECT lpRect, const INT *lpInfo)
Definition: commctrl.c:631
#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:906
HWND COMCTL32_CreateToolTip(HWND hwndOwner)
Definition: commctrl.c:1557
BOOL WINAPI _TrackMouseEvent(TRACKMOUSEEVENT *ptme)
Definition: commctrl.c:1220
BOOL WINAPI ShowHideMenuCtl(HWND hwnd, UINT_PTR uFlags, LPINT lpInfo)
Definition: commctrl.c:569
BOOL WINAPI GetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID, DWORD_PTR *pdwRef)
Definition: commctrl.c:1361
HRESULT WINAPI LoadIconMetric(HINSTANCE hinst, const WCHAR *name, int size, HICON *icon)
Definition: commctrl.c:1990
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
Definition: commctrl.c:343
HMODULE COMCTL32_hModule
Definition: commctrl.c:79
void WINAPI DrawStatusTextA(HDC hdc, LPCRECT lprc, LPCSTR text, UINT style)
Definition: commctrl.c:748
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:876
void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal)
Definition: commctrl.c:1639
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
Definition: commctrl.c:1274
VOID WINAPI MenuHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu, HINSTANCE hInst, HWND hwndStatus, UINT *lpwIDs)
Definition: commctrl.c:482
static LPWSTR COMCTL32_wSubclass
Definition: commctrl.c:78
HWND WINAPI CreateStatusWindowW(LONG style, LPCWSTR text, HWND parent, UINT wid)
Definition: commctrl.c:808
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
Definition: commctrl.c:1189
void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground)
Definition: commctrl.c:1691
LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet)
Definition: commctrl.c:1847
HBITMAP WINAPI CreateMappedBitmap(HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags, LPCOLORMAP lpColorMap, INT iNumMaps)
Definition: commctrl.c:1011
void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm)
Definition: commctrl.c:1734
static BOOL IsDelimiter(WCHAR c)
Definition: commctrl.c:1808
int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
Definition: commctrl.c:1858
VOID WINAPI InitMUILanguage(LANGID uiLang)
Definition: commctrl.c:1247
BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID)
Definition: commctrl.c:1403
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:842
HWND WINAPI CreateToolbar(HWND hwnd, DWORD style, UINT wID, INT nBitmaps, HINSTANCE hBMInst, UINT wBMID, LPCTBBUTTON lpButtons, INT iNumButtons)
Definition: commctrl.c:1135
BOOL COMCTL32_IsReflectedMessage(UINT uMsg)
Definition: commctrl.c:1761
VOID COMCTL32_RefreshSysColors(void)
Definition: commctrl.c:1599
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:942
static LRESULT WINAPI COMCTL32_SubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: commctrl.c:1458
void WINAPI DrawStatusTextW(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style)
Definition: commctrl.c:679
HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *pdvi)
Definition: commctrl.c:1161
static int CALLBACK PathWordBreakProc(LPCWSTR lpch, int ichCurrent, int cch, int code)
Definition: commctrl.c:1821
#define OCM__BASE
Definition: commctrl.c:1746
HWND WINAPI CreateStatusWindowA(LONG style, LPCSTR text, HWND parent, UINT wid)
Definition: commctrl.c:782
static const WCHAR strCC32SubclassInfo[]
Definition: commctrl.c:92
static void unregister_versioned_classes(void)
Definition: commctrl.c:307
HBRUSH COMCTL32_hPattern55AABrush
Definition: commctrl.c:81
LRESULT WINAPI DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: commctrl.c:1509
BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2)
Definition: commctrl.c:1802
#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
static const GUID * classes[]
Definition: loader.c:49
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:2227
void COMBO_Register(void)
Definition: combo.c:2124
#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:444
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:434
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:58
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2370
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
#define IS_INTRESOURCE(x)
Definition: loader.c:613
const WCHAR * text
Definition: package.c:1826
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Height *Stride) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Stride)
Definition: common.c:42
#define RGB(r, g, b)
Definition: precomp.h:88
#define GetBValue(quad)
Definition: precomp.h:92
#define GetGValue(quad)
Definition: precomp.h:91
ULONG RGBQUAD
Definition: precomp.h:49
#define GetRValue(quad)
Definition: precomp.h:90
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
r parent
Definition: btrfs.c:3010
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
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
unsigned int UINT
Definition: sysinfo.c:13
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 ZeroMemory
Definition: minwinbase.h:31
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
int * LPINT
Definition: minwindef.h:151
#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:1621
HRESULT hres
Definition: protocol.c:432
static const struct access_res create[16]
Definition: package.c:7546
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
HMENU hMainMenu
Definition: mplay32.c:25
static UINT activated
Definition: msctf.cpp:42
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
static HANDLE ULONG_PTR dwData
Definition: pipe.c:111
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
#define OBJ_FONT
Definition: objidl.idl:1019
static HANDLE proc()
Definition: pdb.c:32
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define RT_BITMAP
Definition: pedump.c:364
short WCHAR
Definition: pedump.c:58
#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:1233
@ LIM_LARGE
Definition: commctrl.h:5266
@ LIM_SMALL
Definition: commctrl.h:5265
_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:5066
#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:5073
#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
_In_ HBITMAP hbm
Definition: ntgdi.h:2804
_Out_ LPRECT prc
Definition: ntgdi.h:1678
_In_ UINT uID
Definition: shlwapi.h:156
#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:5511
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1800
#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:4983
#define COLOR_INFOBK
Definition: winuser.h:953
#define WM_HSCROLL
Definition: winuser.h:1771
#define MAKELPARAM(l, h)
Definition: winuser.h:4116
#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:1677
#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:1772
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4469
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
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:1768
#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:2572
#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:1799
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:1675
#define MF_POPUP
Definition: winuser.h:136
#define WM_CTLCOLORMSGBOX
Definition: winuser.h:1794
#define MF_UNCHECKED
Definition: winuser.h:204
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_DRAWITEM
Definition: winuser.h:1673
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define WM_CTLCOLORBTN
Definition: winuser.h:1797
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:2049
#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:4470
#define WM_MEASUREITEM
Definition: winuser.h:1674
#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:4620
#define COLOR_3DHILIGHT
Definition: winuser.h:948
#define GWLP_ID
Definition: winuser.h:871
#define WM_CTLCOLORLISTBOX
Definition: winuser.h:1796
#define BDR_RAISEDOUTER
Definition: winuser.h:442
#define DT_RIGHT
Definition: winuser.h:538
#define WM_COMPAREITEM
Definition: winuser.h:1683
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:3014
#define WM_PARENTNOTIFY
Definition: winuser.h:1831
#define SetWindowLongPtrW
Definition: winuser.h:5512
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:1795
#define WM_MENUSELECT
Definition: winuser.h:1775
#define WM_CTLCOLORDLG
Definition: winuser.h:1798
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:1676
BOOL WINAPI SubtractRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define COLOR_3DFACE
Definition: winuser.h:940
#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 LoadStringW
Definition: utils.h:64
#define UINT
Definition: utils.c:29
_In_ UINT _In_ UINT cch
Definition: shellapi.h:428
#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: dcommon.idl:28
long bottom
Definition: dcommon.idl:29
long right
Definition: dcommon.idl:29
long left
Definition: dcommon.idl:29
long top
Definition: dcommon.idl:29
BYTE BlendOp
Definition: wingdi.h:3205
BYTE BlendFlags
Definition: wingdi.h:3206
BYTE AlphaFormat
Definition: wingdi.h:3208
BYTE SourceConstantAlpha
Definition: wingdi.h:3207
COLORREF to
Definition: commctrl.h:965
DWORD dwMajorVersion
Definition: shlwapi.h:121
DWORD dwBuildNumber
Definition: shlwapi.h:123
DWORD dwMinorVersion
Definition: shlwapi.h:122
DWORD cbSize
Definition: shlwapi.h:120
DWORD dwPlatformID
Definition: shlwapi.h:124
struct _SUBCLASSPROCS * next
Definition: comctl32.h:213
Definition: inflate.c:139
Definition: name.c:39
Definition: format.c:80
Definition: style.c:91
USHORT biBitCount
Definition: precomp.h:36
ULONG biCompression
Definition: precomp.h:37
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1922
LONG bmHeight
Definition: wingdi.h:1869
LONG bmWidth
Definition: wingdi.h:1868
WORD bmPlanes
Definition: wingdi.h:1871
WORD bmBitsPixel
Definition: wingdi.h:1872
UINT_PTR idFrom
Definition: winuser.h:3266
UINT code
Definition: winuser.h:3267
HWND hwndFrom
Definition: winuser.h:3265
LONG right
Definition: windef.h:108
LONG bottom
Definition: windef.h:109
LONG top
Definition: windef.h:107
LONG left
Definition: windef.h:106
UINT_PTR nID
Definition: commctrl.h:1060
HINSTANCE hInst
Definition: commctrl.h:1059
#define GWLP_WNDPROC
Definition: treelist.c:66
const char * LPCSTR
Definition: typedefs.h:52
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
uint16_t * LPWSTR
Definition: typedefs.h:56
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 BI_RGB
Definition: uefivid.c:46
#define ARCH
Definition: v6util.h:36
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:253
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define GMEM_FIXED
Definition: winbase.h:317
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:1809
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3711
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
DWORD COLORREF
Definition: windef.h:100
#define WINAPI
Definition: msvc.h:6
static size_t align(size_t addr, size_t alignment)
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#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)
_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
unsigned char BYTE
Definition: xxhash.c:193