From 5be02c6da0ac0ca6118f40af1f9365d0f76066c7 Mon Sep 17 00:00:00 2001 From: The Wine Synchronizer Date: Sat, 1 Dec 2007 18:28:50 +0000 Subject: [PATCH] Autosyncing with Wine HEAD svn path=/trunk/; revision=30936 --- reactos/dll/win32/comctl32/animate.c | 44 +- reactos/dll/win32/comctl32/comboex.c | 49 +- reactos/dll/win32/comctl32/comctl32.rbuild | 7 +- reactos/dll/win32/comctl32/comctl32_ros.diff | 8 +- reactos/dll/win32/comctl32/comctl32undoc.c | 2 +- reactos/dll/win32/comctl32/comctl_Ko.rc | 6 +- reactos/dll/win32/comctl32/commctrl.c | 42 +- reactos/dll/win32/comctl32/datetime.c | 64 +- reactos/dll/win32/comctl32/dpa.c | 18 +- reactos/dll/win32/comctl32/draglist.c | 4 +- reactos/dll/win32/comctl32/dsa.c | 6 +- reactos/dll/win32/comctl32/header.c | 108 +- reactos/dll/win32/comctl32/hotkey.c | 22 +- reactos/dll/win32/comctl32/idb_hist_large.bmp | Bin 0 -> 1558 bytes reactos/dll/win32/comctl32/idb_hist_small.bmp | Bin 0 -> 1418 bytes reactos/dll/win32/comctl32/idb_std_large.bmp | Bin 0 -> 2774 bytes reactos/dll/win32/comctl32/idb_std_small.bmp | Bin 0 -> 1824 bytes reactos/dll/win32/comctl32/idb_view_large.bmp | Bin 0 -> 2270 bytes reactos/dll/win32/comctl32/idb_view_small.bmp | Bin 0 -> 4150 bytes reactos/dll/win32/comctl32/idc_copy.cur | Bin 0 -> 326 bytes reactos/dll/win32/comctl32/idc_divider.cur | Bin 0 -> 326 bytes .../dll/win32/comctl32/idc_divideropen.cur | Bin 0 -> 326 bytes reactos/dll/win32/comctl32/idc_movebutton.cur | Bin 0 -> 326 bytes reactos/dll/win32/comctl32/idi_dragarrow.ico | Bin 0 -> 326 bytes .../dll/win32/comctl32/idi_tt_error_sm.ico | Bin 0 -> 318 bytes reactos/dll/win32/comctl32/idi_tt_info_sm.ico | Bin 0 -> 318 bytes reactos/dll/win32/comctl32/idi_tt_warn_sm.ico | Bin 0 -> 318 bytes reactos/dll/win32/comctl32/idt_check.bmp | Bin 0 -> 398 bytes reactos/dll/win32/comctl32/imagelist.c | 46 +- reactos/dll/win32/comctl32/ipaddress.c | 12 +- reactos/dll/win32/comctl32/listview.c | 635 ++++----- reactos/dll/win32/comctl32/monthcal.c | 28 +- reactos/dll/win32/comctl32/pager.c | 16 +- reactos/dll/win32/comctl32/progress.c | 26 +- reactos/dll/win32/comctl32/propsheet.c | 62 +- reactos/dll/win32/comctl32/rebar.c | 20 +- reactos/dll/win32/comctl32/rsrc.rc | 1141 +---------------- reactos/dll/win32/comctl32/status.c | 44 +- reactos/dll/win32/comctl32/string.c | 4 +- reactos/dll/win32/comctl32/syslink.c | 132 +- reactos/dll/win32/comctl32/tab.c | 64 +- reactos/dll/win32/comctl32/theme_combo.c | 48 +- reactos/dll/win32/comctl32/theme_dialog.c | 30 +- reactos/dll/win32/comctl32/theme_edit.c | 28 +- reactos/dll/win32/comctl32/theme_listbox.c | 22 +- reactos/dll/win32/comctl32/theming.c | 12 +- reactos/dll/win32/comctl32/toolbar.c | 139 +- reactos/dll/win32/comctl32/tooltips.c | 293 ++--- reactos/dll/win32/comctl32/trackbar.c | 63 +- reactos/dll/win32/comctl32/treeview.c | 20 +- reactos/dll/win32/comctl32/updown.c | 16 +- 51 files changed, 1102 insertions(+), 2179 deletions(-) create mode 100644 reactos/dll/win32/comctl32/idb_hist_large.bmp create mode 100644 reactos/dll/win32/comctl32/idb_hist_small.bmp create mode 100644 reactos/dll/win32/comctl32/idb_std_large.bmp create mode 100644 reactos/dll/win32/comctl32/idb_std_small.bmp create mode 100644 reactos/dll/win32/comctl32/idb_view_large.bmp create mode 100644 reactos/dll/win32/comctl32/idb_view_small.bmp create mode 100644 reactos/dll/win32/comctl32/idc_copy.cur create mode 100644 reactos/dll/win32/comctl32/idc_divider.cur create mode 100644 reactos/dll/win32/comctl32/idc_divideropen.cur create mode 100644 reactos/dll/win32/comctl32/idc_movebutton.cur create mode 100644 reactos/dll/win32/comctl32/idi_dragarrow.ico create mode 100644 reactos/dll/win32/comctl32/idi_tt_error_sm.ico create mode 100644 reactos/dll/win32/comctl32/idi_tt_info_sm.ico create mode 100644 reactos/dll/win32/comctl32/idi_tt_warn_sm.ico create mode 100644 reactos/dll/win32/comctl32/idt_check.bmp diff --git a/reactos/dll/win32/comctl32/animate.c b/reactos/dll/win32/comctl32/animate.c index 9c4ee443b13..5e3ffb1570c 100644 --- a/reactos/dll/win32/comctl32/animate.c +++ b/reactos/dll/win32/comctl32/animate.c @@ -24,11 +24,11 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Mar. 15, 2005, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. - * + * * TODO: * - check for the 'rec ' list in some AVI files */ @@ -124,7 +124,7 @@ static BOOL ANIMATE_LoadResW(ANIMATE_INFO *infoPtr, HINSTANCE hInst, LPCWSTR lpN mminfo.pchBuffer = (LPSTR)lpAvi; mminfo.cchBuffer = SizeofResource(hInst, hrsrc); infoPtr->hMMio = mmioOpenW(NULL, &mminfo, MMIO_READ); - if (!infoPtr->hMMio) + if (!infoPtr->hMMio) { FreeResource(infoPtr->hRes); return FALSE; @@ -270,7 +270,7 @@ static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC) nWidth = infoPtr->outbih->biWidth; nHeight = infoPtr->outbih->biHeight; - } + } else { pBitmapData = infoPtr->indata; @@ -435,14 +435,14 @@ static LRESULT ANIMATE_Play(ANIMATE_INFO *infoPtr, UINT cRepeat, WORD wFrom, WOR infoPtr->currFrame = infoPtr->nFromFrame; - if (infoPtr->dwStyle & ACS_TIMER) + if (infoPtr->dwStyle & ACS_TIMER) { TRACE("Using a timer\n"); /* create a timer to display AVI */ - infoPtr->uTimer = SetTimer(infoPtr->hwndSelf, 1, + infoPtr->uTimer = SetTimer(infoPtr->hwndSelf, 1, infoPtr->mah.dwMicroSecPerFrame / 1000, NULL); - } - else + } + else { if(infoPtr->dwStyle & ACS_TRANSPARENT) infoPtr->hbrushBG = (HBRUSH)SendMessageW(infoPtr->hwndNotify, @@ -602,7 +602,7 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr) /* FIXME: should handle the 'rec ' LIST when present */ infoPtr->lpIndex = Alloc(infoPtr->mah.dwTotalFrames * sizeof(DWORD)); - if (!infoPtr->lpIndex) + if (!infoPtr->lpIndex) return FALSE; numFrame = insize = 0; @@ -624,7 +624,7 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr) } infoPtr->indata = Alloc(infoPtr->ash.dwSuggestedBufferSize); - if (!infoPtr->indata) + if (!infoPtr->indata) return FALSE; return TRUE; @@ -659,14 +659,14 @@ static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr) return FALSE; if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT, - (DWORD_PTR)infoPtr->inbih, (DWORD_PTR)infoPtr->outbih) != ICERR_OK) + (DWORD_PTR)infoPtr->inbih, (DWORD_PTR)infoPtr->outbih) != ICERR_OK) { WARN("Can't get output BIH\n"); return FALSE; } infoPtr->outdata = Alloc(infoPtr->outbih->biSizeImage); - if (!infoPtr->outdata) + if (!infoPtr->outdata) return FALSE; if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_BEGIN, @@ -683,7 +683,7 @@ static BOOL ANIMATE_OpenW(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPWSTR lps { ANIMATE_Free(infoPtr); - if (!lpszName) + if (!lpszName) { TRACE("Closing avi!\n"); /* installer of thebat! v1.62 requires FALSE here */ @@ -697,17 +697,17 @@ static BOOL ANIMATE_OpenW(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPWSTR lps if (HIWORD(lpszName)) { - if (!ANIMATE_LoadResW(infoPtr, hInstance, lpszName)) + if (!ANIMATE_LoadResW(infoPtr, hInstance, lpszName)) { TRACE("No AVI resource found!\n"); - if (!ANIMATE_LoadFileW(infoPtr, lpszName)) + if (!ANIMATE_LoadFileW(infoPtr, lpszName)) { WARN("No AVI file found!\n"); return FALSE; } } - } - else + } + else { if (!ANIMATE_LoadResW(infoPtr, hInstance, lpszName)) { @@ -716,14 +716,14 @@ static BOOL ANIMATE_OpenW(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPWSTR lps } } - if (!ANIMATE_GetAviInfo(infoPtr)) + if (!ANIMATE_GetAviInfo(infoPtr)) { WARN("Can't get AVI information\n"); ANIMATE_Free(infoPtr); return FALSE; } - if (!ANIMATE_GetAviCodec(infoPtr)) + if (!ANIMATE_GetAviCodec(infoPtr)) { WARN("Can't get AVI Codec\n"); ANIMATE_Free(infoPtr); @@ -734,7 +734,7 @@ static BOOL ANIMATE_OpenW(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPWSTR lps SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, infoPtr->mah.dwWidth, infoPtr->mah.dwHeight, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER); - if (infoPtr->dwStyle & ACS_AUTOPLAY) + if (infoPtr->dwStyle & ACS_AUTOPLAY) return ANIMATE_Play(infoPtr, -1, 0, infoPtr->mah.dwTotalFrames - 1); return TRUE; @@ -849,7 +849,7 @@ static LRESULT ANIMATE_StyleChanged(ANIMATE_INFO *infoPtr, WPARAM wStyleType, co wStyleType, lpss->styleOld, lpss->styleNew); if (wStyleType != GWL_STYLE) return 0; - + infoPtr->dwStyle = lpss->styleNew; InvalidateRect(infoPtr->hwndSelf, NULL, TRUE); @@ -939,7 +939,7 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP break; case WM_SIZE: - if (infoPtr->dwStyle & ACS_CENTER) + if (infoPtr->dwStyle & ACS_CENTER) InvalidateRect(infoPtr->hwndSelf, NULL, TRUE); return DefWindowProcW(hWnd, uMsg, wParam, lParam); diff --git a/reactos/dll/win32/comctl32/comboex.c b/reactos/dll/win32/comctl32/comboex.c index c0af691b138..55e530866e2 100644 --- a/reactos/dll/win32/comctl32/comboex.c +++ b/reactos/dll/win32/comctl32/comboex.c @@ -20,14 +20,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * NOTE - * + * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. - * + * */ #include @@ -731,7 +731,7 @@ COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style) /* see if we need to change the word break proc on the edit */ if ((infoPtr->dwExtStyle ^ dwTemp) & CBES_EX_PATHWORDBREAKPROC) - SetPathWordBreakProc(infoPtr->hwndEdit, + SetPathWordBreakProc(infoPtr->hwndEdit, (infoPtr->dwExtStyle & CBES_EX_PATHWORDBREAKPROC) ? TRUE : FALSE); /* test if the control's appearance has changed */ @@ -1240,6 +1240,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lPa return SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf); case CBN_SELENDOK: + case CBN_SELENDCANCEL: /* * We have to change the handle since we are the control * issuing the message. IE4 depends on this. @@ -1577,6 +1578,27 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *di } +static void COMBOEX_ResetContent (COMBOEX_INFO *infoPtr) +{ + if (infoPtr->items) + { + CBE_ITEMDATA *item, *next; + + item = infoPtr->items; + while (item) { + next = item->next; + COMBOEX_FreeText (item); + Free (item); + item = next; + } + infoPtr->items = 0; + } + + infoPtr->selected = -1; + infoPtr->nb_items = 0; +} + + static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr) { if (infoPtr->hwndCombo) @@ -1585,18 +1607,7 @@ static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr) Free (infoPtr->edit); infoPtr->edit = 0; - if (infoPtr->items) { - CBE_ITEMDATA *item, *next; - - item = infoPtr->items; - while (item) { - next = item->next; - COMBOEX_FreeText (item); - Free (item); - item = next; - } - infoPtr->items = 0; - } + COMBOEX_ResetContent (infoPtr); if (infoPtr->defaultFont) DeleteObject (infoPtr->defaultFont); @@ -2225,6 +2236,7 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_SETTEXT: case WM_GETTEXT: + case WM_GETTEXTLENGTH: return SendMessageW(infoPtr->hwndEdit, uMsg, wParam, lParam); case CB_GETLBTEXT: @@ -2233,12 +2245,15 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case CB_GETLBTEXTLEN: return COMBOEX_GetListboxText(infoPtr, wParam, NULL); + case CB_RESETCONTENT: + COMBOEX_ResetContent(infoPtr); + /* fall through */ + /* Combo messages we are not sure if we need to process or just forward */ case CB_GETDROPPEDCONTROLRECT: case CB_GETITEMHEIGHT: case CB_GETEXTENDEDUI: case CB_LIMITTEXT: - case CB_RESETCONTENT: case CB_SELECTSTRING: /* Combo messages OK to just forward to the regular COMBO */ diff --git a/reactos/dll/win32/comctl32/comctl32.rbuild b/reactos/dll/win32/comctl32/comctl32.rbuild index 358c9917893..dca5c19568f 100644 --- a/reactos/dll/win32/comctl32/comctl32.rbuild +++ b/reactos/dll/win32/comctl32/comctl32.rbuild @@ -5,12 +5,9 @@ . include/reactos/wine - - - 0x600 - 0x501 - 0x501 + 0x600 + 0x600 wine user32 gdi32 diff --git a/reactos/dll/win32/comctl32/comctl32_ros.diff b/reactos/dll/win32/comctl32/comctl32_ros.diff index 6230640dae4..72fe8eea957 100644 --- a/reactos/dll/win32/comctl32/comctl32_ros.diff +++ b/reactos/dll/win32/comctl32/comctl32_ros.diff @@ -82,7 +82,7 @@ Index: propsheet.c } /****************************************************************************** -@@ -3555,6 +3558,8 @@ +@@ -3521,6 +3525,8 @@ * from which to switch to the next page */ SendMessageW(hwndTabCtrl, TCM_SETCURSEL, psInfo->active_page, 0); @@ -95,7 +95,7 @@ Index: tooltips.c =================================================================== --- tooltips.c (revision 25790) +++ tooltips.c (working copy) -@@ -2471,7 +2471,34 @@ +@@ -2440,7 +2440,34 @@ TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam) { FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam); @@ -170,7 +170,7 @@ Index: monthcal.c =================================================================== --- monthcal.c (revision 29360) +++ monthcal.c (working copy) -@@ -1703,11 +1703,12 @@ +@@ -1719,11 +1719,12 @@ static LRESULT @@ -185,7 +185,7 @@ Index: monthcal.c return 0; } -@@ -2015,7 +2016,7 @@ +@@ -2031,7 +2032,7 @@ return DLGC_WANTARROWS | DLGC_WANTCHARS; case WM_KILLFOCUS: diff --git a/reactos/dll/win32/comctl32/comctl32undoc.c b/reactos/dll/win32/comctl32/comctl32undoc.c index a1898fa37ec..6f434a68e02 100644 --- a/reactos/dll/win32/comctl32/comctl32undoc.c +++ b/reactos/dll/win32/comctl32/comctl32undoc.c @@ -159,7 +159,7 @@ DWORD WINAPI GetSize (LPVOID lpMem) * Items are re-ordered by changing the order of the values in the MRUList * value. When a new item is added, it becomes the new value of the oldest * identifier, and that identifier is moved to the front of the MRUList value. - * + * * Wine stores MRU-lists in the same registry format as Windows, so when * switching between the builtin and native comctl32.dll no problems or * incompatibilities should occur. diff --git a/reactos/dll/win32/comctl32/comctl_Ko.rc b/reactos/dll/win32/comctl32/comctl_Ko.rc index f557b53b219..52dff6e8232 100644 --- a/reactos/dll/win32/comctl32/comctl_Ko.rc +++ b/reactos/dll/win32/comctl32/comctl_Ko.rc @@ -1,6 +1,6 @@ /* * Copyright 2002 Won-kyu Park - * Copyright 2005 YunSong Hwang + * Copyright 2005,2007 YunSong Hwang * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -57,11 +57,11 @@ BEGIN PUSHBUTTON "´Ù½Ã(&E)", IDC_RESET_BTN,308,23,44,14 PUSHBUTTON "µµ¿ò¸»(&H)", IDC_HELP_BTN,308,40,44,14 PUSHBUTTON "À§·Î À̵¿(&U)", IDC_MOVEUP_BTN,308,74,44,14 - PUSHBUTTON "¾Æ·¡·Î À̵¿(&D)", IDC_MOVEDN_BTN,308,91,44,14 + PUSHBUTTON "¾Æ·¡·ÎÀ̵¿(&D)", IDC_MOVEDN_BTN,308,91,49,14 LTEXT "°¡´ÉÇÑ ¹öÆ°(&V)", -1,4,5,84,10 LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP PUSHBUTTON "´õÇϱâ(&A) ->", IDOK, 131, 42, 44, 14 - PUSHBUTTON "<- Á¦°ÅÇϱâ(&R)", IDC_REMOVE_BTN,131,62,44,14 + PUSHBUTTON "<-Áö¿ì±â(&R)", IDC_REMOVE_BTN,131,62,44,14 LTEXT "µµ±¸¹Ù ¹öÆ°(&T):", -1,182,5,78,10 LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP END diff --git a/reactos/dll/win32/comctl32/commctrl.c b/reactos/dll/win32/comctl32/commctrl.c index 460db6d64fb..4604c0ec7ac 100644 --- a/reactos/dll/win32/comctl32/commctrl.c +++ b/reactos/dll/win32/comctl32/commctrl.c @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * NOTES - * + * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Oct. 21, 2002, by Christian Neumair. * @@ -74,7 +74,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(commctrl); #define NAME "microsoft.windows.common-controls" #define FILE "comctl32.dll" -#define VERSION "6.0.0.0" +#define VERSION "6.0.2600.2982" #define PUBLIC_KEY "6595b64144ccf1df" #ifdef __i386__ @@ -248,7 +248,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) break; case DLL_PROCESS_DETACH: - /* clean up subclassing */ + /* clean up subclassing */ THEMING_Uninitialize(); /* unregister all common control classes */ @@ -875,7 +875,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags, if (lpBitmap->biSize >= sizeof(BITMAPINFOHEADER) && lpBitmap->biClrUsed) nColorTableSize = lpBitmap->biClrUsed; - else if (lpBitmap->biBitCount <= 8) + else if (lpBitmap->biBitCount <= 8) nColorTableSize = (1 << lpBitmap->biBitCount); else nColorTableSize = 0; @@ -1090,7 +1090,7 @@ VOID WINAPI InitMUILanguage (LANGID uiLang) * * BUGS * If an application manually subclasses a window after subclassing it with - * this API and then with this API again, then none of the previous + * this API and then with this API again, then none of the previous * subclasses get called or the origional window procedure. */ @@ -1139,7 +1139,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass, proc = proc->next; } } - + proc = Alloc(sizeof(SUBCLASSPROCS)); if (!proc) { ERR ("Failed to allocate subclass entry in stack\n"); @@ -1151,7 +1151,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass, RemovePropW( hWnd, COMCTL32_wSubclass ); return FALSE; } - + proc->subproc = pfnSubclass; proc->ref = dwRef; proc->id = uIDSubclass; @@ -1238,15 +1238,15 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u while (proc) { if ((proc->id == uID) && (proc->subproc == pfnSubclass)) { - + if (!prevproc) stack->SubclassProcs = proc->next; else prevproc->next = proc->next; - + if (stack->stackpos == proc) stack->stackpos = stack->stackpos->next; - + Free (proc); ret = TRUE; break; @@ -1254,7 +1254,7 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u prevproc = proc; proc = proc->next; } - + if (!stack->SubclassProcs && !stack->running) { TRACE("Last Subclass removed, cleaning up\n"); /* clean up our heap and reset the origional window procedure */ @@ -1265,14 +1265,14 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u Free (stack); RemovePropW( hWnd, COMCTL32_wSubclass ); } - + return ret; } /*********************************************************************** * COMCTL32_SubclassProc (internal) * - * Window procedure for all subclassed windows. + * Window procedure for all subclassed windows. * Saves the current subclassing stack position to support nested messages */ LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -1280,7 +1280,7 @@ LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARA LPSUBCLASS_INFO stack; LPSUBCLASSPROCS proc; LRESULT ret; - + TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam); stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass); @@ -1288,7 +1288,7 @@ LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARA ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd); return 0; } - + /* Save our old stackpos to properly handle nested messages */ proc = stack->stackpos; stack->stackpos = stack->SubclassProcs; @@ -1296,7 +1296,7 @@ LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARA ret = DefSubclassProc(hWnd, uMsg, wParam, lParam); stack->running--; stack->stackpos = proc; - + if (!stack->SubclassProcs && !stack->running) { TRACE("Last Subclass removed, cleaning up\n"); /* clean up our heap and reset the origional window procedure */ @@ -1330,7 +1330,7 @@ LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar { LPSUBCLASS_INFO stack; LRESULT ret; - + TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam); /* retrieve our little stack from the Properties */ @@ -1349,7 +1349,7 @@ LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar ret = CallWindowProcA (stack->origproc, hWnd, uMsg, wParam, lParam); } else { const SUBCLASSPROCS *proc = stack->stackpos; - stack->stackpos = stack->stackpos->next; + stack->stackpos = stack->stackpos->next; /* call the Subclass procedure from the stack */ ret = proc->subproc (hWnd, uMsg, wParam, lParam, proc->id, proc->ref); @@ -1461,8 +1461,8 @@ void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark HPEN hPen = CreatePen(PS_SOLID, 1, clrInsertMark); HPEN hOldPen; static const DWORD adwPolyPoints[] = {4,4,4}; - LONG lCentre = (bHorizontal ? - lpRect->top + (lpRect->bottom - lpRect->top)/2 : + LONG lCentre = (bHorizontal ? + lpRect->top + (lpRect->bottom - lpRect->top)/2 : lpRect->left + (lpRect->right - lpRect->left)/2); LONG l1 = (bHorizontal ? lpRect->left : lpRect->top); LONG l2 = (bHorizontal ? lpRect->right : lpRect->bottom); @@ -1546,7 +1546,7 @@ void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight SelectObject(hdcOld, hOldDCBitmap); DeleteDC(hdcOld); - DeleteObject(*pBitmap); + DeleteObject(*pBitmap); *pBitmap = hNewBitmap; return; } diff --git a/reactos/dll/win32/comctl32/datetime.c b/reactos/dll/win32/comctl32/datetime.c index 8a1543804af..8689dd527d0 100644 --- a/reactos/dll/win32/comctl32/datetime.c +++ b/reactos/dll/win32/comctl32/datetime.c @@ -20,14 +20,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * NOTE - * + * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Oct. 20, 2004, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. - * + * * TODO: * -- DTS_APPCANPARSE * -- DTS_SHORTDATECENTURYFORMAT @@ -72,6 +72,7 @@ typedef struct RECT checkbox; /* checkbox allowing the control to be enabled/disabled */ RECT calbutton; /* button that toggles the dropdown of the monthcal control */ BOOL bCalDepressed; /* TRUE = cal button is depressed */ + int bDropdownEnabled; int select; HFONT hFont; int nrFieldsAllocated; @@ -395,7 +396,7 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int wsprintfW (result, fmt__2dW, date.wMonth); break; case THREECHARMONTH: - GetLocaleInfoW(GetSystemDefaultLCID(), LOCALE_SMONTHNAME1+date.wMonth -1, + GetLocaleInfoW(GetSystemDefaultLCID(), LOCALE_SMONTHNAME1+date.wMonth -1, buffer, sizeof(buffer)/sizeof(buffer[0])); wsprintfW (result, fmt__3sW, buffer); break; @@ -440,7 +441,7 @@ static const int DayOfWeekTable[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; static int DATETIME_CalculateDayOfWeek(DWORD day, DWORD month, DWORD year) { year-=(month < 3); - + return((year + year/4 - year/100 + year/400 + DayOfWeekTable[month-1] + day ) % 7); } @@ -611,7 +612,7 @@ DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHO *fieldWidthPtr = size.cx; } -static void +static void DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc) { int i,prevright; @@ -720,7 +721,7 @@ DATETIME_LButtonDown (DATETIME_INFO *infoPtr, WORD wKey, INT x, INT y) /* recalculate the position of the monthcal popup */ if(infoPtr->dwStyle & DTS_RIGHTALIGN) - infoPtr->monthcal_pos.x = infoPtr->calbutton.left - + infoPtr->monthcal_pos.x = infoPtr->calbutton.left - (rcMonthCal.right - rcMonthCal.left); else /* FIXME: this should be after the area reserved for the checkbox */ @@ -736,10 +737,13 @@ DATETIME_LButtonDown (DATETIME_INFO *infoPtr, WORD wKey, INT x, INT y) ShowWindow(infoPtr->hMonthCal, SW_HIDE); } else { const SYSTEMTIME *lprgSysTimeArray = &infoPtr->date; - TRACE("update calendar %04d/%02d/%02d\n", + TRACE("update calendar %04d/%02d/%02d\n", lprgSysTimeArray->wYear, lprgSysTimeArray->wMonth, lprgSysTimeArray->wDay); SendMessageW(infoPtr->hMonthCal, MCM_SETCURSEL, 0, (LPARAM)(&infoPtr->date)); - ShowWindow(infoPtr->hMonthCal, SW_SHOW); + + if (infoPtr->bDropdownEnabled) + ShowWindow(infoPtr->hMonthCal, SW_SHOW); + infoPtr->bDropdownEnabled = TRUE; } TRACE ("dt:%p mc:%p mc parent:%p, desktop:%p\n", @@ -776,6 +780,10 @@ DATETIME_Paint (DATETIME_INFO *infoPtr, HDC hdc) } else { DATETIME_Refresh (infoPtr, hdc); } + + /* Not a click on the dropdown box, enabled it */ + infoPtr->bDropdownEnabled = TRUE; + return 0; } @@ -790,9 +798,9 @@ DATETIME_Button_Command (DATETIME_INFO *infoPtr, WPARAM wParam, LPARAM lParam) } return 0; } - - - + + + static LRESULT DATETIME_Command (DATETIME_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { @@ -855,7 +863,7 @@ DATETIME_Notify (DATETIME_INFO *infoPtr, int idCtrl, LPNMHDR lpnmh) ShowWindow(infoPtr->hMonthCal, SW_HIDE); infoPtr->dateValid = TRUE; SendMessageW (infoPtr->hMonthCal, MCM_GETCURSEL, 0, (LPARAM)&infoPtr->date); - TRACE("got from calendar %04d/%02d/%02d day of week %d\n", + TRACE("got from calendar %04d/%02d/%02d day of week %d\n", infoPtr->date.wYear, infoPtr->date.wMonth, infoPtr->date.wDay, infoPtr->date.wDayOfWeek); SendMessageW (infoPtr->hwndCheckbut, BM_SETCHECK, BST_CHECKED, 0); InvalidateRect(infoPtr->hwndSelf, NULL, TRUE); @@ -959,7 +967,7 @@ DATETIME_KeyDown (DATETIME_INFO *infoPtr, DWORD vkCode, LPARAM flags) break; } } - + switch (vkCode) { case VK_ADD: case VK_UP: @@ -1063,6 +1071,19 @@ DATETIME_SetFocus (DATETIME_INFO *infoPtr, HWND lostFocus) { TRACE("got focus from %p\n", lostFocus); + /* if monthcal is open and it loses focus, close monthcal */ + if (infoPtr->hMonthCal && (lostFocus == infoPtr->hMonthCal) && \ + IsWindowVisible(infoPtr->hMonthCal)) + { + ShowWindow(infoPtr->hMonthCal, SW_HIDE); + DATETIME_SendSimpleNotify(infoPtr, DTN_CLOSEUP); + /* note: this get triggered even if monthcal loses focus to a dropdown + * box click, which occurs without an intermediate WM_PAINT call + */ + infoPtr->bDropdownEnabled = FALSE; + return 0; + } + if (infoPtr->haveFocus == 0) { DATETIME_SendSimpleNotify (infoPtr, NM_SETFOCUS); infoPtr->haveFocus = DTHT_GOTFOCUS; @@ -1115,7 +1136,7 @@ DATETIME_Size (DATETIME_INFO *infoPtr, WORD flags, INT width, INT height) TRACE("Height=%d, Width=%d\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right); infoPtr->rcDraw = infoPtr->rcClient; - + if (infoPtr->dwStyle & DTS_UPDOWN) { SetWindowPos(infoPtr->hUpdown, NULL, infoPtr->rcClient.right-14, 0, @@ -1144,7 +1165,7 @@ DATETIME_Size (DATETIME_INFO *infoPtr, WORD flags, INT width, INT height) } -static LRESULT +static LRESULT DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss) { static const WCHAR buttonW[] = { 'b', 'u', 't', 't', 'o', 'n', 0 }; @@ -1153,12 +1174,12 @@ DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRU wStyleType, lpss->styleOld, lpss->styleNew); if (wStyleType != GWL_STYLE) return 0; - + infoPtr->dwStyle = lpss->styleNew; if ( !(lpss->styleOld & DTS_SHOWNONE) && (lpss->styleNew & DTS_SHOWNONE) ) { infoPtr->hwndCheckbut = CreateWindowExW (0, buttonW, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 2, 2, 13, 13, infoPtr->hwndSelf, 0, + 2, 2, 13, 13, infoPtr->hwndSelf, 0, (HINSTANCE)GetWindowLongPtrW (infoPtr->hwndSelf, GWLP_HINSTANCE), 0); SendMessageW (infoPtr->hwndCheckbut, BM_SETCHECK, 1, 0); } @@ -1167,7 +1188,7 @@ DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRU infoPtr->hwndCheckbut = 0; } if ( !(lpss->styleOld & DTS_UPDOWN) && (lpss->styleNew & DTS_UPDOWN) ) { - infoPtr->hUpdown = CreateUpDownControl (WS_CHILD | WS_BORDER | WS_VISIBLE, 120, 1, 20, 20, + infoPtr->hUpdown = CreateUpDownControl (WS_CHILD | WS_BORDER | WS_VISIBLE, 120, 1, 20, 20, infoPtr->hwndSelf, 1, 0, 0, UD_MAXVAL, UD_MINVAL, 0); } if ( (lpss->styleOld & DTS_UPDOWN) && !(lpss->styleNew & DTS_UPDOWN) ) { @@ -1207,12 +1228,13 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->buflen = (int *) Alloc (infoPtr->nrFieldsAllocated * sizeof(int)); infoPtr->hwndNotify = lpcs->hwndParent; infoPtr->select = -1; /* initially, nothing is selected */ + infoPtr->bDropdownEnabled = TRUE; DATETIME_StyleChanged(infoPtr, GWL_STYLE, &ss); DATETIME_SetFormatW (infoPtr, 0); /* create the monthcal control */ - infoPtr->hMonthCal = CreateWindowExW (0, SysMonthCal32W, 0, WS_BORDER | WS_POPUP | WS_CLIPSIBLINGS, + infoPtr->hMonthCal = CreateWindowExW (0, SysMonthCal32W, 0, WS_BORDER | WS_POPUP | WS_CLIPSIBLINGS, 0, 0, 0, 0, infoPtr->hwndSelf, 0, 0, 0); /* initialize info structure */ @@ -1234,7 +1256,7 @@ DATETIME_Destroy (DATETIME_INFO *infoPtr) DestroyWindow(infoPtr->hwndCheckbut); if (infoPtr->hUpdown) DestroyWindow(infoPtr->hUpdown); - if (infoPtr->hMonthCal) + if (infoPtr->hMonthCal) DestroyWindow(infoPtr->hMonthCal); SetWindowLongPtrW( infoPtr->hwndSelf, 0, 0 ); /* clear infoPtr */ Free (infoPtr); diff --git a/reactos/dll/win32/comctl32/dpa.c b/reactos/dll/win32/comctl32/dpa.c index cc3b854945e..4df556eaf26 100644 --- a/reactos/dll/win32/comctl32/dpa.c +++ b/reactos/dll/win32/comctl32/dpa.c @@ -22,11 +22,11 @@ * NOTES * These functions were involuntarily documented by Microsoft in 2002 as * the outcome of an anti-trust suit brought by various U.S. governments. - * As a result the specifications on MSDN are inaccurate, incomplete + * As a result the specifications on MSDN are inaccurate, incomplete * and misleading. A much more complete (unofficial) documentation is * available at: * - * http://members.ozemail.com.au/~geoffch/samples/win32/shell/comctl32 + * http://members.ozemail.com.au/~geoffch/samples/win32/shell/comctl32 */ #define COBJMACROS @@ -83,7 +83,7 @@ typedef HRESULT (CALLBACK *DPALOADPROC)(LPLOADDATA,IStream*,LPARAM); * * RETURNS * Success: TRUE - * Failure: FALSE + * Failure: FALSE * * NOTES * No more information available yet! @@ -181,7 +181,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc, * * RETURNS * Success: TRUE - * Failure: FALSE + * Failure: FALSE * * NOTES * No more information available yet! @@ -212,7 +212,7 @@ HRESULT WINAPI DPA_SaveStream (const HDPA hDpa, DPALOADPROC loadProc, * * RETURNS * Success: TRUE - * Failure: FALSE + * Failure: FALSE * * NOTES * No more information available yet! @@ -545,11 +545,11 @@ INT WINAPI DPA_InsertPtr (const HDPA hdpa, INT i, LPVOID p) /* create empty spot at the end */ if (!DPA_SetPtr(hdpa, hdpa->nItemCount, 0)) return -1; - + if (i != hdpa->nItemCount - 1) - memmove (hdpa->ptrs + i + 1, hdpa->ptrs + i, + memmove (hdpa->ptrs + i + 1, hdpa->ptrs + i, (hdpa->nItemCount - i - 1) * sizeof(LPVOID)); - + hdpa->ptrs[i] = p; return i; } @@ -590,7 +590,7 @@ BOOL WINAPI DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p) lpTemp = HeapReAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY, hdpa->ptrs, nSize); else lpTemp = HeapAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY, nSize); - + if (!lpTemp) return FALSE; diff --git a/reactos/dll/win32/comctl32/draglist.c b/reactos/dll/win32/comctl32/draglist.c index aff09f3484a..9ecade558c1 100644 --- a/reactos/dll/win32/comctl32/draglist.c +++ b/reactos/dll/win32/comctl32/draglist.c @@ -22,11 +22,11 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Mar. 10, 2004, by Robert Shearman. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features or bugs please note them below. - * + * */ #include diff --git a/reactos/dll/win32/comctl32/dsa.c b/reactos/dll/win32/comctl32/dsa.c index 7c0ea20062e..5edb4fc084e 100644 --- a/reactos/dll/win32/comctl32/dsa.c +++ b/reactos/dll/win32/comctl32/dsa.c @@ -22,11 +22,11 @@ * NOTES * These functions were involuntarily documented by Microsoft in 2002 as * the outcome of an anti-trust suit brought by various U.S. governments. - * As a result the specifications on MSDN are inaccurate, incomplete + * As a result the specifications on MSDN are inaccurate, incomplete * and misleading. A much more complete (unofficial) documentation is * available at: * - * http://members.ozemail.com.au/~geoffch/samples/win32/shell/comctl32 + * http://members.ozemail.com.au/~geoffch/samples/win32/shell/comctl32 */ #include @@ -90,7 +90,7 @@ HDSA WINAPI DSA_Create (INT nSize, INT nGrow) /************************************************************************** * DSA_Destroy [COMCTL32.321] - * + * * Destroys a dynamic storage array * * PARAMS diff --git a/reactos/dll/win32/comctl32/header.c b/reactos/dll/win32/comctl32/header.c index 3a30612a8c1..64403fc4f80 100644 --- a/reactos/dll/win32/comctl32/header.c +++ b/reactos/dll/win32/comctl32/header.c @@ -117,7 +117,7 @@ static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, const HDI { if (mask & HDI_UNSUPPORTED_FIELDS) FIXME("unsupported header fields %x\n", (mask & HDI_UNSUPPORTED_FIELDS)); - + if (mask & HDI_BITMAP) lpItem->hbm = phdi->hbm; @@ -130,7 +130,7 @@ static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, const HDI if (mask & HDI_WIDTH) lpItem->cxy = phdi->cxy; - if (mask & HDI_IMAGE) + if (mask & HDI_IMAGE) { lpItem->iImage = phdi->iImage; if (phdi->iImage == I_IMAGECALLBACK) @@ -157,7 +157,7 @@ static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, const HDI { lpItem->pszText = NULL; lpItem->callbackMask |= HDI_TEXT; - } + } } } @@ -263,7 +263,7 @@ static void HEADER_GetHotDividerRect(HWND hwnd, const HEADER_INFO *infoPtr, RECT if (infoPtr->uNumItem > 0) { HEADER_ITEM *lpItem; - + if (iDivider < infoPtr->uNumItem) { lpItem = &infoPtr->items[iDivider]; @@ -335,7 +335,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack, LRESULT lCDFlags } else { HBRUSH hbr; - + if (GetWindowLongW (hwnd, GWL_STYLE) & HDS_BUTTONS) { if (phdi->bDown) { DrawEdge (hdc, &r, BDR_RAISEDOUTER, @@ -413,7 +413,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack, LRESULT lCDFlags } if (bw || iw) - cw += *w; + cw += *w; /* align cx using the unclipped cw */ if ((phdi->fmt & HDF_JUSTIFYMASK) == HDF_LEFT) @@ -422,17 +422,17 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack, LRESULT lCDFlags cx = r.left + rw / 2 - cw / 2; else /* HDF_RIGHT */ cx = r.right - cw; - + /* clip cx & cw */ if (cx < r.left) cx = r.left; if (cx + cw > r.right) cw = r.right - cx; - + tx = cx + infoPtr->iMargin; /* since cw might have changed we have to recalculate tw */ tw = cw - infoPtr->iMargin * 2; - + if (iw || bw) { tw -= *w; if (phdi->fmt & HDF_BITMAP_ON_RIGHT) { @@ -460,17 +460,17 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack, LRESULT lCDFlags HDC hClipDC = GetDC(hwnd); HRGN hClipRgn = CreateRectRgn(r.left, r.top, r.right, r.bottom); SelectClipRgn(hClipDC, hClipRgn); - + if (bw) { HDC hdcBitmap = CreateCompatibleDC (hClipDC); SelectObject (hdcBitmap, phdi->hbm); - BitBlt (hClipDC, bx, r.top + ((INT)rh - bmp.bmHeight) / 2, + BitBlt (hClipDC, bx, r.top + ((INT)rh - bmp.bmHeight) / 2, bmp.bmWidth, bmp.bmHeight, hdcBitmap, 0, 0, SRCCOPY); DeleteDC (hdcBitmap); } if (iw) { - ImageList_DrawEx (infoPtr->himl, phdi->iImage, hClipDC, + ImageList_DrawEx (infoPtr->himl, phdi->iImage, hClipDC, ix, r.top + ((INT)rh - infoPtr->himl->cy) / 2, infoPtr->himl->cx, infoPtr->himl->cy, CLR_DEFAULT, CLR_DEFAULT, 0); } @@ -478,7 +478,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack, LRESULT lCDFlags DeleteObject(hClipRgn); ReleaseDC(hwnd, hClipDC); } - + if (((phdi->fmt & HDF_STRING) || (!(phdi->fmt & (HDF_OWNERDRAW|HDF_STRING|HDF_BITMAP| HDF_BITMAP_ON_RIGHT|HDF_IMAGE)))) /* no explicit format specified? */ @@ -503,7 +503,7 @@ HEADER_DrawHotDivider(HWND hwnd, HDC hdc) HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); HBRUSH brush; RECT r; - + HEADER_GetHotDividerRect(hwnd, infoPtr, &r); brush = CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT)); FillRect(hdc, &r, brush); @@ -528,7 +528,7 @@ HEADER_Refresh (HWND hwnd, HDC hdc) /* get rect for the bar, adjusted for the border */ GetClientRect (hwnd, &rect); lCDFlags = HEADER_SendCtrlCustomDraw(hwnd, CDDS_PREPAINT, hdc, &rect); - + if (infoPtr->bDragging) ImageList_DragShowNolock(FALSE); @@ -562,14 +562,14 @@ HEADER_Refresh (HWND hwnd, HDC hdc) DrawEdge (hdc, &rcRest, EDGE_ETCHED, BF_BOTTOM|BF_MIDDLE); } } - + if (infoPtr->iHotDivider != -1) HEADER_DrawHotDivider(hwnd, hdc); if (infoPtr->bDragging) ImageList_DragShowNolock(TRUE); SelectObject (hdc, hOldFont); - + if (lCDFlags & CDRF_NOTIFYPOSTPAINT) HEADER_SendCtrlCustomDraw(hwnd, CDDS_POSTPAINT, hdc, &rect); } @@ -737,7 +737,7 @@ HEADER_DrawTrackLine (HWND hwnd, HDC hdc, INT x) * [I] fSourceUnicode : is src a HDITEMW or HDITEMA * [O] ppvScratch : a pointer to a scratch buffer that needs to be freed after * the HDITEM is no longer in use or NULL if none was needed - * + * * NOTE: We depend on HDITEMA and HDITEMW having the same structure */ static void HEADER_CopyHDItemForNotify(const HEADER_INFO *infoPtr, HDITEMW *dest, @@ -745,7 +745,7 @@ static void HEADER_CopyHDItemForNotify(const HEADER_INFO *infoPtr, HDITEMW *dest { *ppvScratch = NULL; *dest = *src; - + if (src->mask & HDI_TEXT && src->pszText != LPSTR_TEXTCALLBACKW) /* covers TEXTCALLBACKA as well */ { if (fSourceUnicode && infoPtr->nNotifyFormat != NFR_UNICODE) @@ -754,7 +754,7 @@ static void HEADER_CopyHDItemForNotify(const HEADER_INFO *infoPtr, HDITEMW *dest Str_SetPtrWtoA((LPSTR *)&dest->pszText, src->pszText); *ppvScratch = dest->pszText; } - + if (!fSourceUnicode && infoPtr->nNotifyFormat == NFR_UNICODE) { dest->pszText = NULL; @@ -812,7 +812,7 @@ HEADER_SendNotifyWithHDItemT(HWND hwnd, UINT code, INT iItem, HDITEMW *lpItem) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); NMHEADERW nmhdr; - + if (infoPtr->nNotifyFormat != NFR_UNICODE) code = HEADER_NotifyCodeWtoA(code); nmhdr.iItem = iItem; @@ -856,9 +856,9 @@ HEADER_SendNotifyWithIntFieldT(HWND hwnd, UINT code, INT iItem, INT mask, INT iV /** * Prepare callback items - * depends on NMHDDISPINFOW having same structure as NMHDDISPINFOA + * depends on NMHDDISPINFOW having same structure as NMHDDISPINFOA * (so we handle the two cases only doing a specific cast for pszText). - * Checks if any of the required field are callback. If there are sends a + * Checks if any of the required field are callback. If there are sends a * NMHDISPINFO notify to retrieve these items. The items are stored in the * HEADER_ITEM pszText and iImage fields. They should be freed with * HEADER_FreeCallbackItems. @@ -886,7 +886,7 @@ HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask) Free(lpItem->pszText); lpItem->pszText = NULL; } - + memset(&dispInfo, 0, sizeof(NMHDDISPINFOW)); dispInfo.hdr.hwndFrom = hwnd; dispInfo.hdr.idFrom = GetWindowLongPtrW (hwnd, GWLP_ID); @@ -907,17 +907,17 @@ HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask) dispInfo.iItem = iItem; dispInfo.mask = mask; dispInfo.lParam = lpItem->lParam; - + TRACE("Sending HDN_GETDISPINFO%c\n", infoPtr->nNotifyFormat == NFR_UNICODE?'W':'A'); - SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, - (WPARAM) dispInfo.hdr.idFrom, + SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, + (WPARAM) dispInfo.hdr.idFrom, (LPARAM) &dispInfo); - TRACE("SendMessage returns(mask:0x%x,str:%s,lParam:%p)\n", + TRACE("SendMessage returns(mask:0x%x,str:%s,lParam:%p)\n", dispInfo.mask, (infoPtr->nNotifyFormat == NFR_UNICODE ? debugstr_w(dispInfo.pszText) : (LPSTR) dispInfo.pszText), (void*) dispInfo.lParam); - + if (mask & HDI_IMAGE) lpItem->iImage = dispInfo.iImage; if (mask & HDI_TEXT) @@ -936,13 +936,13 @@ HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask) Free(pvBuffer); } } - - if (dispInfo.mask & HDI_DI_SETITEM) + + if (dispInfo.mask & HDI_DI_SETITEM) { /* make the items permanent */ lpItem->callbackMask &= ~dispInfo.mask; } - + return TRUE; } @@ -980,7 +980,7 @@ HEADER_CreateDragImage (HWND hwnd, WPARAM wParam) HDC hDeviceDC; int height, width; HFONT hFont; - + if (wParam < 0 || wParam >= infoPtr->uNumItem) return FALSE; @@ -990,7 +990,7 @@ HEADER_CreateDragImage (HWND hwnd, WPARAM wParam) lpItem = &infoPtr->items[wParam]; width = lpItem->rect.right - lpItem->rect.left; height = lpItem->rect.bottom - lpItem->rect.top; - + hDeviceDC = GetDC(NULL); hMemoryDC = CreateCompatibleDC(hDeviceDC); hMemory = CreateCompatibleBitmap(hDeviceDC, width, height); @@ -1005,13 +1005,13 @@ HEADER_CreateDragImage (HWND hwnd, WPARAM wParam) HEADER_DrawItem(hwnd, hMemoryDC, wParam, FALSE, lCDFlags); if (lCDFlags & CDRF_NOTIFYPOSTPAINT) HEADER_SendCtrlCustomDraw(hwnd, CDDS_POSTPAINT, hMemoryDC, &rc); - + hMemory = SelectObject(hMemoryDC, hOldBitmap); DeleteDC(hMemoryDC); - + if (hMemory == NULL) /* if anything failed */ return FALSE; - + himl = ImageList_Create(width, height, ILC_COLORDDB, 1, 1); ImageList_Add(himl, hMemory, NULL); DeleteObject(hMemory); @@ -1024,7 +1024,7 @@ HEADER_SetHotDivider(HWND hwnd, WPARAM wParam, LPARAM lParam) HEADER_INFO *infoPtr = HEADER_GetInfoPtr(hwnd); INT iDivider; RECT r; - + if (wParam) { POINT pt; @@ -1032,7 +1032,7 @@ HEADER_SetHotDivider(HWND hwnd, WPARAM wParam, LPARAM lParam) pt.x = (INT)(SHORT)LOWORD(lParam); pt.y = 0; HEADER_InternalHitTest (hwnd, &pt, &flags, &iDivider); - + if (flags & HHT_TOLEFT) iDivider = 0; else if (flags & HHT_NOWHERE || flags & HHT_TORIGHT) @@ -1046,7 +1046,7 @@ HEADER_SetHotDivider(HWND hwnd, WPARAM wParam, LPARAM lParam) } else iDivider = (INT)lParam; - + /* Note; wParam==FALSE, lParam==-1 is valid and is used to clear the hot divider */ if (iDivider<-1 || iDivider>(int)infoPtr->uNumItem) return iDivider; @@ -1094,7 +1094,7 @@ HEADER_DeleteItem (HWND hwnd, WPARAM wParam) (infoPtr->uNumItem - iOrder) * sizeof(INT)); infoPtr->items = ReAlloc(infoPtr->items, sizeof(HEADER_ITEM) * infoPtr->uNumItem); infoPtr->order = ReAlloc(infoPtr->order, sizeof(INT) * infoPtr->uNumItem); - + /* Correct the orders */ for (i = 0; i < infoPtr->uNumItem; i++) { @@ -1146,7 +1146,7 @@ HEADER_GetItemT (HWND hwnd, INT nItem, LPHDITEMW phdi, BOOL bUnicode) TRACE("mask %x contains unknown fields. Using only comctl32 4.0 fields\n", mask); mask &= HDI_COMCTL32_4_0_FIELDS; } - + lpItem = &infoPtr->items[nItem]; HEADER_PrepareCallbackItems(hwnd, nItem, mask); @@ -1162,7 +1162,7 @@ HEADER_GetItemT (HWND hwnd, INT nItem, LPHDITEMW phdi, BOOL bUnicode) if (mask & HDI_LPARAM) phdi->lParam = lpItem->lParam; - if (mask & HDI_IMAGE) + if (mask & HDI_IMAGE) phdi->iImage = lpItem->iImage; if (mask & HDI_ORDER) @@ -1288,7 +1288,7 @@ HEADER_InsertItemT (HWND hwnd, INT nItem, const HDITEMW *phdi, BOOL bUnicode) infoPtr->uNumItem++; infoPtr->items = ReAlloc(infoPtr->items, sizeof(HEADER_ITEM) * infoPtr->uNumItem); infoPtr->order = ReAlloc(infoPtr->order, sizeof(INT) * infoPtr->uNumItem); - + /* make space for the new item */ memmove(&infoPtr->items[nItem + 1], &infoPtr->items[nItem], (infoPtr->uNumItem - nItem - 1) * sizeof(HEADER_ITEM)); @@ -1381,7 +1381,7 @@ static LRESULT HEADER_GetBitmapMargin(HWND hwnd) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr(hwnd); - + return infoPtr->iMargin; } @@ -1639,11 +1639,11 @@ HEADER_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) { HEADER_ITEM *lpItem = &infoPtr->items[infoPtr->iMoveItem]; INT iNewOrder; - + ImageList_DragShowNolock(FALSE); ImageList_EndDrag(); lpItem->bDown=FALSE; - + if (infoPtr->iHotDivider == -1) iNewOrder = -1; else if (infoPtr->iHotDivider == infoPtr->uNumItem) @@ -1664,7 +1664,7 @@ HEADER_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) } else InvalidateRect(hwnd, &infoPtr->items[infoPtr->iMoveItem].rect, FALSE); - + HEADER_SetHotDivider(hwnd, FALSE, -1); } else if (!(dwStyle&HDS_DRAGDROP) || !HEADER_IsDragDistance(infoPtr, &pt)) @@ -1694,7 +1694,7 @@ HEADER_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) HEADER_DrawTrackLine (hwnd, hdc, infoPtr->xOldTrack); ReleaseDC (hwnd, hdc); } - + if (!HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGINGW, infoPtr->iMoveItem, HDI_WIDTH, iNewWidth)) { infoPtr->items[infoPtr->iMoveItem].cxy = iNewWidth; @@ -1796,7 +1796,7 @@ HEADER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) } } } - + if (infoPtr->bDragging) { POINT drag; @@ -1806,7 +1806,7 @@ HEADER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) ImageList_DragMove(drag.x, drag.y); HEADER_SetHotDivider(hwnd, TRUE, lParam); } - + if (infoPtr->bPressed && !infoPtr->bDragging) { BOOL oldState = infoPtr->items[infoPtr->iMoveItem].bDown; if ((nItem == infoPtr->iMoveItem) && (flags == HHT_ONHEADER)) @@ -1830,18 +1830,18 @@ HEADER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) INT nOldWidth = lpItem->rect.right - lpItem->rect.left; RECT rcClient; RECT rcScroll; - + if (nWidth < 0) nWidth = 0; infoPtr->items[infoPtr->iMoveItem].cxy = nWidth; HEADER_SetItemBounds(hwnd); - + GetClientRect(hwnd, &rcClient); rcScroll = rcClient; rcScroll.left = lpItem->rect.left + nOldWidth; ScrollWindowEx(hwnd, nWidth - nOldWidth, 0, &rcScroll, &rcClient, NULL, NULL, 0); InvalidateRect(hwnd, &lpItem->rect, FALSE); UpdateWindow(hwnd); - + HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGEDW, infoPtr->iMoveItem, HDI_WIDTH, nWidth); } } diff --git a/reactos/dll/win32/comctl32/hotkey.c b/reactos/dll/win32/comctl32/hotkey.c index 46d1ba45b62..8a56fd38993 100644 --- a/reactos/dll/win32/comctl32/hotkey.c +++ b/reactos/dll/win32/comctl32/hotkey.c @@ -21,7 +21,7 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 21, 2004, by Robert Shearman. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features or bugs please note them below. @@ -74,15 +74,15 @@ HOTKEY_IsCombInv(const HOTKEY_INFO *infoPtr) return TRUE; if((infoPtr->InvComb & HKCOMB_A) && IsOnlySet(HOTKEYF_ALT)) return TRUE; - if((infoPtr->InvComb & HKCOMB_SC) && + if((infoPtr->InvComb & HKCOMB_SC) && IsOnlySet(HOTKEYF_SHIFT | HOTKEYF_CONTROL)) return TRUE; if((infoPtr->InvComb & HKCOMB_SA) && IsOnlySet(HOTKEYF_SHIFT | HOTKEYF_ALT)) return TRUE; - if((infoPtr->InvComb & HKCOMB_CA) && + if((infoPtr->InvComb & HKCOMB_CA) && IsOnlySet(HOTKEYF_CONTROL | HOTKEYF_ALT)) return TRUE; - if((infoPtr->InvComb & HKCOMB_SCA) && + if((infoPtr->InvComb & HKCOMB_SCA) && IsOnlySet(HOTKEYF_SHIFT | HOTKEYF_CONTROL | HOTKEYF_ALT)) return TRUE; @@ -130,7 +130,7 @@ HOTKEY_DrawHotKey(HOTKEY_INFO *infoPtr, HDC hdc, LPCWSTR KeyName, WORD NameLen) } /* Draw the names of the keys in the control */ -static void +static void HOTKEY_Refresh(HOTKEY_INFO *infoPtr, HDC hdc) { WCHAR KeyName[64]; @@ -143,10 +143,10 @@ HOTKEY_Refresh(HOTKEY_INFO *infoPtr, HDC hdc) HOTKEY_DrawHotKey (infoPtr, hdc, infoPtr->strNone, 4); return; } - + if(infoPtr->HotKey) Modifier = HIBYTE(infoPtr->HotKey); - else if(HOTKEY_IsCombInv(infoPtr)) + else if(HOTKEY_IsCombInv(infoPtr)) Modifier = infoPtr->InvMod; else Modifier = infoPtr->CurrMod; @@ -199,7 +199,7 @@ HOTKEY_Paint(HOTKEY_INFO *infoPtr, HDC hdc) static LRESULT HOTKEY_GetHotKey(const HOTKEY_INFO *infoPtr) { - TRACE("(infoPtr=%p) Modifiers: 0x%x, Virtual Key: %d\n", infoPtr, + TRACE("(infoPtr=%p) Modifiers: 0x%x, Virtual Key: %d\n", infoPtr, HIBYTE(infoPtr->HotKey), LOBYTE(infoPtr->HotKey)); return (LRESULT)infoPtr->HotKey; } @@ -208,14 +208,14 @@ static void HOTKEY_SetHotKey(HOTKEY_INFO *infoPtr, WORD hotKey) { infoPtr->HotKey = hotKey; - infoPtr->ScanCode = + infoPtr->ScanCode = MAKELPARAM(0, MapVirtualKeyW(LOBYTE(infoPtr->HotKey), 0)); TRACE("(infoPtr=%p hotKey=%x) Modifiers: 0x%x, Virtual Key: %d\n", infoPtr, hotKey, HIBYTE(infoPtr->HotKey), LOBYTE(infoPtr->HotKey)); InvalidateRect(infoPtr->hwndSelf, NULL, TRUE); } -static void +static void HOTKEY_SetRules(HOTKEY_INFO *infoPtr, WORD invComb, WORD invMod) { infoPtr->InvComb = invComb; @@ -407,7 +407,7 @@ HOTKEY_NCCreate (HWND hwnd, const CREATESTRUCTW *lpcs) { HOTKEY_INFO *infoPtr; DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE); - SetWindowLongW (hwnd, GWL_EXSTYLE, + SetWindowLongW (hwnd, GWL_EXSTYLE, dwExStyle | WS_EX_CLIENTEDGE); /* allocate memory for info structure */ diff --git a/reactos/dll/win32/comctl32/idb_hist_large.bmp b/reactos/dll/win32/comctl32/idb_hist_large.bmp new file mode 100644 index 0000000000000000000000000000000000000000..20596fac20a9c493f0c6c3062ba19ded66198c41 GIT binary patch literal 1558 zcmd5*%}T^D5FVxW(u;Ty&z^jYMZzK!Un2y(i^n~b*vIe@awvQ0rEgZhnKXZ0Eh{28 zWTrE1zIppw+G>2sylQ9U9%;jSN;fjh#uu7@gWVv@ NKCyg%0h7J$`%l1%tDFD; literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idb_hist_small.bmp b/reactos/dll/win32/comctl32/idb_hist_small.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3cc2ab4e51ac06c2f164502ce551702f4ad22484 GIT binary patch literal 1418 zcmchW!EM7Z3`N;UH3IZvEA0-MqxS-x!gKhX4Z4j7@J{X{DM2!lz;F+xO-ZEnzrHB> z^Xv91W;fa^{*Cwei=1gOzNa_$4?^{IU1=wKWtwz^YfDc&&od+D=rrb9M{BTgl!d|1 zg42)7A`9d5e_OXPU%g2kl@l(lbp~&8Bw}m3^r0UTPsE4elKJ|SBB^MJNO9HGV&(Ix zIj%tfo1#7MEnh;_kaU5^d|jo0vqr|JU{wiROQ$&!5ISF{`p7r>h^kcOE1_ef6ghyz zHN*H+ANWFGv^Bod2eYlAC3vP!;dgwVa4l9pE0^o*-Ttf(KFsQ;`uqw7jNL>zR==!; zPUWaR3do6syrYBXo3FEqQ8}HQP7-wtoiRS<^Ka#h^U@jyX~j4n5^aX_9r`~Y%wl{k j*GJ9lQt2tSbj|-!r0w)pzm2{fz|Lp8TIG7#ez$;MmwifI literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idb_std_large.bmp b/reactos/dll/win32/comctl32/idb_std_large.bmp new file mode 100644 index 0000000000000000000000000000000000000000..4f0e09e7e2e7af8039fed9b665dfb3cdde2f8b90 GIT binary patch literal 2774 zcma);J8v6D6ou!tJIf`-)hm`CLENS^AO~=eCJ7c`6|hR}0BM|#g^}rE0xGP^K>mrV zG%oC4k-wnMU|}Ez1bFhDS(2h82Z+Sk9q!KDd+xdC-rB{HbyLUX&i(Eb?XU!P=>yf^v-;yyg`97zo%<5!ko^hO} z{nKP)oes>ybZG7+XMEZ>kCN;6858E!&ia6by=3Q;Y-f9E+&@mi+)1|UvW)>7qh!55 z9bv-+|0uBAC(p3mloeCvUnM`YGiF>{JWo@ItllCLDvin3i=B_~_Bd4r&oOSjIn$lm z*xc|qcyi#{^(x$V@aaIW>)_c%zi|KI+vUdC>^|%zH;=}Bkbf}A-#S{~$v=3mMQpn^ zw@SwF29hro^?`8dST-kY@ zrGcRA7fci8;5T;RRfSuo;^jWkxrINS7{9}m|HCKu@-|m(sQ^_2d0lO=`BWdkaqNG@(vW!UoNF|E>CiI^U#R*LiE)EBepNQmJcwjY`hQ7b>#<_(f!W z{3KlBiM*eL)EQ}u!$Dk?Ol-K~oXAzrZa;luBT@8j=AWxJhWwdo_I!4}2Vc`Gblv{t zZFE%RsCl2x<1==4^qDRc{WsEoudXRx{0n7JkqsE}d?Jk8J1UUJLq>x#U0B0zn13MO z&Gf7woMC6J`Qfhb|A)V!m${|-p3j_4*+*Y6#-g-9PITJDPr^7#rs_UjoC`JI3qsYQ zm{VqXW_&E~*2-&&`UfV-Kdh=J4tKO#`oON@>dP@b_cBSctTpz`JvyK^JH`RXuwGQr=2{)9 z3*`6c1~PRsypq)>vM9{BRHX*CxL#cRI@E!~qQ(`fbq8DN7l67vs7st;v!xnffxPJY zEmqaVmH!qM4H*hlQpK*%u?3t3{@|%}>Yfvuxv67*&*@;J)GKzRU^GTu2tzqlN<>mv zw<0r*KQqnv_4u`?7M|d5a~`#2#XaoYMxecL$QdOBIwvBX8J^EUegUrK3BHvfMYQ4J zHU{5K@fhAzMxN14IiK6?y9Zd^_*JgNi|>wz06(GV%iM*TCV6nC<=x`X9mt>JW$%r6 zojF2N-{EJ9AFN=}8BRPbO4A!})WT};=QvUMCBb=$KH`0L5wE#Vw`1nrm1hu@XP{tFE*1qA>A literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idb_std_small.bmp b/reactos/dll/win32/comctl32/idb_std_small.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8318e447fe20535ca17766a719a84e4f88d49bbe GIT binary patch literal 1824 zcmZvc&1xe@5XWnqrrnH%kVObOEn(TilB>acHK7S}$t6!PAk%8_CE%d!QG%gWkV~E; zr#<GKENZF9Y=Q2}g8ADOhU%IQWv4R+C8FGLh zXfE6P)OU)aV;n4Y-s*tkIY#q#>qKA6&2bE}$u9;$d{F!O8XC4k0 zZZ)F@r5Ypg;|*)9AwN0eu9*z0Bj|8YM=cwZShJc#1C@fu@bMmUxYpdcoZOj}e~gK_ zJWwlq>(q!etetUKmbq5k*%w+jz=94ctp_0F!(cAZA0fFPjj?soiG}!)X)%3A7Iea` z#Pj1cT+#WbDt){8e6T7>r~wb?SUeh&7SJkr<3@DLJ*@UsBAx2;*R{_ zFo{XmTU7W>W8JHD+SIwGBI!uB7tYuuoiovex4u3(gBRJJ3<2kZRCDxbhRr3go%QK5UeYMRnyItl4 mgBkv$Vj4I#cyHYDQr(5sG-f;Z|6so>-^2YIb*rU`eDyDj`HhzV literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idb_view_large.bmp b/reactos/dll/win32/comctl32/idb_view_large.bmp new file mode 100644 index 0000000000000000000000000000000000000000..6331b5eb691febbc5f61d0070850cd67f2ccdf00 GIT binary patch literal 2270 zcmaJ@!EW0|5FIZTy9=6-NJ9vX9_pe93M0s&=obXR0s@k>y7$mSkVB6YKy-YHjb38p zOM3L7clwZHz9HYB00ev>5a!J;Nl}t*$y!n(Id9&ZH?w~E`xi&y^$*r_e11A2I>qsb zG$|ba?yuu??{!6lKf1b#2dp@y+uK_lH$-&bQe(dDk{?SJUn=W*ane{ zUW2Wc(4}0oYJ;QAu9ZDyb)2<_QT-C?ggB(Vu-nra8dt(w>a^85;^2GbaILRH&q7&= zcmd6D2BFx_X`jy@u?DE_gK@!nh-=!ENVku2`R$&}L!IxzaGVUdm7C(!YMzElJkEjK zs`JYqCjR{8z>R7x%0ZnMJ;Pn3Rvo7gRtFC2Jp2~@FOCzRMfV<7Xt7tBfO|K^)t<~! z{0&c-z>(aI<=_jcQU>kp=sCq`cx};jO1u%Uha9$Ee|{h8!*b`(|b@Ljkj=o-msv0X8Qcoyb zx-jp=U3A!{caVe&g?X71N}yGqK;_0F9+b3T4^=G^<-+kf*~ti5SOzGJlDR?$S( z=xOUBe|?j0gt}1Lu?T;1e4HQj3}vxc$l}k1eEQ>OX_`jX*4AWweO)#-He_>iQ?|CY zWP5vCc6N5;;NU>^_xELQZ%=l2cjfr|ByZm)`BAPU-ADQT>TkLF_)*^f@+*NHx91Mr zF;5*bhs+^!Doa_#BlpNXa*y02SF?aTAP-Ce@_?L&MC1{9L>>`Dh1@6d=T(=C1C%7k&$EkEwSX$ulaCkU893Bo!6&xN04}*t6 zQ|ICEFnAauu@b$dkU05bZt2zRKt=3;mZh550j5CEK!5;KAa-Ce;3N<`5ZjK!Vk0Mh zAbude9#J5EAU6Sq07D=TdTeCHc8`Q7y&fYuh{TJqMK~hy>}ZvP97H&xaO?xjXn$sh6F=`0oUBfVMs6}7!m-9_z`Cb!-SH@hiC5LNakC0ynHJ^$>HIl9336W z$;pYFo}S9(<)xgTpUd_2wcOm?$nEW|+}+*D!^49-K0eB)f0BHd&v}oJ$*#Tw`oN#f z)UQsHO#d&9ebIC`e5(4JD$**-I(4Q`^os%JI2n6DOX;fUCht&b$0fy@V7?yrl$v)FCNSK zMVrW_3|ey=Jol1x<%0J?{&n6aypnYMibXyz<}}^HZ!LeDe&ZkFEbEu`FYyn};TZ|K z`dP)FcSk?sx5MuE^9j5#|8>JU^3eX)<|^KbMg4z%RLg zK7X$DuQAHra{cHLq+$Mh91Od&81WC)hO<@tX*%Ib{rqdnM)_ABnOpq~&Rf{}RPVMG z{v>n#1w%~USH8E^V)XtFt4WpALH3~hwdsoGe=^Z64EPD&?QPpA#_s z_P@6pT(xO~&8T3=-z!ZUszz&6!}j@~nx`l3ntxR$;qCdDxptkm>ZM&;HPGrGSK2DQ z%-^lB?H}~;==7L)m{s$`m Mby9c#QhQ6@zfUAEi2wiq literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idc_copy.cur b/reactos/dll/win32/comctl32/idc_copy.cur new file mode 100644 index 0000000000000000000000000000000000000000..e4b702162fa5a2356d5d3a43988fe70c58ade033 GIT binary patch literal 326 zcmb8pI}XAy41i&q4vcK5TQYWJWI?Iai!d>FsybA(N9&O|0O0<4NZpWd^u=}@MG-lO ziuaP@q9SLi1|BVxm7=8F?7Nxm%|F%3W$2Psv>hH8@Wi}gLFp&*h#q&eh`}Fz$A@wB hnsdIHeO>krW)rTAYQ)Eq6WJl4oGY^mM=&;rfDO`kb({bI literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idc_divider.cur b/reactos/dll/win32/comctl32/idc_divider.cur new file mode 100644 index 0000000000000000000000000000000000000000..9d679c96b28d4f81b88626cc623bca09fcc32d20 GIT binary patch literal 326 zcmbV{u?<2o3`Ae(SOD=W(tx0203`kfj6|km4l2grxJyTVgRu21`)oNetSHn9Yx}vt z1~?i^%%<35t;c1Mv=o0-%G3MnH`4)5d$?Vi-<&(iqop^_XNUjrm%Vq=$ZL`wTd8sP NVb@ObXz7jfsXwV8bshi! literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idc_divideropen.cur b/reactos/dll/win32/comctl32/idc_divideropen.cur new file mode 100644 index 0000000000000000000000000000000000000000..9adc94547324e419547aaf26d3de343a08607bf7 GIT binary patch literal 326 zcmZQzU}9ioP*7lC-~>VgMg|5k1_lNVAO;FCH~=vt5Q0Dhn8YOh|NoCENTdk!2L=YF z3#eG?8UusYRR#vXI}HpC2OPi{#0H6h?w7!WfnD|6Lw1V$vInC}FsOttm$ ze;mtlfC(JR5|}eL4p;zK6PC~r$4v2)d>Kwv9WG<8cmu}jlc}k71X{8uA;K9a`sI~e zfZ3S~__3+!jXR`xY^!6)R;Y%Bgy+;yHN81Q)l)qr0QLjvNk`AEq-$8W9_xP<5@MU@ M{LQ>qhn*EIzDJ~XXaE2J literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idi_dragarrow.ico b/reactos/dll/win32/comctl32/idi_dragarrow.ico new file mode 100644 index 0000000000000000000000000000000000000000..bba46b2966dbcef847d32363fdeb60f793c6f507 GIT binary patch literal 326 zcmZQzU<5)11tta%Fkob05ChU0K&$}74nPc&2LmVt;ULKW|NkR6)M6z74GLgj;6K5@ wz`+8E!@AWXG}WP0Qrjuf+80UEPe#kyHv zRW`TH*ILZGcbf|%r+_ks-#CqW8hVWV<2-h>pU?XsIg?*k;CUhrd@p;~K$L$6bNmD- MHGvlTGxsjQ8_N4tb^rhX literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idi_tt_info_sm.ico b/reactos/dll/win32/comctl32/idi_tt_info_sm.ico new file mode 100644 index 0000000000000000000000000000000000000000..80bcf36ed9d421b988ed3055560ff6aa7e39b85c GIT binary patch literal 318 zcmZvYu?@m76htoq33o|F3ng2yn#&YOjKC@$z!EED1eYlgpLb4$;M;fSfBycmEe(um zn&h|)($Na+oWY3xz`&_-!FaPJ*Y;UB)jImql4 KY8GnOtMmap;$49N literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idi_tt_warn_sm.ico b/reactos/dll/win32/comctl32/idi_tt_warn_sm.ico new file mode 100644 index 0000000000000000000000000000000000000000..4fab813c4d600d80e9dc5d6aece12b44b28f444d GIT binary patch literal 318 zcmZvXAre9{5JO+5%pfYL!h%Hp86@H#jUMUyH9ZPPKq44E+3f&^v`N}zD+)=g){5hl zVDBz^augFADfG~P(mVrEnZ6!HhGL7E x9QCT@l<-3FShuKEMEvtnYaqrn>93pkLDS!zT?5YBcJRIf=i@N=oWc3J!W*LbJ~RLT literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/idt_check.bmp b/reactos/dll/win32/comctl32/idt_check.bmp new file mode 100644 index 0000000000000000000000000000000000000000..7344a646e939a4527d85a2646e161cc2b03f2a90 GIT binary patch literal 398 zcmaKoO%6gK41}iz|41})g12?)8QgmX&%z1Z_cq)Nr|)560+BEj=4(sR$MY>%*Nf+k zTBs`}h)~8mxu>{N7Xw%MZq!;)3g3-(Ydth9#yUG^wM&-auK8q2ra4g?|L+A;>?XOv x0^-D1i&J0NhyQ~8hJV#7oDM{=Ct>YC4y!MafgFvls}r9^%IyF1-e$vD$p>O{KP~_O literal 0 HcmV?d00001 diff --git a/reactos/dll/win32/comctl32/imagelist.c b/reactos/dll/win32/comctl32/imagelist.c index 622c925787e..660edde8621 100644 --- a/reactos/dll/win32/comctl32/imagelist.c +++ b/reactos/dll/win32/comctl32/imagelist.c @@ -910,7 +910,7 @@ ImageList_DragMove (INT x, INT y) BitBlt(hdcBg, 0, 0, InternalDrag.himl->cx, InternalDrag.himl->cy, hdcOffScreen, origNewX - origRegX, origNewY - origRegY, SRCCOPY); /* draw the image */ - ImageList_InternalDragDraw(hdcOffScreen, origNewX - origRegX, + ImageList_InternalDragDraw(hdcOffScreen, origNewX - origRegX, origNewY - origRegY); /* draw the update region to the screen */ BitBlt(hdcDrag, origRegX, origRegY, sizeRegX, sizeRegY, @@ -955,7 +955,7 @@ ImageList_DragShowNolock (BOOL bShow) if (!is_valid(InternalDrag.himl)) return FALSE; - + TRACE("bShow=0x%X!\n", bShow); /* DragImage is already visible/hidden */ @@ -1024,7 +1024,7 @@ ImageList_DragShowNolock (BOOL bShow) BOOL WINAPI ImageList_Draw (HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, UINT fStyle) { - return ImageList_DrawEx (himl, i, hdc, x, y, 0, 0, + return ImageList_DrawEx (himl, i, hdc, x, y, 0, 0, CLR_DEFAULT, CLR_DEFAULT, fStyle); } @@ -1144,9 +1144,9 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) if (!hImageListDC || !hImageDC || !hImageBmp || (bBlend && !hBlendMaskBmp) || (himl->hbmMask && !hMaskListDC)) goto cleanup; - + hOldImageBmp = SelectObject(hImageDC, hImageBmp); - + /* * To obtain a transparent look, background color should be set * to white and foreground color to black when blting the @@ -2291,8 +2291,6 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon) return -1; } - if (ii.hbmColor == 0) - ERR("no color!\n"); ret = GetObjectW (ii.hbmMask, sizeof(BITMAP), (LPVOID)&bmp); if (!ret) { ERR("couldn't get mask bitmap info\n"); @@ -2317,18 +2315,32 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon) if (hdcImage == 0) ERR("invalid hdcImage!\n"); + imagelist_point_from_index(himl, nIndex, &pt); + SetTextColor(himl->hdcImage, RGB(0,0,0)); SetBkColor (himl->hdcImage, RGB(255,255,255)); - hbmOldSrc = SelectObject (hdcImage, ii.hbmColor); - imagelist_point_from_index(himl, nIndex, &pt); - StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, - hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); - - if (himl->hbmMask) { - SelectObject (hdcImage, ii.hbmMask); - StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy, - hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); + if (ii.hbmColor) + { + hbmOldSrc = SelectObject (hdcImage, ii.hbmColor); + StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, + hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); + if (himl->hbmMask) + { + SelectObject (hdcImage, ii.hbmMask); + StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy, + hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); + } + } + else + { + UINT height = bmp.bmHeight / 2; + hbmOldSrc = SelectObject (hdcImage, ii.hbmMask); + StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, + hdcImage, 0, height, bmp.bmWidth, height, SRCCOPY); + if (himl->hbmMask) + StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy, + hdcImage, 0, 0, bmp.bmWidth, height, SRCCOPY); } SelectObject (hdcImage, hbmOldSrc); @@ -2570,8 +2582,6 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount) if (!is_valid(himl)) return FALSE; - if (iImageCount < 0) - return FALSE; if (himl->cMaxImage > iImageCount) { himl->cCurImage = iImageCount; diff --git a/reactos/dll/win32/comctl32/ipaddress.c b/reactos/dll/win32/comctl32/ipaddress.c index 186ed3de861..76e41019e01 100644 --- a/reactos/dll/win32/comctl32/ipaddress.c +++ b/reactos/dll/win32/comctl32/ipaddress.c @@ -22,14 +22,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * NOTE - * + * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. - * + * */ #include @@ -66,7 +66,7 @@ typedef struct IPPART_INFO Part[4]; } IPADDRESS_INFO; -static const WCHAR IP_SUBCLASS_PROP[] = +static const WCHAR IP_SUBCLASS_PROP[] = { 'C', 'C', 'I', 'P', '3', '2', 'S', 'u', 'b', 'c', 'l', 'a', 's', 's', 'I', 'n', 'f', 'o', 0 }; #define POS_DEFAULT 0 @@ -142,10 +142,10 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc) bgCol = COLOR_3DFACE; fgCol = COLOR_GRAYTEXT; } - + FillRect (hdc, &rect, (HBRUSH)(DWORD_PTR)(bgCol+1)); DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); - + SetBkColor (hdc, GetSysColor(bgCol)); SetTextColor(hdc, GetSysColor(fgCol)); diff --git a/reactos/dll/win32/comctl32/listview.c b/reactos/dll/win32/comctl32/listview.c index a44cc448f3f..e551ebe679b 100644 --- a/reactos/dll/win32/comctl32/listview.c +++ b/reactos/dll/win32/comctl32/listview.c @@ -25,11 +25,11 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on May. 20, 2005, by James Hawkins. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. - * + * * TODO: * * Default Message Processing @@ -103,7 +103,7 @@ * -- LVS_EX_TWOCLICKACTIVATE * -- LVS_EX_UNDERLINECOLD * -- LVS_EX_UNDERLINEHOT - * + * * Notifications: * -- LVN_BEGINSCROLL, LVN_ENDSCROLL * -- LVN_GETINFOTIP @@ -258,7 +258,7 @@ typedef struct tagLISTVIEW_INFO HIMAGELIST himlState; BOOL bLButtonDown; BOOL bRButtonDown; - POINT ptClickPos; /* point where the user clicked */ + POINT ptClickPos; /* point where the user clicked */ BOOL bNoItemMetrics; /* flags if item metrics are not yet computed */ INT nItemHeight; INT nItemWidth; @@ -268,8 +268,8 @@ typedef struct tagLISTVIEW_INFO SHORT notifyFormat; HWND hwndNotify; RECT rcList; /* This rectangle is really the window - * client rectangle possibly reduced by the - * horizontal scroll bar and/or header - see + * client rectangle possibly reduced by the + * horizontal scroll bar and/or header - see * LISTVIEW_UpdateSize. This rectangle offset * by the LISTVIEW_GetOrigin value is in * client coordinates */ @@ -502,7 +502,7 @@ static inline void textfreeT(LPWSTR wstr, BOOL isW) static BOOL textsetptrT(LPWSTR *dest, LPCWSTR src, BOOL isW) { BOOL bResult = TRUE; - + if (src == LPSTR_TEXTCALLBACKW) { if (is_textW(*dest)) Free(*dest); @@ -533,11 +533,11 @@ static inline int textcmpWT(LPCWSTR aw, LPCWSTR bt, BOOL isW) int r = bw ? lstrcmpW(aw, bw) : 1; textfreeT(bw, isW); return r; - } - + } + return 1; } - + static inline int lstrncmpiW(LPCWSTR s1, LPCWSTR s2, int n) { int res; @@ -572,7 +572,7 @@ static char* debug_getbuf(void) static inline const char* debugrange(const RANGE *lprng) { if (!lprng) return "(null)"; - return wine_dbg_sprintf("[%d, %d)", lprng->lower, lprng->upper); + return wine_dbg_sprintf("[%d, %d]", lprng->lower, lprng->upper); } static const char* debugscrollinfo(const SCROLLINFO *pScrollInfo) @@ -605,7 +605,7 @@ end: undo: if (buf - text > 2) { buf[-2] = '}'; buf[-1] = 0; } return text; -} +} static const char* debugnmlistview(const NMLISTVIEW *plvnm) { @@ -620,7 +620,7 @@ static const char* debuglvitem_t(const LVITEMW *lpLVItem, BOOL isW) { char* buf = debug_getbuf(), *text = buf; int len, size = DEBUG_BUFFER_SIZE; - + if (lpLVItem == NULL) return "(null)"; len = snprintf(buf, size, "{iItem=%d, iSubItem=%d, ", lpLVItem->iItem, lpLVItem->iSubItem); if (len == -1) goto end; buf += len; size -= len; @@ -656,7 +656,7 @@ static const char* debuglvcolumn_t(const LVCOLUMNW *lpColumn, BOOL isW) { char* buf = debug_getbuf(), *text = buf; int len, size = DEBUG_BUFFER_SIZE; - + if (lpColumn == NULL) return "(null)"; len = snprintf(buf, size, "{"); if (len == -1) goto end; buf += len; size -= len; @@ -729,7 +729,7 @@ static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, const NMHEADE static LRESULT notify_hdr(const LISTVIEW_INFO *infoPtr, INT code, LPNMHDR pnmh) { LRESULT result; - + TRACE("(code=%d)\n", code); pnmh->hwndFrom = infoPtr->hwndSelf; @@ -761,7 +761,7 @@ static inline void notify_itemactivate(const LISTVIEW_INFO *infoPtr, const LVHIT nmia.uOldState = 0; nmia.uChanged = 0; nmia.uKeyFlags = 0; - + item.mask = LVIF_PARAM|LVIF_STATE; item.iItem = htInfo->iItem; item.iSubItem = 0; @@ -771,11 +771,11 @@ static inline void notify_itemactivate(const LISTVIEW_INFO *infoPtr, const LVHIT nmia.uNewState = item.state | LVIS_ACTIVATING; nmia.uChanged = LVIF_STATE; } - + nmia.iItem = htInfo->iItem; nmia.iSubItem = htInfo->iSubItem; - nmia.ptAction = htInfo->pt; - + nmia.ptAction = htInfo->pt; + if (GetKeyState(VK_SHIFT) & 0x8000) nmia.uKeyFlags |= LVKF_SHIFT; if (GetKeyState(VK_CONTROL) & 0x8000) nmia.uKeyFlags |= LVKF_CONTROL; if (GetKeyState(VK_MENU) & 0x8000) nmia.uKeyFlags |= LVKF_ALT; @@ -795,7 +795,7 @@ static BOOL notify_click(const LISTVIEW_INFO *infoPtr, INT code, const LVHITTEST LVITEMW item; HWND hwnd = infoPtr->hwndSelf; - TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht)); + TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht)); ZeroMemory(&nmlv, sizeof(nmlv)); nmlv.iItem = lvht->iItem; nmlv.iSubItem = lvht->iSubItem; @@ -936,7 +936,7 @@ static inline DWORD notify_customdraw (const LISTVIEW_INFO *infoPtr, DWORD dwDra DWORD result; lpnmlvcd->nmcd.dwDrawStage = dwDrawStage; - if (isForItem) lpnmlvcd->nmcd.dwDrawStage |= CDDS_ITEM; + if (isForItem) lpnmlvcd->nmcd.dwDrawStage |= CDDS_ITEM; if (lpnmlvcd->iSubItem) lpnmlvcd->nmcd.dwDrawStage |= CDDS_SUBITEM; if (isForItem) lpnmlvcd->nmcd.dwItemSpec--; result = notify_hdr(infoPtr, NM_CUSTOMDRAW, &lpnmlvcd->nmcd.hdr); @@ -1023,10 +1023,10 @@ static inline BOOL ranges_delitem(RANGES ranges, INT nItem) * Note that it is important that the code destroys the iterator * after it's done with it, as the creation of the iterator may * allocate memory, which thus needs to be freed. - * + * * You can iterate both forwards, and backwards through the list, * by using iterator_next or iterator_prev respectively. - * + * * Lower numbered items are draw on top of higher number items in * LVS_ICON, and LVS_SMALLICON (which are the only modes where * items may overlap). So, to test items, you should use @@ -1050,7 +1050,7 @@ static inline BOOL ranges_delitem(RANGES ranges, INT nItem) * which sits at the start of the list. This is used in * LVS_ICON, and LVS_SMALLICON mode to handle the focused item, * which needs to be first, as it may overlap other items. - * + * * The code is a bit messy because we have: * - a special item to deal with * - simple range, or composite range @@ -1205,7 +1205,7 @@ static BOOL iterator_frameditems(ITERATOR* i, const LISTVIEW_INFO* infoPtr, cons UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; RECT frame = *lprc, rcItem, rcTemp; POINT Origin; - + /* in case we fail, we want to return an empty iterator */ if (!iterator_empty(i)) return FALSE; @@ -1217,7 +1217,7 @@ static BOOL iterator_frameditems(ITERATOR* i, const LISTVIEW_INFO* infoPtr, cons if (uView == LVS_ICON || uView == LVS_SMALLICON) { INT nItem; - + if (uView == LVS_ICON && infoPtr->nFocusedItem != -1) { LISTVIEW_GetItemBox(infoPtr, infoPtr->nFocusedItem, &rcItem); @@ -1241,10 +1241,10 @@ static BOOL iterator_frameditems(ITERATOR* i, const LISTVIEW_INFO* infoPtr, cons else if (uView == LVS_REPORT) { RANGE range; - + if (frame.left >= infoPtr->nItemWidth) return TRUE; if (frame.top >= infoPtr->nItemHeight * infoPtr->nItemCount) return TRUE; - + range.lower = max(frame.top / infoPtr->nItemHeight, 0); range.upper = min((frame.bottom - 1) / infoPtr->nItemHeight, infoPtr->nItemCount - 1) + 1; if (range.upper <= range.lower) return TRUE; @@ -1264,7 +1264,7 @@ static BOOL iterator_frameditems(ITERATOR* i, const LISTVIEW_INFO* infoPtr, cons TRACE("nPerCol=%d, nFirstRow=%d, nLastRow=%d, nFirstCol=%d, nLastCol=%d, lower=%d\n", nPerCol, nFirstRow, nLastRow, nFirstCol, nLastCol, lower); - + if (nLastCol < nFirstCol || nLastRow < nFirstRow) return TRUE; if (!(iterator_rangesitems(i, ranges_create(nLastCol - nFirstCol + 1)))) return FALSE; @@ -1290,7 +1290,7 @@ static BOOL iterator_visibleitems(ITERATOR *i, const LISTVIEW_INFO *infoPtr, HDC POINT Origin, Position; RECT rcItem, rcClip; INT rgntype; - + rgntype = GetClipBox(hdc, &rcClip); if (rgntype == NULLREGION) return iterator_empty(i); if (!iterator_frameditems(i, infoPtr, &rcClip)) return FALSE; @@ -1302,7 +1302,7 @@ static BOOL iterator_visibleitems(ITERATOR *i, const LISTVIEW_INFO *infoPtr, HDC LISTVIEW_GetItemBox(infoPtr, i->nSpecial, &rcItem); if (!RectVisible(hdc, &rcItem)) i->nSpecial = -1; } - + /* if we can't deal with the region, we'll just go with the simple range */ LISTVIEW_GetOrigin(infoPtr, &Origin); TRACE("building visible range:\n"); @@ -1330,7 +1330,7 @@ static BOOL iterator_visibleitems(ITERATOR *i, const LISTVIEW_INFO *infoPtr, HDC } /* the iterator should restart on the next iterator_next */ TRACE("done\n"); - + return TRUE; } @@ -1346,7 +1346,7 @@ static inline LRESULT CallWindowProcT(WNDPROC proc, HWND hwnd, UINT uMsg, static inline BOOL is_autoarrange(const LISTVIEW_INFO *infoPtr) { UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; - + return ((infoPtr->dwStyle & LVS_AUTOARRANGE) || infoPtr->bAutoarrange) && (uView == LVS_ICON || uView == LVS_SMALLICON); } @@ -1361,12 +1361,12 @@ static inline COLUMN_INFO * LISTVIEW_GetColumnInfo(const LISTVIEW_INFO *infoPtr, assert (nSubItem >= 0 && nSubItem < DPA_GetPtrCount(infoPtr->hdpaColumns)); return (COLUMN_INFO *)DPA_GetPtr(infoPtr->hdpaColumns, nSubItem); } - + static inline void LISTVIEW_GetHeaderRect(const LISTVIEW_INFO *infoPtr, INT nSubItem, LPRECT lprc) { *lprc = LISTVIEW_GetColumnInfo(infoPtr, nSubItem)->rcHeader; } - + static inline BOOL LISTVIEW_GetItemW(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem) { return LISTVIEW_GetItemT(infoPtr, lpLVItem, TRUE); @@ -1381,7 +1381,7 @@ static inline BOOL is_redrawing(const LISTVIEW_INFO *infoPtr) static inline void LISTVIEW_InvalidateRect(const LISTVIEW_INFO *infoPtr, const RECT* rect) { - if(!is_redrawing(infoPtr)) return; + if(!is_redrawing(infoPtr)) return; TRACE(" invalidating rect=%s\n", wine_dbgstr_rect(rect)); InvalidateRect(infoPtr->hwndSelf, rect, TRUE); } @@ -1390,7 +1390,7 @@ static inline void LISTVIEW_InvalidateItem(const LISTVIEW_INFO *infoPtr, INT nIt { RECT rcBox; - if(!is_redrawing(infoPtr)) return; + if(!is_redrawing(infoPtr)) return; LISTVIEW_GetItemBox(infoPtr, nItem, &rcBox); LISTVIEW_InvalidateRect(infoPtr, &rcBox); } @@ -1399,8 +1399,8 @@ static inline void LISTVIEW_InvalidateSubItem(const LISTVIEW_INFO *infoPtr, INT { POINT Origin, Position; RECT rcBox; - - if(!is_redrawing(infoPtr)) return; + + if(!is_redrawing(infoPtr)) return; assert ((infoPtr->dwStyle & LVS_TYPEMASK) == LVS_REPORT); LISTVIEW_GetOrigin(infoPtr, &Origin); LISTVIEW_GetItemOrigin(infoPtr, nItem, &Position); @@ -1419,8 +1419,8 @@ static inline void LISTVIEW_InvalidateList(const LISTVIEW_INFO *infoPtr) static inline void LISTVIEW_InvalidateColumn(const LISTVIEW_INFO *infoPtr, INT nColumn) { RECT rcCol; - - if(!is_redrawing(infoPtr)) return; + + if(!is_redrawing(infoPtr)) return; LISTVIEW_GetHeaderRect(infoPtr, nColumn, &rcCol); rcCol.top = infoPtr->rcList.top; rcCol.bottom = infoPtr->rcList.bottom; @@ -1672,7 +1672,7 @@ static void LISTVIEW_UpdateScroll(const LISTVIEW_INFO *infoPtr) if (LISTVIEW_GetViewRect(infoPtr, &rcView)) horzInfo.nMax = rcView.right - rcView.left; } - + horzInfo.fMask = SIF_RANGE | SIF_PAGE; horzInfo.nMax = max(horzInfo.nMax - 1, 0); dx = GetScrollPos(infoPtr->hwndSelf, SB_HORZ); @@ -1691,7 +1691,7 @@ static void LISTVIEW_UpdateScroll(const LISTVIEW_INFO *infoPtr) if (uView == LVS_REPORT) { vertInfo.nMax = infoPtr->nItemCount; - + /* scroll by at least one page */ if(vertInfo.nPage < infoPtr->nItemHeight) vertInfo.nPage = infoPtr->nItemHeight; @@ -1732,7 +1732,7 @@ static void LISTVIEW_UpdateScroll(const LISTVIEW_INFO *infoPtr) /*** * DESCRIPTION: - * Shows/hides the focus rectangle. + * Shows/hides the focus rectangle. * * PARAMETER(S): * [I] infoPtr : valid pointer to the listview structure @@ -1755,7 +1755,7 @@ static void LISTVIEW_ShowFocusRect(const LISTVIEW_INFO *infoPtr, BOOL fShow) { RECT rcBox; - LISTVIEW_GetItemBox(infoPtr, infoPtr->nFocusedItem, &rcBox); + LISTVIEW_GetItemBox(infoPtr, infoPtr->nFocusedItem, &rcBox); if ((rcBox.bottom - rcBox.top) > infoPtr->nItemHeight) { LISTVIEW_InvalidateRect(infoPtr, &rcBox); @@ -1778,8 +1778,8 @@ static void LISTVIEW_ShowFocusRect(const LISTVIEW_INFO *infoPtr, BOOL fShow) item.iSubItem = 0; item.mask = LVIF_PARAM; if (!LISTVIEW_GetItemW(infoPtr, &item)) goto done; - - ZeroMemory(&dis, sizeof(dis)); + + ZeroMemory(&dis, sizeof(dis)); dis.CtlType = ODT_LISTVIEW; dis.CtlID = (UINT)GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID); dis.itemID = item.iItem; @@ -1807,9 +1807,9 @@ done: */ static void LISTVIEW_InvalidateSelectedItems(const LISTVIEW_INFO *infoPtr) { - ITERATOR i; - - iterator_frameditems(&i, infoPtr, &infoPtr->rcList); + ITERATOR i; + + iterator_frameditems(&i, infoPtr, &infoPtr->rcList); while(iterator_next(&i)) { if (LISTVIEW_GetItemState(infoPtr, i.nItem, LVIS_SELECTED)) @@ -1818,7 +1818,7 @@ static void LISTVIEW_InvalidateSelectedItems(const LISTVIEW_INFO *infoPtr) iterator_destroy(&i); } - + /*** * DESCRIPTION: [INTERNAL] * Computes an item's (left,top) corner, relative to rcView. @@ -1827,7 +1827,7 @@ static void LISTVIEW_InvalidateSelectedItems(const LISTVIEW_INFO *infoPtr) * over again, when this function is call in a loop. Instead, * one ca factor the computation of the Origin before the loop, * and offset the value retured by this function, on every iteration. - * + * * PARAMETER(S): * [I] infoPtr : valid pointer to the listview structure * [I] nItem : item number @@ -1859,7 +1859,7 @@ static void LISTVIEW_GetItemOrigin(const LISTVIEW_INFO *infoPtr, INT nItem, LPPO lpptPosition->y = nItem * infoPtr->nItemHeight; } } - + /*** * DESCRIPTION: [INTERNAL] * Compute the rectangles of an item. This is to localize all @@ -1936,7 +1936,7 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW if (lpLVItem->iSubItem || uView == LVS_REPORT) lpColumnInfo = LISTVIEW_GetColumnInfo(infoPtr, lpLVItem->iSubItem); - if (lpLVItem->iSubItem) + if (lpLVItem->iSubItem) { Box = lpColumnInfo->rcHeader; } @@ -2020,7 +2020,7 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW labelSize.cy = infoPtr->nItemHeight; goto calc_label; } - + /* we need the text in non owner draw mode */ assert(lpLVItem->mask & LVIF_TEXT); if (is_textT(lpLVItem->pszText, TRUE)) @@ -2035,7 +2035,7 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW SetRectEmpty(&rcText); rcText.right = infoPtr->nItemWidth - TRAILING_LABEL_PADDING; rcText.bottom = infoPtr->nItemHeight; - if (uView == LVS_ICON) + if (uView == LVS_ICON) rcText.bottom -= ICON_TOP_PADDING + infoPtr->iconSize.cy + ICON_BOTTOM_PADDING; /* now figure out the flags */ @@ -2043,7 +2043,7 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW uFormat = oversizedBox ? LV_FL_DT_FLAGS : LV_ML_DT_FLAGS; else uFormat = LV_SL_DT_FLAGS; - + DrawTextW (hdc, lpLVItem->pszText, -1, &rcText, uFormat | DT_CALCRECT); labelSize.cx = min(rcText.right - rcText.left + TRAILING_LABEL_PADDING, infoPtr->nItemWidth); @@ -2084,7 +2084,7 @@ calc_label: Label.right = min(Label.left + labelSize.cx, Label.right); Label.bottom = Label.top + infoPtr->nItemHeight; } - + if (lprcLabel) *lprcLabel = Label; TRACE(" - label=%s\n", wine_dbgstr_rect(&Label)); } @@ -2181,9 +2181,9 @@ static void LISTVIEW_GetItemBox(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT static void LISTVIEW_NextIconPosTop(LISTVIEW_INFO *infoPtr, LPPOINT lpPos) { INT nListWidth = infoPtr->rcList.right - infoPtr->rcList.left; - + *lpPos = infoPtr->currIconPos; - + infoPtr->currIconPos.x += infoPtr->nItemWidth; if (infoPtr->currIconPos.x + infoPtr->nItemWidth <= nListWidth) return; @@ -2191,7 +2191,7 @@ static void LISTVIEW_NextIconPosTop(LISTVIEW_INFO *infoPtr, LPPOINT lpPos) infoPtr->currIconPos.y += infoPtr->nItemHeight; } - + /*** * DESCRIPTION: * Returns the current icon position, and advances it down the left edge. @@ -2207,9 +2207,9 @@ static void LISTVIEW_NextIconPosTop(LISTVIEW_INFO *infoPtr, LPPOINT lpPos) static void LISTVIEW_NextIconPosLeft(LISTVIEW_INFO *infoPtr, LPPOINT lpPos) { INT nListHeight = infoPtr->rcList.bottom - infoPtr->rcList.top; - + *lpPos = infoPtr->currIconPos; - + infoPtr->currIconPos.y += infoPtr->nItemHeight; if (infoPtr->currIconPos.y + infoPtr->nItemHeight <= nListHeight) return; @@ -2217,7 +2217,7 @@ static void LISTVIEW_NextIconPosLeft(LISTVIEW_INFO *infoPtr, LPPOINT lpPos) infoPtr->currIconPos.y = 0; } - + /*** * DESCRIPTION: * Moves an icon to the specified position. @@ -2236,12 +2236,12 @@ static void LISTVIEW_NextIconPosLeft(LISTVIEW_INFO *infoPtr, LPPOINT lpPos) static BOOL LISTVIEW_MoveIconTo(const LISTVIEW_INFO *infoPtr, INT nItem, const POINT *lppt, BOOL isNew) { POINT old; - + if (!isNew) - { + { old.x = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosX, nItem); old.y = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosY, nItem); - + if (lppt->x == old.x && lppt->y == old.y) return TRUE; LISTVIEW_InvalidateItem(infoPtr, nItem); } @@ -2276,7 +2276,7 @@ static BOOL LISTVIEW_Arrange(LISTVIEW_INFO *infoPtr, INT nAlignCode) INT i; if (uView != LVS_ICON && uView != LVS_SMALLICON) return FALSE; - + TRACE("nAlignCode=%d\n", nAlignCode); if (nAlignCode == LVA_DEFAULT) @@ -2284,7 +2284,7 @@ static BOOL LISTVIEW_Arrange(LISTVIEW_INFO *infoPtr, INT nAlignCode) if (infoPtr->dwStyle & LVS_ALIGNLEFT) nAlignCode = LVA_ALIGNLEFT; else nAlignCode = LVA_ALIGNTOP; } - + switch (nAlignCode) { case LVA_ALIGNLEFT: next_pos = LISTVIEW_NextIconPosLeft; break; @@ -2292,7 +2292,7 @@ static BOOL LISTVIEW_Arrange(LISTVIEW_INFO *infoPtr, INT nAlignCode) case LVA_SNAPTOGRID: next_pos = LISTVIEW_NextIconPosTop; break; /* FIXME */ default: return FALSE; } - + infoPtr->bAutoarrange = TRUE; infoPtr->currIconPos.x = infoPtr->currIconPos.y = 0; for (i = 0; i < infoPtr->nItemCount; i++) @@ -2303,7 +2303,7 @@ static BOOL LISTVIEW_Arrange(LISTVIEW_INFO *infoPtr, INT nAlignCode) return TRUE; } - + /*** * DESCRIPTION: * Retrieves the bounding rectangle of all the items, not offset by Origin. @@ -2347,8 +2347,8 @@ static void LISTVIEW_GetAreaRect(const LISTVIEW_INFO *infoPtr, LPRECT lprcView) lprcView->right = x * infoPtr->nItemWidth; lprcView->bottom = y * infoPtr->nItemHeight; break; - - case LVS_REPORT: + + case LVS_REPORT: lprcView->right = infoPtr->nItemWidth; lprcView->bottom = infoPtr->nItemCount * infoPtr->nItemHeight; break; @@ -2374,10 +2374,10 @@ static BOOL LISTVIEW_GetViewRect(const LISTVIEW_INFO *infoPtr, LPRECT lprcView) TRACE("(lprcView=%p)\n", lprcView); if (!lprcView) return FALSE; - + LISTVIEW_GetOrigin(infoPtr, &ptOrigin); - LISTVIEW_GetAreaRect(infoPtr, lprcView); - OffsetRect(lprcView, ptOrigin.x, ptOrigin.y); + LISTVIEW_GetAreaRect(infoPtr, lprcView); + OffsetRect(lprcView, ptOrigin.x, ptOrigin.y); TRACE("lprcView=%s\n", wine_dbgstr_rect(lprcView)); @@ -2445,11 +2445,11 @@ static INT LISTVIEW_CalculateItemWidth(const LISTVIEW_INFO *infoPtr) else /* LVS_SMALLICON, or LVS_LIST */ { INT i; - + for (i = 0; i < infoPtr->nItemCount; i++) nItemWidth = max(LISTVIEW_GetLabelWidth(infoPtr, i), nItemWidth); - if (infoPtr->himlSmall) nItemWidth += infoPtr->iconSize.cx; + if (infoPtr->himlSmall) nItemWidth += infoPtr->iconSize.cx; if (infoPtr->himlState) nItemWidth += infoPtr->iconStateSize.cx; nItemWidth = max(DEFAULT_COLUMN_WIDTH, nItemWidth + WIDTH_PADDING); @@ -2479,7 +2479,7 @@ static INT LISTVIEW_CalculateItemHeight(const LISTVIEW_INFO *infoPtr) nItemHeight = infoPtr->iconSpacing.cy; else { - nItemHeight = infoPtr->ntmHeight; + nItemHeight = infoPtr->ntmHeight; if (infoPtr->himlState) nItemHeight = max(nItemHeight, infoPtr->iconStateSize.cy); if (infoPtr->himlSmall) @@ -2535,10 +2535,10 @@ static void LISTVIEW_SaveTextMetrics(LISTVIEW_INFO *infoPtr) if (GetTextExtentPoint32A(hdc, "...", 3, &sz)) infoPtr->nEllipsisWidth = sz.cx; - + SelectObject(hdc, hOldFont); ReleaseDC(infoPtr->hwndSelf, hdc); - + TRACE("tmHeight=%d\n", infoPtr->ntmHeight); } @@ -2559,14 +2559,14 @@ static void LISTVIEW_SaveTextMetrics(LISTVIEW_INFO *infoPtr) static INT CALLBACK ranges_cmp(LPVOID range1, LPVOID range2, LPARAM flags) { INT cmp; - - if (((RANGE*)range1)->upper <= ((RANGE*)range2)->lower) + + if (((RANGE*)range1)->upper <= ((RANGE*)range2)->lower) cmp = -1; - else if (((RANGE*)range2)->upper <= ((RANGE*)range1)->lower) + else if (((RANGE*)range2)->upper <= ((RANGE*)range1)->lower) cmp = 1; - else + else cmp = 0; - + TRACE("range1=%s, range2=%s, cmp=%d\n", debugrange((RANGE*)range1), debugrange((RANGE*)range2), cmp); return cmp; @@ -2582,7 +2582,7 @@ static void ranges_assert(RANGES ranges, LPCSTR desc, const char *func, int line { INT i; RANGE *prev, *curr; - + TRACE("*** Checking %s:%d:%s ***\n", func, line, desc); assert (ranges); assert (DPA_GetPtrCount(ranges->hdpa) >= 0); @@ -2613,7 +2613,7 @@ static RANGES ranges_create(int count) static void ranges_clear(RANGES ranges) { INT i; - + for(i = 0; i < DPA_GetPtrCount(ranges->hdpa); i++) Free(DPA_GetPtr(ranges->hdpa, i)); DPA_DeleteAllPtrs(ranges->hdpa); @@ -2632,7 +2632,7 @@ static RANGES ranges_clone(RANGES ranges) { RANGES clone; INT i; - + if (!(clone = ranges_create(DPA_GetPtrCount(ranges->hdpa)))) goto fail; for (i = 0; i < DPA_GetPtrCount(ranges->hdpa); i++) @@ -2643,7 +2643,7 @@ static RANGES ranges_clone(RANGES ranges) DPA_SetPtr(clone->hdpa, i, newrng); } return clone; - + fail: TRACE ("clone failed\n"); ranges_destroy(clone); @@ -2680,7 +2680,7 @@ static inline BOOL ranges_contain(RANGES ranges, INT nItem) static INT ranges_itemcount(RANGES ranges) { INT i, count = 0; - + for (i = 0; i < DPA_GetPtrCount(ranges->hdpa); i++) { RANGE *sel = DPA_GetPtr(ranges->hdpa, i); @@ -2721,23 +2721,23 @@ static BOOL ranges_add(RANGES ranges, RANGE range) srchrgn.lower = range.lower - 1; srchrgn.upper = range.upper + 1; index = DPA_Search(ranges->hdpa, &srchrgn, 0, ranges_cmp, 0, DPAS_SORTED); - + if (index == -1) { RANGE *newrgn; TRACE("Adding new range\n"); - /* create the brand new range to insert */ + /* create the brand new range to insert */ newrgn = Alloc(sizeof(RANGE)); if(!newrgn) goto fail; *newrgn = range; - + /* figure out where to insert it */ index = DPA_Search(ranges->hdpa, newrgn, 0, ranges_cmp, 0, DPAS_SORTED | DPAS_INSERTAFTER); TRACE("index=%d\n", index); if (index == -1) index = 0; - + /* and get it over with */ if (DPA_InsertPtr(ranges->hdpa, index, newrgn) == -1) { @@ -2755,26 +2755,26 @@ static BOOL ranges_add(RANGES ranges, RANGE range) chkrgn->lower = min(range.lower, chkrgn->lower); chkrgn->upper = max(range.upper, chkrgn->upper); - + TRACE("New range %s @%d\n", debugrange(chkrgn), index); /* merge now common anges */ fromindex = 0; srchrgn.lower = chkrgn->lower - 1; srchrgn.upper = chkrgn->upper + 1; - + do { mergeindex = DPA_Search(ranges->hdpa, &srchrgn, fromindex, ranges_cmp, 0, 0); if (mergeindex == -1) break; - if (mergeindex == index) + if (mergeindex == index) { fromindex = index + 1; continue; } - + TRACE("Merge with index %i\n", mergeindex); - + mrgrgn = DPA_GetPtr(ranges->hdpa, mergeindex); chkrgn->lower = min(chkrgn->lower, mrgrgn->lower); chkrgn->upper = max(chkrgn->upper, mrgrgn->upper); @@ -2786,7 +2786,7 @@ static BOOL ranges_add(RANGES ranges, RANGE range) ranges_check(ranges, "after add"); return TRUE; - + fail: ranges_check(ranges, "failed add"); return FALSE; @@ -2799,15 +2799,15 @@ static BOOL ranges_del(RANGES ranges, RANGE range) TRACE("(%s)\n", debugrange(&range)); ranges_check(ranges, "before del"); - + /* we don't use DPAS_SORTED here, since we need * * to find the first overlapping range */ index = DPA_Search(ranges->hdpa, &range, 0, ranges_cmp, 0, 0); - while(index != -1) + while(index != -1) { chkrgn = DPA_GetPtr(ranges->hdpa, index); - - TRACE("Matches range %s @%d\n", debugrange(chkrgn), index); + + TRACE("Matches range %s @%d\n", debugrange(chkrgn), index); /* case 1: Same range */ if ( (chkrgn->upper == range.upper) && @@ -2818,7 +2818,7 @@ static BOOL ranges_del(RANGES ranges, RANGE range) } /* case 2: engulf */ else if ( (chkrgn->upper <= range.upper) && - (chkrgn->lower >= range.lower) ) + (chkrgn->lower >= range.lower) ) { DPA_DeletePtr(ranges->hdpa, index); } @@ -2886,7 +2886,7 @@ static BOOL LISTVIEW_DeselectAllSkipItems(LISTVIEW_INFO *infoPtr, RANGES toSkip) lvItem.state = 0; lvItem.stateMask = LVIS_SELECTED; - + /* need to clone the DPA because callbacks can change it */ if (!(clone = ranges_clone(infoPtr->selectionRanges))) return FALSE; iterator_rangesitems(&i, ranges_diff(clone, toSkip)); @@ -2901,7 +2901,7 @@ static BOOL LISTVIEW_DeselectAllSkipItems(LISTVIEW_INFO *infoPtr, RANGES toSkip) static inline BOOL LISTVIEW_DeselectAllSkipItem(LISTVIEW_INFO *infoPtr, INT nItem) { RANGES toSkip; - + if (!(toSkip = ranges_create(1))) return FALSE; if (nItem != -1) ranges_additem(toSkip, nItem); LISTVIEW_DeselectAllSkipItems(infoPtr, toSkip); @@ -2962,7 +2962,7 @@ static inline BOOL LISTVIEW_SetItemFocus(LISTVIEW_INFO *infoPtr, INT nItem) LVITEMW lvItem; if (nItem == infoPtr->nFocusedItem) return FALSE; - + lvItem.state = nItem == -1 ? 0 : LVIS_FOCUSED; lvItem.stateMask = LVIS_FOCUSED; LISTVIEW_SetItemState(infoPtr, nItem == -1 ? infoPtr->nFocusedItem : nItem, &lvItem); @@ -3014,7 +3014,7 @@ static void LISTVIEW_ShiftIndices(LISTVIEW_INFO *infoPtr, INT nItem, INT directi nNewFocus = shift_item(infoPtr, infoPtr->nFocusedItem, nItem, direction); if (nNewFocus != infoPtr->nFocusedItem) LISTVIEW_SetItemFocus(infoPtr, nNewFocus); - + /* But we are not supposed to modify nHotItem! */ infoPtr->bDoChangeNotify = bOldChange; @@ -3093,7 +3093,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) if (!(selection = ranges_create(100))) return; - item.state = LVIS_SELECTED; + item.state = LVIS_SELECTED; item.stateMask = LVIS_SELECTED; if ((uView == LVS_LIST) || (uView == LVS_REPORT)) @@ -3106,7 +3106,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) else { RANGE sel; - + sel.lower = min(infoPtr->nSelectionMark, nItem); sel.upper = max(infoPtr->nSelectionMark, nItem) + 1; ranges_add(selection, sel); @@ -3116,7 +3116,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) { RECT rcItem, rcSel, rcSelMark; POINT ptItem; - + rcItem.left = LVIR_BOUNDS; if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) return; rcSelMark.left = LVIR_BOUNDS; @@ -3144,7 +3144,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) iterator_destroy(&i); infoPtr->bDoChangeNotify = bOldChange; - + LISTVIEW_SetItemFocus(infoPtr, nItem); } @@ -3164,7 +3164,7 @@ static void LISTVIEW_SetSelection(LISTVIEW_INFO *infoPtr, INT nItem) LVITEMW lvItem; TRACE("nItem=%d\n", nItem); - + LISTVIEW_DeselectAllSkipItem(infoPtr, nItem); lvItem.state = LVIS_FOCUSED | LVIS_SELECTED; @@ -3347,14 +3347,14 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN /*** - * Tests wheather the item is assignable to a list with style lStyle + * Tests wheather the item is assignable to a list with style lStyle */ static inline BOOL is_assignable_item(const LVITEMW *lpLVItem, LONG lStyle) { - if ( (lpLVItem->mask & LVIF_TEXT) && + if ( (lpLVItem->mask & LVIF_TEXT) && (lpLVItem->pszText == LPSTR_TEXTCALLBACKW) && (lStyle & (LVS_SORTASCENDING | LVS_SORTDESCENDING)) ) return FALSE; - + return TRUE; } @@ -3385,8 +3385,8 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL TRACE("()\n"); assert(lpLVItem->iItem >= 0 && lpLVItem->iItem < infoPtr->nItemCount); - - if (lpLVItem->mask == 0) return TRUE; + + if (lpLVItem->mask == 0) return TRUE; if (infoPtr->dwStyle & LVS_OWNERDATA) { @@ -3412,7 +3412,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL if (!isNew && !LISTVIEW_GetItemW(infoPtr, &item)) return FALSE; TRACE("oldState=%x, newState=%x\n", item.state, lpLVItem->state); - /* determine what fields will change */ + /* determine what fields will change */ if ((lpLVItem->mask & LVIF_STATE) && ((item.state ^ lpLVItem->state) & lpLVItem->stateMask & ~infoPtr->uCallbackMask)) uChanged |= LVIF_STATE; @@ -3427,18 +3427,18 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL if ((lpLVItem->mask & LVIF_TEXT) && textcmpWT(lpItem->hdr.pszText, lpLVItem->pszText, isW)) uChanged |= LVIF_TEXT; - - TRACE("uChanged=0x%x\n", uChanged); + + TRACE("uChanged=0x%x\n", uChanged); if (!uChanged) return TRUE; *bChanged = TRUE; - + ZeroMemory(&nmlv, sizeof(NMLISTVIEW)); nmlv.iItem = lpLVItem->iItem; nmlv.uNewState = (item.state & ~lpLVItem->stateMask) | (lpLVItem->state & lpLVItem->stateMask); nmlv.uOldState = item.state; nmlv.uChanged = uChanged; nmlv.lParam = item.lParam; - + /* send LVN_ITEMCHANGING notification, if the item is not being inserted */ /* and we are _NOT_ virtual (LVS_OWERNDATA), and change notifications */ /* are enabled */ @@ -3479,7 +3479,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL } else if (lpLVItem->stateMask & LVIS_SELECTED) ranges_delitem(infoPtr->selectionRanges, lpLVItem->iItem); - + /* if we are asked to change focus, and we manage it, do it */ if (lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED) { @@ -3496,7 +3496,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL /* if we're inserting the item, we're done */ if (isNew) return TRUE; - + /* send LVN_ITEMCHANGED notification */ if (lpLVItem->mask & LVIF_PARAM) nmlv.lParam = lpLVItem->lParam; if (infoPtr->bDoChangeNotify) notify_listview(infoPtr, LVN_ITEMCHANGED, &nmlv); @@ -3525,10 +3525,10 @@ static BOOL set_sub_item(const LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, /* we do not support subitems for virtual listviews */ if (infoPtr->dwStyle & LVS_OWNERDATA) return FALSE; - + /* set subitem only if column is present */ if (lpLVItem->iSubItem >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE; - + /* First do some sanity checks */ /* The LVIF_STATE flag is valid for subitems, but does not appear to be particularly useful. We currently do not actually do anything with @@ -3536,11 +3536,11 @@ static BOOL set_sub_item(const LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, */ if (lpLVItem->mask & ~(LVIF_TEXT | LVIF_IMAGE | LVIF_STATE)) return FALSE; if (!(lpLVItem->mask & (LVIF_TEXT | LVIF_IMAGE | LVIF_STATE))) return TRUE; - + /* get the subitem structure, and create it if not there */ hdpaSubItems = (HDPA)DPA_GetPtr(infoPtr->hdpaItems, lpLVItem->iItem); assert (hdpaSubItems); - + lpSubItem = LISTVIEW_GetSubItemPtr(hdpaSubItems, lpLVItem->iSubItem); if (!lpSubItem) { @@ -3564,7 +3564,7 @@ static BOOL set_sub_item(const LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, lpSubItem->hdr.iImage = I_IMAGECALLBACK; *bChanged = TRUE; } - + if (lpLVItem->mask & LVIF_IMAGE) if (lpSubItem->hdr.iImage != lpLVItem->iImage) { @@ -3673,7 +3673,7 @@ static INT LISTVIEW_GetTopIndex(const LISTVIEW_INFO *infoPtr) { if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) nItem = scrollInfo.nPos; - } + } else { if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) @@ -3681,7 +3681,7 @@ static INT LISTVIEW_GetTopIndex(const LISTVIEW_INFO *infoPtr) } TRACE("nItem=%d\n", nItem); - + return nItem; } @@ -3751,7 +3751,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS lvItem.cchTextMax = DISP_TEXT_SIZE; lvItem.pszText = szDispText; if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) return FALSE; - if (nSubItem > 0 && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) + if (nSubItem > 0 && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) lvItem.state = LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED); if (lvItem.pszText == LPSTR_TEXTCALLBACKW) lvItem.pszText = szCallback; TRACE(" lvItem=%s\n", debuglvitem_t(&lvItem, TRUE)); @@ -3832,11 +3832,11 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS if (uView == LVS_REPORT && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) rcSelect.right = rcBox.right; - if (nmlvcd.clrTextBk != CLR_NONE) + if (nmlvcd.clrTextBk != CLR_NONE) ExtTextOutW(hdc, rcSelect.left, rcSelect.top, ETO_OPAQUE, &rcSelect, 0, 0, 0); if(lprcFocus) *lprcFocus = rcSelect; } - + /* figure out the text drawing flags */ uFormat = (uView == LVS_ICON ? (lprcFocus ? LV_FL_DT_FLAGS : LV_ML_DT_FLAGS) : LV_SL_DT_FLAGS); if (uView == LVS_ICON) @@ -3885,14 +3885,14 @@ static void LISTVIEW_RefreshOwnerDraw(const LISTVIEW_INFO *infoPtr, ITERATOR *i, POINT Origin, Position; DRAWITEMSTRUCT dis; LVITEMW item; - + TRACE("()\n"); ZeroMemory(&dis, sizeof(dis)); - + /* Get scroll info once before loop */ LISTVIEW_GetOrigin(infoPtr, &Origin); - + /* iterate through the invalidated rows */ while(iterator_next(i)) { @@ -3901,7 +3901,7 @@ static void LISTVIEW_RefreshOwnerDraw(const LISTVIEW_INFO *infoPtr, ITERATOR *i, item.mask = LVIF_PARAM | LVIF_STATE; item.stateMask = LVIS_SELECTED | LVIS_FOCUSED; if (!LISTVIEW_GetItemW(infoPtr, &item)) continue; - + dis.CtlType = ODT_LISTVIEW; dis.CtlID = uID; dis.itemID = item.iItem; @@ -3927,7 +3927,7 @@ static void LISTVIEW_RefreshOwnerDraw(const LISTVIEW_INFO *infoPtr, ITERATOR *i, customdraw_fill(&nmlvcd, infoPtr, hdc, &dis.rcItem, &item); if (cdmode & CDRF_NOTIFYITEMDRAW) cditemmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd); - + if (!(cditemmode & CDRF_SKIPDEFAULT)) { prepaint_setup (infoPtr, hdc, &nmlvcd); @@ -3964,10 +3964,10 @@ static void LISTVIEW_RefreshReport(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, /* figure out what to draw */ rgntype = GetClipBox(hdc, &rcClip); if (rgntype == NULLREGION) return; - + /* Get scroll info once before loop */ LISTVIEW_GetOrigin(infoPtr, &Origin); - + /* narrow down the columns we need to paint */ for(colRange.lower = 0; colRange.lower < DPA_GetPtrCount(infoPtr->hdpaColumns); colRange.lower++) { @@ -4028,7 +4028,7 @@ static void LISTVIEW_RefreshList(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, D /* Get scroll info once before loop */ LISTVIEW_GetOrigin(infoPtr, &Origin); - + while(iterator_prev(i)) { LISTVIEW_GetItemOrigin(infoPtr, i->nItem, &Position); @@ -4111,7 +4111,7 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra /* FIXME: Shouldn't need to do this */ oldClrTextBk = infoPtr->clrTextBk; oldClrText = infoPtr->clrText; - + infoPtr->cditemmode = CDRF_DODEFAULT; GetClientRect(infoPtr->hwndSelf, &rcClient); @@ -4129,13 +4129,13 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra /* figure out what we need to draw */ iterator_visibleitems(&i, infoPtr, hdc); - + /* send cache hint notification */ if (infoPtr->dwStyle & LVS_OWNERDATA) { RANGE range = iterator_range(&i); NMLVCACHEHINT nmlv; - + ZeroMemory(&nmlv, sizeof(NMLVCACHEHINT)); nmlv.iFrom = range.lower; nmlv.iTo = range.upper - 1; @@ -4156,7 +4156,7 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra DrawFocusRect(hdc, &infoPtr->rcFocus); } iterator_destroy(&i); - + enddraw: if (cdmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); @@ -4313,7 +4313,7 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP rcItem.right = size.cx; rcItem.bottom = size.cy; FillRect(hdc, &rcItem, infoPtr->hBkBrush); - + pos.x = pos.y = 0; if (LISTVIEW_DrawItem(infoPtr, hdc, iItem, 0, pos, infoPtr->cditemmode)) { @@ -4388,11 +4388,11 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr) DPA_DeletePtr(infoPtr->hdpaPosY, i); infoPtr->nItemCount --; } - + LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); LISTVIEW_UpdateScroll(infoPtr); LISTVIEW_InvalidateList(infoPtr); - + return TRUE; } @@ -4414,13 +4414,13 @@ static void LISTVIEW_ScrollColumns(LISTVIEW_INFO *infoPtr, INT nColumn, INT dx) RECT rcOld, rcCol; POINT ptOrigin; INT nCol; - + if (nColumn < 0 || DPA_GetPtrCount(infoPtr->hdpaColumns) < 1) return; lpColumnInfo = LISTVIEW_GetColumnInfo(infoPtr, min(nColumn, DPA_GetPtrCount(infoPtr->hdpaColumns) - 1)); rcCol = lpColumnInfo->rcHeader; if (nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) rcCol.left = rcCol.right; - + /* ajust the other columns */ for (nCol = nColumn; nCol < DPA_GetPtrCount(infoPtr->hdpaColumns); nCol++) { @@ -4431,10 +4431,10 @@ static void LISTVIEW_ScrollColumns(LISTVIEW_INFO *infoPtr, INT nColumn, INT dx) /* do not update screen if not in report mode */ if (!is_redrawing(infoPtr) || (infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return; - + /* if we have a focus, must first erase the focus rect */ if (infoPtr->bFocus) LISTVIEW_ShowFocusRect(infoPtr, FALSE); - + /* Need to reset the item width when inserting a new column */ infoPtr->nItemWidth += dx; @@ -4445,7 +4445,7 @@ static void LISTVIEW_ScrollColumns(LISTVIEW_INFO *infoPtr, INT nColumn, INT dx) rcOld = infoPtr->rcList; rcOld.left = ptOrigin.x + rcCol.left + dx; ScrollWindowEx(infoPtr->hwndSelf, dx, 0, &rcOld, &rcOld, 0, 0, SW_ERASE | SW_INVALIDATE); - + /* we can restore focus now */ if (infoPtr->bFocus) LISTVIEW_ShowFocusRect(infoPtr, TRUE); } @@ -4465,7 +4465,7 @@ static void LISTVIEW_ScrollColumns(LISTVIEW_INFO *infoPtr, INT nColumn, INT dx) static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn) { RECT rcCol; - + TRACE("nColumn=%d\n", nColumn); if (nColumn < 0 || DPA_GetPtrCount(infoPtr->hdpaColumns) == 0 @@ -4477,19 +4477,19 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn) */ LISTVIEW_GetHeaderRect(infoPtr, nColumn, &rcCol); - + if (!Header_DeleteItem(infoPtr->hwndHeader, nColumn)) return FALSE; Free(DPA_GetPtr(infoPtr->hdpaColumns, nColumn)); DPA_DeletePtr(infoPtr->hdpaColumns, nColumn); - + if (!(infoPtr->dwStyle & LVS_OWNERDATA) && nColumn) { SUBITEM_INFO *lpSubItem, *lpDelItem; HDPA hdpaSubItems; INT nItem, nSubItem, i; - + for (nItem = 0; nItem < infoPtr->nItemCount; nItem++) { hdpaSubItems = (HDPA)DPA_GetPtr(infoPtr->hdpaItems, nItem); @@ -4503,13 +4503,13 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn) nSubItem = i; lpDelItem = lpSubItem; } - else if (lpSubItem->iSubItem > nColumn) + else if (lpSubItem->iSubItem > nColumn) { lpSubItem->iSubItem--; } } - /* if we found our subitem, zapp it */ + /* if we found our subitem, zapp it */ if (nSubItem > 0) { /* free string */ @@ -4556,7 +4556,7 @@ static void LISTVIEW_ScrollOnInsert(LISTVIEW_INFO *infoPtr, INT nItem, INT dir) /* if we don't refresh, what's the point of scrolling? */ if (!is_redrawing(infoPtr)) return; - + assert (abs(dir) == 1); /* arrange icons if autoarrange is on */ @@ -4571,14 +4571,14 @@ static void LISTVIEW_ScrollOnInsert(LISTVIEW_INFO *infoPtr, INT nItem, INT dir) /* scrollbars need updating */ LISTVIEW_UpdateScroll(infoPtr); - /* figure out the item's position */ + /* figure out the item's position */ if (uView == LVS_REPORT) nPerCol = infoPtr->nItemCount + 1; else if (uView == LVS_LIST) nPerCol = LISTVIEW_GetCountPerColumn(infoPtr); else /* LVS_ICON, or LVS_SMALLICON */ return; - + nItemCol = nItem / nPerCol; nItemRow = nItem % nPerCol; LISTVIEW_GetOrigin(infoPtr, &Origin); @@ -4593,7 +4593,7 @@ static void LISTVIEW_ScrollOnInsert(LISTVIEW_INFO *infoPtr, INT nItem, INT dir) if (IntersectRect(&rcScroll, &rcScroll, &infoPtr->rcList)) { TRACE("Scrolling rcScroll=%s, rcList=%s\n", wine_dbgstr_rect(&rcScroll), wine_dbgstr_rect(&infoPtr->rcList)); - ScrollWindowEx(infoPtr->hwndSelf, 0, dir * infoPtr->nItemHeight, + ScrollWindowEx(infoPtr->hwndSelf, 0, dir * infoPtr->nItemHeight, &rcScroll, &rcScroll, 0, 0, SW_ERASE | SW_INVALIDATE); } @@ -4631,26 +4631,26 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) TRACE("(nItem=%d)\n", nItem); if (nItem < 0 || nItem >= infoPtr->nItemCount) return FALSE; - + /* remove selection, and focus */ item.state = 0; item.stateMask = LVIS_SELECTED | LVIS_FOCUSED; LISTVIEW_SetItemState(infoPtr, nItem, &item); - + /* send LVN_DELETEITEM notification. */ if (!notify_deleteitem(infoPtr, nItem)) return FALSE; - /* we need to do this here, because we'll be deleting stuff */ + /* we need to do this here, because we'll be deleting stuff */ if (uView == LVS_SMALLICON || uView == LVS_ICON) LISTVIEW_InvalidateItem(infoPtr, nItem); - + if (!(infoPtr->dwStyle & LVS_OWNERDATA)) { HDPA hdpaSubItems; ITEMHDR *hdrItem; INT i; - hdpaSubItems = (HDPA)DPA_DeletePtr(infoPtr->hdpaItems, nItem); + hdpaSubItems = (HDPA)DPA_DeletePtr(infoPtr->hdpaItems, nItem); for (i = 0; i < DPA_GetPtrCount(hdpaSubItems); i++) { hdrItem = (ITEMHDR *)DPA_GetPtr(hdpaSubItems, i); @@ -4772,7 +4772,7 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW) rect.left = LVIR_LABEL; if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rect)) return 0; - + ZeroMemory(&dispInfo, sizeof(dispInfo)); dispInfo.item.mask = LVIF_PARAM | LVIF_STATE | LVIF_TEXT; dispInfo.item.iItem = nItem; @@ -4785,7 +4785,7 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW) infoPtr->hwndEdit = CreateEditLabelT(infoPtr, dispInfo.item.pszText, WS_VISIBLE, rect.left-2, rect.top-1, 0, rect.bottom - rect.top+2, isW); if (!infoPtr->hwndEdit) return 0; - + if (notify_dispinfoT(infoPtr, LVN_BEGINLABELEDITW, &dispInfo, isW)) { if (!IsWindow(hwndSelf)) @@ -4830,7 +4830,7 @@ static BOOL LISTVIEW_EnsureVisible(LISTVIEW_INFO *infoPtr, INT nItem, BOOL bPart if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) return FALSE; if (bPartial && IntersectRect(&rcTemp, &infoPtr->rcList, &rcItem)) return TRUE; - + if (rcItem.left < infoPtr->rcList.left || rcItem.right > infoPtr->rcList.right) { /* scroll left/right, but in LVS_REPORT mode */ @@ -4915,7 +4915,7 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart, LVITEMW lvItem; if (!lpFindInfo || nItem < 0) return -1; - + lvItem.mask = 0; if (lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL)) { @@ -4927,12 +4927,12 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart, if (lpFindInfo->flags & LVFI_WRAP) bWrap = TRUE; - if ((lpFindInfo->flags & LVFI_NEARESTXY) && + if ((lpFindInfo->flags & LVFI_NEARESTXY) && (uView == LVS_ICON || uView ==LVS_SMALLICON)) { POINT Origin; RECT rcArea; - + LISTVIEW_GetOrigin(infoPtr, &Origin); Destination.x = lpFindInfo->pt.x - Origin.x; Destination.y = lpFindInfo->pt.y - Origin.y; @@ -4947,8 +4947,8 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart, case VK_PRIOR: Destination.y -= infoPtr->rcList.bottom - infoPtr->rcList.top; break; case VK_END: LISTVIEW_GetAreaRect(infoPtr, &rcArea); - Destination.x = rcArea.right; - Destination.y = rcArea.bottom; + Destination.x = rcArea.right; + Destination.y = rcArea.bottom; break; default: ERR("Unknown vkDirection=%d\n", lpFindInfo->vkDirection); } @@ -4978,7 +4978,7 @@ again: else continue; } - + if (lvItem.mask & LVIF_TEXT) { if (lpFindInfo->flags & LVFI_PARTIAL) @@ -4992,7 +4992,7 @@ again: } if (!bNearest) return nItem; - + /* This is very inefficient. To do a good job here, * we need a sorted array of (x,y) item positions */ LISTVIEW_GetItemOrigin(infoPtr, nItem, &Position); @@ -5040,11 +5040,12 @@ static INT LISTVIEW_FindItemA(const LISTVIEW_INFO *infoPtr, INT nStart, BOOL hasText = lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL); LVFINDINFOW fiw; INT res; + LPWSTR strW; memcpy(&fiw, lpFindInfo, sizeof(fiw)); - if (hasText) fiw.psz = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE); + if (hasText) fiw.psz = strW = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE); res = LISTVIEW_FindItemW(infoPtr, nStart, &fiw); - if (hasText) textfreeT((LPWSTR)fiw.psz, FALSE); + if (hasText) textfreeT(strW, FALSE); return res; } @@ -5312,7 +5313,7 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, if (lpLVItem->mask & LVIF_TEXT) { dispInfo.item.pszText = lpLVItem->pszText; - dispInfo.item.cchTextMax = lpLVItem->cchTextMax; + dispInfo.item.cchTextMax = lpLVItem->cchTextMax; } if (lpLVItem->mask & LVIF_STATE) dispInfo.item.stateMask = lpLVItem->stateMask & infoPtr->uCallbackMask; @@ -5335,15 +5336,15 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, } TRACE(" getdispinfo(1):lpLVItem=%s\n", debuglvitem_t(lpLVItem, isW)); } - + /* make sure lParam is zeroed out */ if (lpLVItem->mask & LVIF_PARAM) lpLVItem->lParam = 0; - + /* we store only a little state, so if we're not asked, we're done */ if (!(lpLVItem->mask & LVIF_STATE) || isubitem) return TRUE; /* if focus is handled by us, report it */ - if ( lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED ) + if ( lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED ) { lpLVItem->state &= ~LVIS_FOCUSED; if (infoPtr->nFocusedItem == lpLVItem->iItem) @@ -5351,13 +5352,13 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, } /* and do the same for selection, if we handle it */ - if ( lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_SELECTED ) + if ( lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_SELECTED ) { lpLVItem->state &= ~LVIS_SELECTED; if (ranges_contain(infoPtr->selectionRanges, lpLVItem->iItem)) lpLVItem->state |= LVIS_SELECTED; } - + return TRUE; } @@ -5385,7 +5386,7 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, dispInfo.item.mask |= LVIF_STATE; dispInfo.item.stateMask = infoPtr->uCallbackMask; } - + /* Do we need to enquire about the image? */ if ((lpLVItem->mask & LVIF_IMAGE) && pItemHdr->iImage == I_IMAGECALLBACK && (isubitem == 0 || (infoPtr->dwLvExStyle & LVS_EX_SUBITEMIMAGES))) @@ -5468,18 +5469,18 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, lpLVItem->state &= ~dispInfo.item.stateMask; lpLVItem->state |= (dispInfo.item.state & dispInfo.item.stateMask); } - if ( lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED ) + if ( lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED ) { lpLVItem->state &= ~LVIS_FOCUSED; if (infoPtr->nFocusedItem == lpLVItem->iItem) lpLVItem->state |= LVIS_FOCUSED; } - if ( lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_SELECTED ) + if ( lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_SELECTED ) { lpLVItem->state &= ~LVIS_SELECTED; if (ranges_contain(infoPtr->selectionRanges, lpLVItem->iItem)) lpLVItem->state |= LVIS_SELECTED; - } + } } /* and last, but not least, the indent field */ @@ -5559,7 +5560,7 @@ static BOOL LISTVIEW_GetItemPosition(const LISTVIEW_INFO *infoPtr, INT nItem, LP } lpptPosition->x += Origin.x; lpptPosition->y += Origin.y; - + TRACE (" lpptPosition=%s\n", wine_dbgstr_point(lpptPosition)); return TRUE; } @@ -5708,11 +5709,11 @@ static BOOL LISTVIEW_GetItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT * [IO] lprc : rectangle to receive the output * on input, lprc->top = nSubItem * lprc->left = LVIR_ICON | LVIR_BOUNDS | LVIR_LABEL - * + * * NOTE: for subItem = 0, we should return the bounds of the _entire_ item, * not only those of the first column. * Fortunately, LISTVIEW_GetItemMetrics does the right thing. - * + * * RETURN: * TRUE: success * FALSE: failure @@ -5722,7 +5723,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR POINT Position; LVITEMW lvItem; INT nColumn; - + if (!lprc) return FALSE; nColumn = lprc->top; @@ -5741,7 +5742,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR lvItem.mask = 0; lvItem.iItem = nItem; lvItem.iSubItem = nColumn; - + if (lvItem.mask && !LISTVIEW_GetItemW(infoPtr, &lvItem)) return FALSE; switch(lprc->left) { @@ -5788,7 +5789,7 @@ static INT LISTVIEW_GetLabelWidth(const LISTVIEW_INFO *infoPtr, INT nItem) lvItem.pszText = szDispText; lvItem.cchTextMax = DISP_TEXT_SIZE; if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) return 0; - + return LISTVIEW_GetStringWidthT(infoPtr, lvItem.pszText, TRUE); } @@ -5912,14 +5913,14 @@ static INT LISTVIEW_GetNextItem(const LISTVIEW_INFO *infoPtr, INT nItem, UINT uF if (uFlags & LVNI_SELECTED) uMask |= LVIS_SELECTED; - /* if we're asked for the focused item, that's only one, + /* if we're asked for the focused item, that's only one, * so it's worth optimizing */ if (uFlags & LVNI_FOCUSED) { if ((LISTVIEW_GetItemState(infoPtr, infoPtr->nFocusedItem, uMask) & uMask) != uMask) return -1; return (infoPtr->nFocusedItem == nItem) ? -1 : infoPtr->nFocusedItem; } - + if (uFlags & LVNI_ABOVE) { if ((uView == LVS_LIST) || (uView == LVS_REPORT)) @@ -6096,9 +6097,9 @@ static void LISTVIEW_GetOrigin(const LISTVIEW_INFO *infoPtr, LPPOINT lpptOrigin) INT nHorzPos = 0, nVertPos = 0; SCROLLINFO scrollInfo; - scrollInfo.cbSize = sizeof(SCROLLINFO); + scrollInfo.cbSize = sizeof(SCROLLINFO); scrollInfo.fMask = SIF_POS; - + if (GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo)) nHorzPos = scrollInfo.nPos; if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) @@ -6112,7 +6113,7 @@ static void LISTVIEW_GetOrigin(const LISTVIEW_INFO *infoPtr, LPPOINT lpptOrigin) nHorzPos *= infoPtr->nItemWidth; else if (uView == LVS_REPORT) nVertPos *= infoPtr->nItemHeight; - + lpptOrigin->x -= nHorzPos; lpptOrigin->y -= nVertPos; @@ -6135,8 +6136,8 @@ static void LISTVIEW_GetOrigin(const LISTVIEW_INFO *infoPtr, LPPOINT lpptOrigin) static INT LISTVIEW_GetStringWidthT(const LISTVIEW_INFO *infoPtr, LPCWSTR lpszText, BOOL isW) { SIZE stringSize; - - stringSize.cx = 0; + + stringSize.cx = 0; if (is_textT(lpszText, isW)) { HFONT hFont = infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont; @@ -6167,7 +6168,7 @@ static INT LISTVIEW_GetStringWidthT(const LISTVIEW_INFO *infoPtr, LPCWSTR lpszTe * (mm 20001022): We must not allow iSubItem to be touched, for * an app might pass only a structure with space up to iItem! * (MS Office 97 does that for instance in the file open dialog) - * + * * RETURN: * SUCCESS : item index * FAILURE : -1 @@ -6181,9 +6182,9 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht, LVITEMW lvItem; ITERATOR i; INT iItem; - + TRACE("(pt=%s, subitem=%d, select=%d)\n", wine_dbgstr_point(&lpht->pt), subitem, select); - + lpht->flags = 0; lpht->iItem = -1; if (subitem) lpht->iSubItem = 0; @@ -6192,7 +6193,7 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht, lpht->flags |= LVHT_TOLEFT; else if (infoPtr->rcList.right < lpht->pt.x) lpht->flags |= LVHT_TORIGHT; - + if (infoPtr->rcList.top > lpht->pt.y) lpht->flags |= LVHT_ABOVE; else if (infoPtr->rcList.bottom < lpht->pt.y) @@ -6204,19 +6205,19 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht, lpht->flags |= LVHT_NOWHERE; LISTVIEW_GetOrigin(infoPtr, &Origin); - + /* first deal with the large items */ rcSearch.left = lpht->pt.x; rcSearch.top = lpht->pt.y; rcSearch.right = rcSearch.left + 1; rcSearch.bottom = rcSearch.top + 1; - + iterator_frameditems(&i, infoPtr, &rcSearch); iterator_next(&i); /* go to first item in the sequence */ iItem = i.nItem; iterator_destroy(&i); - - TRACE("lpht->iItem=%d\n", iItem); + + TRACE("lpht->iItem=%d\n", iItem); if (iItem == -1) return -1; lvItem.mask = LVIF_STATE | LVIF_TEXT; @@ -6234,7 +6235,7 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht, LISTVIEW_GetItemOrigin(infoPtr, iItem, &Position); opt.x = lpht->pt.x - Position.x - Origin.x; opt.y = lpht->pt.y - Position.y - Origin.y; - + if (uView == LVS_REPORT) rcBounds = rcBox; else @@ -6250,8 +6251,8 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht, lpht->flags |= LVHT_ONITEMSTATEICON; if (lpht->flags & LVHT_ONITEM) lpht->flags &= ~LVHT_NOWHERE; - - TRACE("lpht->flags=0x%x\n", lpht->flags); + + TRACE("lpht->flags=0x%x\n", lpht->flags); if (uView == LVS_REPORT && subitem) { INT j; @@ -6304,7 +6305,7 @@ static INT WINAPI LISTVIEW_InsertCompare( LPVOID first, LPVOID second, LPARAM { ITEM_INFO* lv_first = (ITEM_INFO*) DPA_GetPtr( (HDPA)first, 0 ); ITEM_INFO* lv_second = (ITEM_INFO*) DPA_GetPtr( (HDPA)second, 0 ); - INT cmpv = textcmpWT(lv_first->hdr.pszText, lv_second->hdr.pszText, TRUE); + INT cmpv = textcmpWT(lv_first->hdr.pszText, lv_second->hdr.pszText, TRUE); /* if we're sorting descending, negate the return value */ return (((const LISTVIEW_INFO *)lParam)->dwStyle & LVS_SORTDESCENDING) ? -cmpv : cmpv; @@ -6344,7 +6345,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, if (!is_assignable_item(lpLVItem, infoPtr->dwStyle)) return -1; if (!(lpItem = Alloc(sizeof(ITEM_INFO)))) return -1; - + /* insert item in listview control data structure */ if ( !(hdpaSubItems = DPA_Create(8)) ) goto fail; if ( !DPA_SetPtr(hdpaSubItems, 0, lpItem) ) assert (FALSE); @@ -6408,7 +6409,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, goto undo; } } - + /* send LVN_INSERTITEM notification */ ZeroMemory(&nmlv, sizeof(NMLISTVIEW)); nmlv.iItem = nItem; @@ -6461,11 +6462,11 @@ fail: static BOOL LISTVIEW_RedrawItems(const LISTVIEW_INFO *infoPtr, INT nFirst, INT nLast) { INT i; - - if (nLast < nFirst || min(nFirst, nLast) < 0 || + + if (nLast < nFirst || min(nFirst, nLast) < 0 || max(nFirst, nLast) >= infoPtr->nItemCount) return FALSE; - + for (i = nFirst; i <= nLast; i++) LISTVIEW_InvalidateItem(infoPtr, i); @@ -6490,7 +6491,7 @@ static BOOL LISTVIEW_RedrawItems(const LISTVIEW_INFO *infoPtr, INT nFirst, INT n * be scrolled only in line increments. "dy" will be rounded to the * nearest number of pixels that are a whole line. Ex: if line height * is 16 and an 8 is passed, the list will be scrolled by 16. If a 7 - * is passed the the scroll will be 0. (per MSDN 7/2002) + * is passed, then the scroll will be 0. (per MSDN 7/2002) * * For: (per experimentaion with native control and CSpy ListView) * LVS_ICON dy=1 = 1 pixel (vertical only) @@ -6518,11 +6519,11 @@ static BOOL LISTVIEW_Scroll(LISTVIEW_INFO *infoPtr, INT dx, INT dy) default: /* icon */ dx = 0; break; - } + } if (dx != 0) LISTVIEW_HScroll(infoPtr, SB_INTERNAL, dx, 0); if (dy != 0) LISTVIEW_VScroll(infoPtr, SB_INTERNAL, dy, 0); - + return TRUE; } @@ -6656,7 +6657,7 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn, if (!lpColumn || nColumn < 0) return -1; nColumn = min(nColumn, DPA_GetPtrCount(infoPtr->hdpaColumns)); - + ZeroMemory(&hdi, sizeof(HDITEMW)); column_fill_hditem(infoPtr, &hdi, nColumn, lpColumn, isW); @@ -6680,13 +6681,13 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn, } /* insert item in header control */ - nNewColumn = SendMessageW(infoPtr->hwndHeader, + nNewColumn = SendMessageW(infoPtr->hwndHeader, isW ? HDM_INSERTITEMW : HDM_INSERTITEMA, (WPARAM)nColumn, (LPARAM)&hdi); if (nNewColumn == -1) return -1; if (nNewColumn != nColumn) ERR("nColumn=%d, nNewColumn=%d\n", nColumn, nNewColumn); - - /* create our own column info */ + + /* create our own column info */ if (!(lpColumnInfo = Alloc(sizeof(COLUMN_INFO)))) goto fail; if (DPA_InsertPtr(infoPtr->hdpaColumns, nNewColumn, lpColumnInfo) == -1) goto fail; @@ -6699,7 +6700,7 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn, SUBITEM_INFO *lpSubItem; HDPA hdpaSubItems; INT nItem, i; - + for (nItem = 0; nItem < infoPtr->nItemCount; nItem++) { hdpaSubItems = (HDPA)DPA_GetPtr(infoPtr->hdpaItems, nItem); @@ -6715,7 +6716,7 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn, /* make space for the new column */ LISTVIEW_ScrollColumns(infoPtr, nNewColumn + 1, lpColumnInfo->rcHeader.right - lpColumnInfo->rcHeader.left); LISTVIEW_UpdateItemSize(infoPtr); - + return nNewColumn; fail: @@ -6749,7 +6750,7 @@ static BOOL LISTVIEW_SetColumnT(const LISTVIEW_INFO *infoPtr, INT nColumn, BOOL bResult; TRACE("(nColumn=%d, lpColumn=%s, isW=%d)\n", nColumn, debuglvcolumn_t(lpColumn, isW), isW); - + if (!lpColumn || nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE; ZeroMemory(&hdi, sizeof(HDITEMW)); @@ -6770,7 +6771,7 @@ static BOOL LISTVIEW_SetColumnT(const LISTVIEW_INFO *infoPtr, INT nColumn, { COLUMN_INFO *lpColumnInfo = LISTVIEW_GetColumnInfo(infoPtr, nColumn); int oldFmt = lpColumnInfo->fmt; - + lpColumnInfo->fmt = lpColumn->fmt; if ((oldFmt ^ lpColumn->fmt) & (LVCFMT_JUSTIFYMASK | LVCFMT_IMAGE)) { @@ -6836,7 +6837,7 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx) else if (uView == LVS_LIST && cx < 1) return FALSE; /* resize all columns if in LVS_LIST mode */ - if(uView == LVS_LIST) + if(uView == LVS_LIST) { infoPtr->nItemWidth = cx; LISTVIEW_InvalidateList(infoPtr); @@ -6850,7 +6851,7 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx) INT nLabelWidth; LVITEMW lvItem; - lvItem.mask = LVIF_TEXT; + lvItem.mask = LVIF_TEXT; lvItem.iItem = 0; lvItem.iSubItem = nColumn; lvItem.pszText = szDispText; @@ -6872,7 +6873,7 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx) else if(cx == LVSCW_AUTOSIZE_USEHEADER) { /* if iCol is the last column make it fill the remainder of the controls width */ - if(nColumn == DPA_GetPtrCount(infoPtr->hdpaColumns) - 1) + if(nColumn == DPA_GetPtrCount(infoPtr->hdpaColumns) - 1) { RECT rcHeader; POINT Origin; @@ -6953,7 +6954,7 @@ static HIMAGELIST LISTVIEW_CreateCheckBoxIL(const LISTVIEW_INFO *infoPtr) SelectObject(hdc, hbm_im); DrawFrameControl(hdc, &rc, DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_MONO); SelectObject(hdc, hbm_orig); - ImageList_Add(himl, hbm_im, hbm_mask); + ImageList_Add(himl, hbm_im, hbm_mask); SelectObject(hdc, hbm_im); DrawFrameControl(hdc, &rc, DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_MONO | DFCS_CHECKED); @@ -7005,7 +7006,7 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM } LISTVIEW_SetImageList(infoPtr, LVSIL_STATE, himl); } - + if((infoPtr->dwLvExStyle ^ dwOldStyle) & LVS_EX_HEADERDRAGDROP) { DWORD dwStyle = GetWindowLongW(infoPtr->hwndHeader, GWL_STYLE); @@ -7033,7 +7034,7 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM static HCURSOR LISTVIEW_SetHotCursor(LISTVIEW_INFO *infoPtr, HCURSOR hCursor) { HCURSOR oldCursor = infoPtr->hHotCursor; - + infoPtr->hHotCursor = hCursor; return oldCursor; @@ -7055,9 +7056,9 @@ static HCURSOR LISTVIEW_SetHotCursor(LISTVIEW_INFO *infoPtr, HCURSOR hCursor) static INT LISTVIEW_SetHotItem(LISTVIEW_INFO *infoPtr, INT iIndex) { INT iOldIndex = infoPtr->nHotItem; - + infoPtr->nHotItem = iIndex; - + return iOldIndex; } @@ -7076,9 +7077,9 @@ static INT LISTVIEW_SetHotItem(LISTVIEW_INFO *infoPtr, INT iIndex) static DWORD LISTVIEW_SetHoverTime(LISTVIEW_INFO *infoPtr, DWORD dwHoverTime) { DWORD oldHoverTime = infoPtr->dwHoverTime; - + infoPtr->dwHoverTime = dwHoverTime; - + return oldHoverTime; } @@ -7100,10 +7101,10 @@ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy) UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; TRACE("requested=(%d,%d)\n", cx, cy); - + /* this is supported only for LVS_ICON style */ if (uView != LVS_ICON) return oldspacing; - + /* set to defaults, if instructed to */ if (cx == -1) cx = GetSystemMetrics(SM_CXICONSPACING); if (cy == -1) cy = GetSystemMetrics(SM_CYICONSPACING); @@ -7115,16 +7116,16 @@ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy) cx = infoPtr->iconSpacing.cx; /* if 0 then compute height */ - if (cy == 0) + if (cy == 0) cy = infoPtr->iconSize.cy + 2 * infoPtr->ntmHeight + ICON_BOTTOM_PADDING + ICON_TOP_PADDING + LABEL_VERT_PADDING; - + infoPtr->iconSpacing.cx = cx; infoPtr->iconSpacing.cy = cy; TRACE("old=(%d,%d), new=(%d,%d), iconSize=(%d,%d), ntmH=%d\n", - LOWORD(oldspacing), HIWORD(oldspacing), cx, cy, + LOWORD(oldspacing), HIWORD(oldspacing), cx, cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy, infoPtr->ntmHeight); @@ -7137,7 +7138,7 @@ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy) static inline void set_icon_size(SIZE *size, HIMAGELIST himl, BOOL small) { INT cx, cy; - + if (himl && ImageList_GetIconSize(himl, &cx, &cy)) { size->cx = cx; @@ -7254,11 +7255,11 @@ static BOOL LISTVIEW_SetItemCount(LISTVIEW_INFO *infoPtr, INT nItems, DWORD dwFl INT nFrom, nTo; POINT Origin; RECT rcErase; - + LISTVIEW_GetOrigin(infoPtr, &Origin); nFrom = min(nOldCount, nItems); nTo = max(nOldCount, nItems); - + if (uView == LVS_REPORT) { rcErase.left = 0; @@ -7331,11 +7332,11 @@ static BOOL LISTVIEW_SetItemPosition(LISTVIEW_INFO *infoPtr, INT nItem, POINT pt LISTVIEW_GetOrigin(infoPtr, &Origin); /* This point value seems to be an undocumented feature. - * The best guess is that it means either at the origin, + * The best guess is that it means either at the origin, * or at true beginning of the list. I will assume the origin. */ if ((pt.x == -1) && (pt.y == -1)) pt = Origin; - + if (uView == LVS_ICON) { pt.x -= (infoPtr->nItemWidth - infoPtr->iconSize.cx) / 2; @@ -7439,16 +7440,16 @@ static BOOL LISTVIEW_SetItemTextT(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE LVITEMW lvItem; if (nItem < 0 && nItem >= infoPtr->nItemCount) return FALSE; - + lvItem.iItem = nItem; lvItem.iSubItem = lpLVItem->iSubItem; lvItem.mask = LVIF_TEXT; lvItem.pszText = lpLVItem->pszText; lvItem.cchTextMax = lpLVItem->cchTextMax; - + TRACE("(nItem=%d, lpLVItem=%s, isW=%d)\n", nItem, debuglvitem_t(&lvItem, isW), isW); - return LISTVIEW_SetItemT(infoPtr, &lvItem, isW); + return LISTVIEW_SetItemT(infoPtr, &lvItem, isW); } /*** @@ -7494,7 +7495,7 @@ static BOOL LISTVIEW_SetTextBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrTextBk) infoPtr->clrTextBk = clrTextBk; LISTVIEW_InvalidateList(infoPtr); } - + return TRUE; } @@ -7625,7 +7626,7 @@ static BOOL LISTVIEW_SortItems(LISTVIEW_INFO *infoPtr, PFNLVCOMPARE pfnCompare, /* FIXME: go thorugh selected items and mark them so in lpItem->state */ /* clear the lpItem->state for non-selected ones */ /* remove the selection ranges */ - + infoPtr->pfnCompare = pfnCompare; infoPtr->lParamSort = lParamSort; DPA_Sort(infoPtr->hdpaItems, LISTVIEW_CallBackCompare, (LPARAM)infoPtr); @@ -7971,7 +7972,7 @@ static inline BOOL LISTVIEW_EraseBkgnd(const LISTVIEW_INFO *infoPtr, HDC hdc) return LISTVIEW_FillBkgnd(infoPtr, hdc, &rc); } - + /*** * DESCRIPTION: @@ -7986,7 +7987,7 @@ static inline BOOL LISTVIEW_EraseBkgnd(const LISTVIEW_INFO *infoPtr, HDC hdc) static void scroll_list(LISTVIEW_INFO *infoPtr, INT dx, INT dy) { /* now we can scroll the list */ - ScrollWindowEx(infoPtr->hwndSelf, dx, dy, &infoPtr->rcList, + ScrollWindowEx(infoPtr->hwndSelf, dx, dy, &infoPtr->rcList, &infoPtr->rcList, 0, 0, SW_ERASE | SW_INVALIDATE); /* if we have focus, adjust rect */ OffsetRect(&infoPtr->rcFocus, dx, dy); @@ -8013,7 +8014,7 @@ static void scroll_list(LISTVIEW_INFO *infoPtr, INT dx, INT dy) * for LVS_LIST cannot occur * */ -static LRESULT LISTVIEW_VScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, +static LRESULT LISTVIEW_VScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, INT nScrollDiff, HWND hScrollWnd) { UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; @@ -8021,7 +8022,7 @@ static LRESULT LISTVIEW_VScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, SCROLLINFO scrollInfo; BOOL is_an_icon; - TRACE("(nScrollCode=%d(%s), nScrollDiff=%d)\n", nScrollCode, + TRACE("(nScrollCode=%d(%s), nScrollDiff=%d)\n", nScrollCode, debugscrollcode(nScrollCode), nScrollDiff); if (infoPtr->hwndEdit) SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0); @@ -8066,7 +8067,7 @@ static LRESULT LISTVIEW_VScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, /* quit right away if pos isn't changing */ if (nScrollDiff == 0) return 0; - + /* calculate new position, and handle overflows */ nNewScrollPos = scrollInfo.nPos + nScrollDiff; if (nScrollDiff > 0) { @@ -8083,15 +8084,15 @@ static LRESULT LISTVIEW_VScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, scrollInfo.fMask = SIF_POS; scrollInfo.nPos = nNewScrollPos; nNewScrollPos = SetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo, TRUE); - + /* carry on only if it really changed */ if (nNewScrollPos == nOldScrollPos) return 0; - + /* now adjust to client coordinates */ nScrollDiff = nOldScrollPos - nNewScrollPos; if (uView == LVS_REPORT) nScrollDiff *= infoPtr->nItemHeight; - - /* and scroll the window */ + + /* and scroll the window */ scroll_list(infoPtr, 0, nScrollDiff); return 0; @@ -8125,7 +8126,7 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, INT nOldScrollPos, nNewScrollPos; SCROLLINFO scrollInfo; - TRACE("(nScrollCode=%d(%s), nScrollDiff=%d)\n", nScrollCode, + TRACE("(nScrollCode=%d(%s), nScrollDiff=%d)\n", nScrollCode, debugscrollcode(nScrollCode), nScrollDiff); if (infoPtr->hwndEdit) SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0); @@ -8169,7 +8170,7 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, /* quit right away if pos isn't changing */ if (nScrollDiff == 0) return 0; - + /* calculate new position, and handle overflows */ nNewScrollPos = scrollInfo.nPos + nScrollDiff; if (nScrollDiff > 0) { @@ -8186,17 +8187,17 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, scrollInfo.fMask = SIF_POS; scrollInfo.nPos = nNewScrollPos; nNewScrollPos = SetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo, TRUE); - + /* carry on only if it really changed */ if (nNewScrollPos == nOldScrollPos) return 0; - + if(uView == LVS_REPORT) LISTVIEW_UpdateHeaderSize(infoPtr, nNewScrollPos); - + /* now adjust to client coordinates */ nScrollDiff = nOldScrollPos - nNewScrollPos; if (uView == LVS_LIST) nScrollDiff *= infoPtr->nItemWidth; - + /* and scroll the window */ scroll_list(infoPtr, nScrollDiff, 0); @@ -8368,19 +8369,19 @@ static LRESULT LISTVIEW_KillFocus(LISTVIEW_INFO *infoPtr) /* if we did not have the focus, there's nothing to do */ if (!infoPtr->bFocus) return 0; - + /* send NM_KILLFOCUS notification */ if (!notify(infoPtr, NM_KILLFOCUS)) return 0; /* if we have a focus rectagle, get rid of it */ LISTVIEW_ShowFocusRect(infoPtr, FALSE); - + /* set window focus flag */ infoPtr->bFocus = FALSE; /* invalidate the selected items before reseting focus flag */ LISTVIEW_InvalidateSelectedItems(infoPtr); - + return 0; } @@ -8401,7 +8402,7 @@ static LRESULT LISTVIEW_LButtonDblClk(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, LVHITTESTINFO htInfo; TRACE("(key=%hu, X=%hu, Y=%hu)\n", wKey, x, y); - + /* Cancel the item edition if any */ if (infoPtr->itemEdit.fEnabled) { @@ -8515,7 +8516,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN LVITEMW item; bGroupSelect = (LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED) == 0); - + item.state = (bGroupSelect ? LVIS_SELECTED : 0) | LVIS_FOCUSED; item.stateMask = LVIS_SELECTED | LVIS_FOCUSED; LISTVIEW_SetItemState(infoPtr, nItem, &item); @@ -8541,7 +8542,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN LISTVIEW_DeselectAll(infoPtr); ReleaseCapture(); } - + if (bReceivedFocus) infoPtr->nEditLabelItem = -1; @@ -8563,7 +8564,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT y) { LVHITTESTINFO lvHitTestInfo; - + TRACE("(key=%hu, X=%hu, Y=%hu)\n", wKey, x, y); if (!infoPtr->bLButtonDown) return 0; @@ -8659,26 +8660,26 @@ static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, const NMHEADE { UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; HWND hwndSelf = infoPtr->hwndSelf; - + TRACE("(lpnmh=%p)\n", lpnmh); if (!lpnmh || lpnmh->iItem < 0 || lpnmh->iItem >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return 0; - + switch (lpnmh->hdr.code) - { + { case HDN_TRACKW: case HDN_TRACKA: { COLUMN_INFO *lpColumnInfo; POINT ptOrigin; INT x; - + if (!lpnmh->pitem || !(lpnmh->pitem->mask & HDI_WIDTH)) break; /* remove the old line (if any) */ LISTVIEW_DrawTrackLine(infoPtr); - + /* compute & draw the new line */ lpColumnInfo = LISTVIEW_GetColumnInfo(infoPtr, lpnmh->iItem); x = lpColumnInfo->rcHeader.left + lpnmh->pitem->cxy; @@ -8687,28 +8688,28 @@ static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, const NMHEADE LISTVIEW_DrawTrackLine(infoPtr); break; } - + case HDN_ENDTRACKA: case HDN_ENDTRACKW: /* remove the track line (if any) */ LISTVIEW_DrawTrackLine(infoPtr); infoPtr->xTrackLine = -1; break; - + case HDN_ENDDRAG: FIXME("Changing column order not implemented\n"); return TRUE; - + case HDN_ITEMCHANGINGW: case HDN_ITEMCHANGINGA: return notify_forward_header(infoPtr, lpnmh); - + case HDN_ITEMCHANGEDW: case HDN_ITEMCHANGEDA: { COLUMN_INFO *lpColumnInfo; INT dx, cxy; - + notify_forward_header(infoPtr, lpnmh); if (!IsWindow(hwndSelf)) break; @@ -8716,14 +8717,14 @@ static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, const NMHEADE if (!lpnmh->pitem || !(lpnmh->pitem->mask & HDI_WIDTH)) { HDITEMW hdi; - + hdi.mask = HDI_WIDTH; if (!Header_GetItemW(infoPtr->hwndHeader, lpnmh->iItem, &hdi)) return 0; cxy = hdi.cxy; } else cxy = lpnmh->pitem->cxy; - + /* determine how much we change since the last know position */ lpColumnInfo = LISTVIEW_GetColumnInfo(infoPtr, lpnmh->iItem); dx = cxy - (lpColumnInfo->rcHeader.right - lpColumnInfo->rcHeader.left); @@ -8743,10 +8744,10 @@ static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, const NMHEADE { POINT ptOrigin; RECT rcCol = lpColumnInfo->rcHeader; - + LISTVIEW_GetOrigin(infoPtr, &ptOrigin); OffsetRect(&rcCol, ptOrigin.x, 0); - + rcCol.top = infoPtr->rcList.top; rcCol.bottom = infoPtr->rcList.bottom; @@ -8853,9 +8854,9 @@ static LRESULT LISTVIEW_NotifyFormat(LISTVIEW_INFO *infoPtr, HWND hwndFrom, INT TRACE("(hwndFrom=%p, nCommand=%d)\n", hwndFrom, nCommand); if (nCommand != NF_REQUERY) return 0; - + infoPtr->notifyFormat = SendMessageW(hwndFrom, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY); - + return 0; } @@ -8877,7 +8878,7 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc) if (infoPtr->bNoItemMetrics && infoPtr->nItemCount) { UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; - + infoPtr->bNoItemMetrics = FALSE; LISTVIEW_UpdateItemSize(infoPtr); if (uView == LVS_ICON || uView == LVS_SMALLICON) @@ -8887,7 +8888,7 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc) UpdateWindow(infoPtr->hwndHeader); - if (hdc) + if (hdc) LISTVIEW_Refresh(infoPtr, hdc, NULL); else { @@ -8947,7 +8948,7 @@ static LRESULT LISTVIEW_PrintClient(LISTVIEW_INFO *infoPtr, HDC hdc, DWORD optio static LRESULT LISTVIEW_RButtonDblClk(const LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT y) { LVHITTESTINFO lvHitTestInfo; - + TRACE("(key=%hu,X=%hu,Y=%hu)\n", wKey, x, y); /* send NM_RELEASEDCAPTURE notification */ @@ -8994,7 +8995,7 @@ static LRESULT LISTVIEW_RButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN lvHitTestInfo.pt.x = x; lvHitTestInfo.pt.y = y; nItem = LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE); - + if ((nItem >= 0) && (nItem < infoPtr->nItemCount)) { LISTVIEW_SetItemFocus(infoPtr, nItem); @@ -9030,7 +9031,7 @@ static LRESULT LISTVIEW_RButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT TRACE("(key=%hu,X=%hu,Y=%hu)\n", wKey, x, y); if (!infoPtr->bRButtonDown) return 0; - + /* set button flag */ infoPtr->bRButtonDown = FALSE; @@ -9099,7 +9100,7 @@ static LRESULT LISTVIEW_SetFocus(LISTVIEW_INFO *infoPtr, HWND hwndLoseFocus) /* if we have the focus already, there's nothing to do */ if (infoPtr->bFocus) return 0; - + /* send NM_SETFOCUS notification */ if (!notify(infoPtr, NM_SETFOCUS)) return 0; @@ -9135,7 +9136,7 @@ static LRESULT LISTVIEW_SetFont(LISTVIEW_INFO *infoPtr, HFONT hFont, WORD fRedra infoPtr->hFont = hFont ? hFont : infoPtr->hDefaultFont; if (infoPtr->hFont == oldFont) return 0; - + LISTVIEW_SaveTextMetrics(infoPtr); if ((infoPtr->dwStyle & LVS_TYPEMASK) == LVS_REPORT) @@ -9168,7 +9169,7 @@ static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL bRedraw) infoPtr->bRedraw = bRedraw; if(!bRedraw) return 0; - + if (is_autoarrange(infoPtr)) LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); LISTVIEW_UpdateScroll(infoPtr); @@ -9201,17 +9202,17 @@ static LRESULT LISTVIEW_Size(LISTVIEW_INFO *infoPtr, int Width, int Height) LISTVIEW_UpdateSize(infoPtr); if (EqualRect(&rcOld, &infoPtr->rcList)) return 0; - - /* do not bother with display related stuff if we're not redrawing */ + + /* do not bother with display related stuff if we're not redrawing */ if (!is_redrawing(infoPtr)) return 0; - - if (is_autoarrange(infoPtr)) + + if (is_autoarrange(infoPtr)) LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); LISTVIEW_UpdateScroll(infoPtr); /* refresh all only for lists whose height changed significantly */ - if ((infoPtr->dwStyle & LVS_TYPEMASK) == LVS_LIST && + if ((infoPtr->dwStyle & LVS_TYPEMASK) == LVS_LIST && (rcOld.bottom - rcOld.top) / infoPtr->nItemHeight != (infoPtr->rcList.bottom - infoPtr->rcList.top) / infoPtr->nItemHeight) LISTVIEW_InvalidateList(infoPtr); @@ -9234,7 +9235,7 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr) UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; TRACE("uView=%d, rcList(old)=%s\n", uView, wine_dbgstr_rect(&infoPtr->rcList)); - + GetClientRect(infoPtr->hwndSelf, &infoPtr->rcList); if (uView == LVS_LIST) @@ -9289,7 +9290,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, wStyleType, lpss->styleOld, lpss->styleNew); if (wStyleType != GWL_STYLE) return 0; - + /* FIXME: if LVS_NOSORTHEADER changed, update header */ /* what if LVS_OWNERDATA changed? */ /* or LVS_SINGLESEL */ @@ -9309,7 +9310,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, { SIZE oldIconSize = infoPtr->iconSize; HIMAGELIST himl; - + SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0); ShowWindow(infoPtr->hwndHeader, SW_HIDE); @@ -9318,7 +9319,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, himl = (uNewView == LVS_ICON ? infoPtr->himlNormal : infoPtr->himlSmall); set_icon_size(&infoPtr->iconSize, himl, uNewView != LVS_ICON); - + if (uNewView == LVS_ICON) { if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy)) @@ -9344,7 +9345,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, if (uNewView == LVS_REPORT) ShowWindow(infoPtr->hwndHeader, (lpss->styleNew & LVS_NOCOLUMNHEADER) ? SW_HIDE : SW_SHOWNORMAL); - + if ( (uNewView == LVS_ICON || uNewView == LVS_SMALLICON) && (uNewView != uOldView || ((lpss->styleNew ^ lpss->styleOld) & LVS_ALIGNMASK)) ) LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); @@ -9846,7 +9847,7 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return LISTVIEW_MouseWheel(infoPtr, (short int)HIWORD(wParam)); case WM_WINDOWPOSCHANGED: - if (!(((WINDOWPOS *)lParam)->flags & SWP_NOSIZE)) + if (!(((WINDOWPOS *)lParam)->flags & SWP_NOSIZE)) { UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE | diff --git a/reactos/dll/win32/comctl32/monthcal.c b/reactos/dll/win32/comctl32/monthcal.c index 642de23140f..e8266127da1 100644 --- a/reactos/dll/win32/comctl32/monthcal.c +++ b/reactos/dll/win32/comctl32/monthcal.c @@ -1415,14 +1415,14 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam) infoPtr->status = MC_NEXTPRESSED; SetTimer(infoPtr->hwndSelf, MC_NEXTMONTHTIMER, MC_NEXTMONTHDELAY, 0); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); - return TRUE; + return 0; } if(hit == MCHT_TITLEBTNPREV){ MONTHCAL_GoToPrevMonth(infoPtr); infoPtr->status = MC_PREVPRESSED; SetTimer(infoPtr->hwndSelf, MC_PREVMONTHTIMER, MC_NEXTMONTHDELAY, 0); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); - return TRUE; + return 0; } if(hit == MCHT_TITLEMONTH) { @@ -1471,14 +1471,30 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam) SendMessageW( infoPtr->hWndYearUpDown, UDM_SETRANGE, (WPARAM) 0, MAKELONG (9999, 1753)); SendMessageW( infoPtr->hWndYearUpDown, UDM_SETBUDDY, (WPARAM) infoPtr->hWndYearEdit, (LPARAM)0 ); SendMessageW( infoPtr->hWndYearUpDown, UDM_SETPOS, (WPARAM) 0,(LPARAM)infoPtr->currentYear ); - return TRUE; + return 0; } if(hit == MCHT_TODAYLINK) { + NMSELCHANGE nmsc; + + infoPtr->curSelDay = infoPtr->todaysDate.wDay; + infoPtr->firstSelDay = infoPtr->todaysDate.wDay; infoPtr->currentMonth=infoPtr->todaysDate.wMonth; infoPtr->currentYear=infoPtr->todaysDate.wYear; + MONTHCAL_CopyTime(&infoPtr->todaysDate, &infoPtr->minSel); + MONTHCAL_CopyTime(&infoPtr->todaysDate, &infoPtr->maxSel); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); - return TRUE; + + nmsc.nmhdr.hwndFrom = infoPtr->hwndSelf; + nmsc.nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID); + nmsc.nmhdr.code = MCN_SELCHANGE; + MONTHCAL_CopyTime(&infoPtr->minSel, &nmsc.stSelStart); + MONTHCAL_CopyTime(&infoPtr->maxSel, &nmsc.stSelEnd); + SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmsc.nmhdr.idFrom, (LPARAM)&nmsc); + + nmsc.nmhdr.code = MCN_SELECT; + SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmsc.nmhdr.idFrom,(LPARAM)&nmsc); + return 0; } if(hit == MCHT_CALENDARDATE) { SYSTEMTIME selArray[2]; @@ -1511,10 +1527,10 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam) infoPtr->firstSelDay = ht.st.wDay; infoPtr->curSelDay = ht.st.wDay; infoPtr->status = MC_SEL_LBUTDOWN; - return TRUE; + return 0; } - return 0; + return 1; } diff --git a/reactos/dll/win32/comctl32/pager.c b/reactos/dll/win32/comctl32/pager.c index 34286177e2a..f3773249ff5 100644 --- a/reactos/dll/win32/comctl32/pager.c +++ b/reactos/dll/win32/comctl32/pager.c @@ -21,7 +21,7 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 18, 2004, by Robert Shearman. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features or bugs please note them below. @@ -43,11 +43,11 @@ * * IMPLEMENTATION NOTES: * This control uses WM_NCPAINT instead of WM_PAINT to paint itself - * as we need to scroll a child window. In order to do this we move + * as we need to scroll a child window. In order to do this we move * the child window in the control's client area, using the clipping - * region that is automatically set around the client area. As the - * entire client area now consists of the child window, we must - * allocate space (WM_NCCALCSIZE) for the buttons and draw them as + * region that is automatically set around the client area. As the + * entire client area now consists of the child window, we must + * allocate space (WM_NCCALCSIZE) for the buttons and draw them as * a non-client area (WM_NCPAINT). * Robert Shearman */ @@ -493,7 +493,7 @@ PAGER_UpdateBtns(PAGER_INFO *infoPtr, INT scrollRange, BOOL hideGrayBtns) SWP_NOZORDER | SWP_NOACTIVATE); /* repaint when changing any state */ - repaintBtns = (oldTLbtnState != infoPtr->TLbtnState) || + repaintBtns = (oldTLbtnState != infoPtr->TLbtnState) || (oldBRbtnState != infoPtr->BRbtnState); if (repaintBtns) SendMessageW(infoPtr->hwndSelf, WM_NCPAINT, 0, 0); @@ -1236,7 +1236,7 @@ PAGER_Size (PAGER_INFO* infoPtr, INT type, INT x, INT y) } -static LRESULT +static LRESULT PAGER_StyleChanged(PAGER_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss) { DWORD oldStyle = infoPtr->dwStyle; @@ -1245,7 +1245,7 @@ PAGER_StyleChanged(PAGER_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lp wStyleType, lpss->styleOld, lpss->styleNew); if (wStyleType != GWL_STYLE) return 0; - + infoPtr->dwStyle = lpss->styleNew; if ((oldStyle ^ lpss->styleNew) & (PGS_HORZ | PGS_VERT)) diff --git a/reactos/dll/win32/comctl32/progress.c b/reactos/dll/win32/comctl32/progress.c index 171e00b6e96..d3b7ded976c 100644 --- a/reactos/dll/win32/comctl32/progress.c +++ b/reactos/dll/win32/comctl32/progress.c @@ -19,10 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * NOTE - * + * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. @@ -364,12 +364,12 @@ static LRESULT PROGRESS_Draw (PROGRESS_INFO *infoPtr, HDC hdc) { RECT cntRect; int part = (dwStyle & PBS_VERTICAL) ? PP_BARVERT : PP_BAR; - - GetThemeBackgroundContentRect (pdi.theme, hdc, part, 0, &pdi.rect, + + GetThemeBackgroundContentRect (pdi.theme, hdc, part, 0, &pdi.rect, &cntRect); - + /* Exclude content rect - content background will be drawn later */ - ExcludeClipRect (hdc, cntRect.left, cntRect.top, + ExcludeClipRect (hdc, cntRect.left, cntRect.top, cntRect.right, cntRect.bottom); if (IsThemeBackgroundPartiallyTransparent (pdi.theme, part, 0)) DrawThemeParentBackground (infoPtr->Self, hdc, NULL); @@ -402,7 +402,7 @@ static LRESULT PROGRESS_Draw (PROGRESS_INFO *infoPtr, HDC hdc) if (ledMEnd > leds) { - /* case 1: the marquee bar extends over the end and wraps around to + /* case 1: the marquee bar extends over the end and wraps around to * the start */ const int gapStart = max((ledMEnd - leds) * ledW, 0); const int gapEnd = min(infoPtr->MarqueePos * ledW, barSize); @@ -475,12 +475,12 @@ static LRESULT PROGRESS_Timer (PROGRESS_INFO *infoPtr, INT idTimer) get_client_rect (infoPtr->Self, &rect); if(!barSmooth) - ledWidth = get_led_size( infoPtr, style, &rect ) + + ledWidth = get_led_size( infoPtr, style, &rect ) + get_led_gap( infoPtr ); else ledWidth = 1; - leds = (get_bar_size( style, &rect ) + ledWidth - 1) / + leds = (get_bar_size( style, &rect ) + ledWidth - 1) / ledWidth; /* increment the marquee progress */ @@ -556,7 +556,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message, case WM_CREATE: { DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE); - + theme = OpenThemeData (hwnd, themeClass); dwExStyle &= ~(WS_EX_CLIENTEDGE | WS_EX_WINDOWEDGE); @@ -614,18 +614,18 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message, case WM_THEMECHANGED: { DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE); - + theme = GetWindowTheme (hwnd); CloseThemeData (theme); theme = OpenThemeData (hwnd, themeClass); - + /* WS_EX_STATICEDGE disappears when the control is themed */ if (theme) dwExStyle &= ~WS_EX_STATICEDGE; else dwExStyle |= WS_EX_STATICEDGE; SetWindowLongW (hwnd, GWL_EXSTYLE, dwExStyle); - + InvalidateRect (hwnd, NULL, FALSE); return 0; } diff --git a/reactos/dll/win32/comctl32/propsheet.c b/reactos/dll/win32/comctl32/propsheet.c index 15dcbc9f88a..83ab8318f3b 100644 --- a/reactos/dll/win32/comctl32/propsheet.c +++ b/reactos/dll/win32/comctl32/propsheet.c @@ -22,7 +22,7 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 12, 2004, by Filip Navara. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. @@ -157,7 +157,7 @@ static const WCHAR PropSheetInfoStr[] = /* Wizard metrics specified in DLUs */ #define WIZARD_PADDING 7 #define WIZARD_HEADER_HEIGHT 36 - + /****************************************************************************** * Prototypes */ @@ -212,7 +212,7 @@ static VOID PROPSHEET_UnImplementedFlags(DWORD dwFlags) static void PROPSHEET_GetPageRect(const PropSheetInfo * psInfo, HWND hwndDlg, RECT *rc, LPCPROPSHEETPAGEW ppshpage) { - if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) { + if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) { HWND hwndChild; RECT r; @@ -990,7 +990,7 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent, * All buttons will be at this y coordinate. */ y = rcSheet.bottom - (padding.y + buttonHeight); - + /* * Position the Back button. */ @@ -1005,9 +1005,9 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent, * Position the Next button. */ hwndButton = GetDlgItem(hwndParent, IDC_NEXT_BUTTON); - + x += buttonWidth; - + SetWindowPos(hwndButton, 0, x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); @@ -1015,7 +1015,7 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent, * Position the Finish button. */ hwndButton = GetDlgItem(hwndParent, IDC_FINISH_BUTTON); - + if (psInfo->hasFinish) x += padding.x + buttonWidth; @@ -1051,7 +1051,7 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent, ShowWindow(hwndButton, SW_HIDE); if (psInfo->ppshheader.dwFlags & - (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW | PSH_WIZARD_LITE)) + (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW | PSH_WIZARD_LITE)) padding.x = 0; /* @@ -1067,7 +1067,7 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent, /* * Position and resize the header sunken line. */ - + SetWindowPos(hwndLineHeader, 0, 0, 0, rcSheet.right, 2, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); if (!(psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW))) @@ -1327,10 +1327,10 @@ static UINT GetTemplateSize(const DLGTEMPLATE* pTemplate) while (nrofitems > 0) { p = (WORD*)(((DWORD_PTR)p + 3) & ~3); /* DWORD align */ - + /* skip header */ p += (istemplateex ? sizeof(MyDLGITEMTEMPLATEEX) : sizeof(DLGITEMTEMPLATE))/sizeof(WORD); - + /* check class */ switch ((WORD)*p) { @@ -1365,7 +1365,7 @@ static UINT GetTemplateSize(const DLGTEMPLATE* pTemplate) p += *p / sizeof(WORD) + 1; /* Skip extra data */ --nrofitems; } - + ret = (p - (const WORD*)pTemplate) * sizeof(WORD); TRACE("%p %p size 0x%08x\n", p, pTemplate, ret); return ret; @@ -1445,7 +1445,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent, temp = Alloc(resSize); if (!temp) return FALSE; - + TRACE("copying pTemplate %p into temp %p (%d)\n", pTemplate, temp, resSize); memcpy(temp, pTemplate, resSize); pTemplate = temp; @@ -1521,13 +1521,13 @@ static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo) { if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_NEW | PSH_WIZARD97_OLD)) { - /* if PSH_USEHBMWATERMARK is not set, load the resource from pszbmWatermark - and put the HBITMAP in hbmWatermark. Thus all the rest of the code always + /* if PSH_USEHBMWATERMARK is not set, load the resource from pszbmWatermark + and put the HBITMAP in hbmWatermark. Thus all the rest of the code always considers hbmWatermark as valid. */ if ((psInfo->ppshheader.dwFlags & PSH_WATERMARK) && !(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK)) { - ((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark = + ((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark = CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT_PTR)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0); } @@ -1535,7 +1535,7 @@ static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo) if ((psInfo->ppshheader.dwFlags & PSH_HEADER) && !(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER)) { - ((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader = + ((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader = CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT_PTR)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0); } } @@ -1590,7 +1590,7 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo) { hwndLineHeader = GetDlgItem(hwndDlg, IDC_SUNKEN_LINEHEADER); ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage; - + if ((ppshpage->dwFlags & PSP_HIDEHEADER) || (!(psInfo->ppshheader.dwFlags & PSH_HEADER)) ) ShowWindow(hwndLineHeader, SW_HIDE); else @@ -2447,7 +2447,7 @@ EnumChildProc(HWND hwnd, LPARAM lParam) SetFocus(hwnd); return FALSE; } - } + } else { EnumChildWindows(hwnd, EnumChildProc, 0); @@ -2490,7 +2490,7 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags) { /* Hide the Next button */ ShowWindow(hwndNext, SW_HIDE); - + /* Show the Finish button */ ShowWindow(hwndFinish, SW_SHOW); @@ -2532,7 +2532,7 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags) /* Now try to find an edit control that deserves focus */ EnumChildWindows(PropSheet_GetCurrentPageHwnd(hwndDlg), EnumChildProc, 0); - + } /****************************************************************************** @@ -3276,12 +3276,12 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) hdcSrc = CreateCompatibleDC(0); ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[psInfo->active_page].hpage; - if (psInfo->ppshheader.dwFlags & PSH_USEHPLWATERMARK) + if (psInfo->ppshheader.dwFlags & PSH_USEHPLWATERMARK) hOldPal = SelectPalette(hdc, psInfo->ppshheader.hplWatermark, FALSE); if ( (!(ppshpage->dwFlags & PSP_HIDEHEADER)) && (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW)) && - (psInfo->ppshheader.dwFlags & PSH_HEADER) ) + (psInfo->ppshheader.dwFlags & PSH_HEADER) ) { HWND hwndLineHeader = GetDlgItem(hwnd, IDC_SUNKEN_LINEHEADER); HFONT hOldFont; @@ -3295,7 +3295,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2); SetRect(&rzone, 0, 0, r.right + 1, r.top - 1); - GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm); + GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm); if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD) { @@ -3345,7 +3345,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) } clrOld = SetTextColor (hdc, 0x00000000); - oldBkMode = SetBkMode (hdc, TRANSPARENT); + oldBkMode = SetBkMode (hdc, TRANSPARENT); if (ppshpage->dwFlags & PSP_USEHEADERTITLE) { SetRect(&r, 20, 10, 0, 0); @@ -3388,9 +3388,9 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) if ( (ppshpage->dwFlags & PSP_HIDEHEADER) && (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW)) && - (psInfo->ppshheader.dwFlags & PSH_WATERMARK) ) + (psInfo->ppshheader.dwFlags & PSH_WATERMARK) ) { - HWND hwndLine = GetDlgItem(hwnd, IDC_SUNKEN_LINE); + HWND hwndLine = GetDlgItem(hwnd, IDC_SUNKEN_LINE); GetClientRect(hwndLine, &r); MapWindowPoints(hwndLine, hwnd, (LPPOINT) &r, 2); @@ -3423,10 +3423,10 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) DeleteObject(hbr); } - SelectObject(hdcSrc, hbmp); + SelectObject(hdcSrc, hbmp); } - if (psInfo->ppshheader.dwFlags & PSH_USEHPLWATERMARK) + if (psInfo->ppshheader.dwFlags & PSH_USEHPLWATERMARK) SelectPalette(hdc, hOldPal, FALSE); DeleteDC(hdcSrc); @@ -3478,7 +3478,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) psInfo->hFont = CreateFontIndirectW (&logFont); logFont.lfWeight = FW_BOLD; psInfo->hFontBold = CreateFontIndirectW (&logFont); - + /* * Small icon in the title bar. */ @@ -3612,7 +3612,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return FALSE; } - + case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); return FALSE; diff --git a/reactos/dll/win32/comctl32/rebar.c b/reactos/dll/win32/comctl32/rebar.c index b56f96615cf..7cf11bf1904 100644 --- a/reactos/dll/win32/comctl32/rebar.c +++ b/reactos/dll/win32/comctl32/rebar.c @@ -21,7 +21,7 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Oct. 19, 2004, by Robert Shearman. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features or bugs please note them below. @@ -430,7 +430,7 @@ static void translate_rect(const REBAR_INFO *infoPtr, RECT *dest, const RECT *sr tmp = src->left; dest->left = src->top; dest->top = tmp; - + tmp = src->right; dest->right = src->bottom; dest->bottom = tmp; @@ -626,7 +626,7 @@ REBAR_DrawBand (HDC hdc, const REBAR_INFO *infoPtr, REBAR_BAND *lpBand) { if (theme) { - int stateId; + int stateId; if (lpBand->fDraw & DRAW_CHEVRONPUSHED) stateId = CHEVS_PRESSED; else if (lpBand->fDraw & DRAW_CHEVRONHOT) @@ -1568,8 +1568,8 @@ REBAR_CommonSetupBand(HWND hwnd, const REBARBANDINFOW *lprbbi, REBAR_BAND *lpBan (lpBand->cyMaxChild != lprbbi->cyMaxChild ) || (lpBand->cyIntegral != lprbbi->cyIntegral ) ) ) || ( (lprbbi->cbSize < sizeof (REBARBANDINFOA)) && - ( (lpBand->cyChild || - lpBand->cyMaxChild || + ( (lpBand->cyChild || + lpBand->cyMaxChild || lpBand->cyIntegral ) ) ) ) ) { lpBand->cxMinChild = lprbbi->cxMinChild; @@ -2510,7 +2510,7 @@ REBAR_SetBandInfoT(REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL bUnic else Str_SetPtrAtoW(&wstr, (LPSTR)lprbbi->lpText); - if (REBAR_strdifW(wstr, lprbbi->lpText)) { + if (REBAR_strdifW(wstr, lpBand->lpText)) { Free(lpBand->lpText); lpBand->lpText = wstr; bChanged = TRUE; @@ -2725,13 +2725,13 @@ REBAR_Create (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) } TRACE("created!\n"); - + if ((theme = OpenThemeData (infoPtr->hwndSelf, themeClass))) { /* native seems to clear WS_BORDER when themed */ infoPtr->dwStyle &= ~WS_BORDER; } - + return 0; } @@ -2767,7 +2767,7 @@ REBAR_Destroy (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) DestroyCursor (infoPtr->hcurDrag); if(infoPtr->hDefaultFont) DeleteObject (infoPtr->hDefaultFont); SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0); - + CloseThemeData (GetWindowTheme (infoPtr->hwndSelf)); /* free rebar info data */ @@ -3326,7 +3326,7 @@ REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) infoPtr->fStatus, lParam); return 0; } - + /* FIXME: wrong */ if (infoPtr->dwStyle & RBS_AUTOSIZE) { NMRBAUTOSIZE autosize; diff --git a/reactos/dll/win32/comctl32/rsrc.rc b/reactos/dll/win32/comctl32/rsrc.rc index 37b3349d4bc..06ffd4d0f11 100644 --- a/reactos/dll/win32/comctl32/rsrc.rc +++ b/reactos/dll/win32/comctl32/rsrc.rc @@ -36,1159 +36,50 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "wine/wine_common_ver.rc" -/* BINRES idt_check.bmp */ +/* @makedep: idt_check.bmp */ IDT_CHECK BITMAP LOADONCALL DISCARDABLE idt_check.bmp -/* { - '42 4D 8E 01 00 00 00 00 00 00 5E 00 00 00 28 00' - '00 00 1F 00 00 00 10 00 00 00 01 00 04 00 02 00' - '00 00 30 01 00 00 01 00 00 00 01 00 00 00 0A 00' - '00 00 0A 00 00 00 00 00 00 00 00 00 80 00 00 80' - '00 00 80 00 00 00 C0 C0 C0 00 80 80 80 00 00 FF' - '00 00 00 FF FF 00 FF 00 00 00 FF FF FF 00 1F 99' - '00 00 01 99 0D 11 02 99 0E 11 01 99 00 00 01 99' - '0D 11 02 99 0E 11 01 99 00 00 01 99 02 11 09 99' - '02 11 02 99 02 11 0A 99 02 11 01 99 00 00 01 99' - '02 11 09 99 02 11 02 99 02 11 0A 99 02 11 01 99' - '00 00 01 99 02 11 09 99 02 11 02 99 02 11 03 99' - '02 00 05 99 02 11 01 99 00 00 01 99 02 11 09 99' - '02 11 02 99 02 11 03 99 03 00 04 99 02 11 01 99' - '00 00 01 99 02 11 09 99 02 11 02 99 02 11 02 99' - '04 00 04 99 02 11 01 99 00 00 01 99 02 11 09 99' - '02 11 02 99 02 11 01 99 02 00 02 99 02 00 03 99' - '02 11 01 99 00 00 01 99 02 11 09 99 02 11 02 99' - '02 11 02 00 04 99 02 00 02 99 02 11 01 99 00 00' - '01 99 02 11 09 99 02 11 02 99 02 11 01 00 06 99' - '02 00 01 99 02 11 01 99 00 00 01 99 02 11 09 99' - '02 11 02 99 02 11 07 99 02 00 01 99 01 00 01 11' - '01 99 00 00 01 99 02 11 09 99 02 11 02 99 02 11' - '08 99 01 00 01 99 01 00 01 11 01 99 00 00 01 99' - '0D 11 02 99 0A 11 02 00 02 11 01 99 00 00 01 99' - '0D 11 02 99 0E 11 01 99 00 00 1F 99 00 01' -} */ -/* BINRES idb_std_small.bmp */ +/* @makedep: idb_std_small.bmp */ IDB_STD_SMALL BITMAP LOADONCALL DISCARDABLE idb_std_small.bmp -/* { - '42 4D 20 07 00 00 00 00 00 00 76 00 00 00 28 00' - '00 00 F0 00 00 00 10 00 00 00 01 00 04 00 02 00' - '00 00 AA 06 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF 00 00 00 80 00 00 80' - '00 00 00 80 80 00 80 00 00 00 80 00 80 00 00 00' - '00 00 80 80 80 00 C0 C0 C0 00 00 00 FF 00 00 FF' - '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' - '00 00 00 66 66 00 CC 88 02 44 22 88 00 00 04 88' - '00 04 84 48 1E 88 0A 44 52 88 0C 66 02 68 0C 66' - '02 88 0E 66 08 88 00 04 86 68 12 88 04 84 02 48' - '08 88 02 44 08 88 0A 66 00 04 68 88 00 00 04 88' - '00 08 48 84 88 44 0A 88 02 84 08 44 02 86 04 66' - '02 40 06 00 02 04 22 88 02 86 0A 88 00 04 68 88' - '0A 66 00 04 68 88 0A 66 02 68 04 88 00 04 86 33' - '06 66 00 08 88 63 68 60 08 00 00 08 06 86 66 60' - '08 00 02 06 08 88 00 04 86 68 12 88 00 06 48 44' - '48 00 06 88 00 04 84 44 06 88 02 86 08 88 04 86' - '02 88 00 00 04 88 02 48 04 84 00 04 88 48 08 88' - '02 84 06 00 00 04 04 67 04 37 02 40 06 66 02 04' - '22 88 00 04 66 68 0C 88 02 60 08 00 00 06 68 88' - '66 00 08 33 02 36 04 88 00 04 86 33 06 66 00 08' - '88 63 68 60 06 00 06 66 00 08 68 60 66 06 04 66' - '02 06 08 88 02 66 04 88 00 04 44 48 0A 88 04 84' - '02 44 04 88 04 66 00 04 44 48 06 88 0C 66 04 68' - '00 00 04 88 02 48 04 84 00 04 88 48 08 88 00 04' - '84 06 04 66 00 04 04 63 04 73 02 40 06 00 02 04' - '22 88 04 66 06 88 02 86 04 88 02 60 08 00 00 08' - '68 88 6B 63 08 33 00 08 68 88 86 33 06 66 00 08' - '88 63 68 60 04 00 00 0C 06 78 87 66 88 60 08 00' - '02 06 04 88 00 06 68 88 66 00 04 88 00 04 44 48' - '06 88 04 66 00 10 48 44 48 88 86 78 07 64 04 88' - '00 06 18 88 68 00 04 88 00 0A 8B BB 88 66 68 00' - '00 00 04 88 00 0E 84 44 84 88 48 88 86 00 04 66' - '02 64 06 00 00 04 04 67 04 37 00 06 40 66 60 00' - '04 44 0C 88 02 48 04 88 02 84 0E 88 00 04 86 66' - '06 88 02 68 04 88 02 60 08 00 00 08 68 88 60 B6' - '08 33 00 08 36 88 86 33 08 66 00 06 63 68 60 00' - '04 00 00 10 67 88 E7 76 88 60 66 06 04 66 02 06' - '04 88 00 06 66 86 68 00 0C 88 00 0A 66 88 80 74' - '44 00 04 88 00 12 67 88 80 76 88 81 18 88 68 00' - '04 88 00 06 87 77 88 00 04 68 00 00 06 88 04 84' - '02 44 04 88 02 86 04 00 00 04 04 06 04 66 00 04' - '04 63 04 73 02 40 04 00 00 06 40 48 88 00 04 44' - '02 48 04 88 02 48 04 88 02 84 04 88 02 84 04 44' - '06 88 00 0A 66 68 88 86 68 00 04 88 02 60 08 00' - '00 0A 68 88 6B 0B 63 00 08 33 00 04 68 86 0C 33' - '00 04 68 60 04 00 00 0C 68 88 87 86 88 60 08 00' - '02 06 04 88 04 66 02 68 04 88 00 0A 44 48 88 86' - '78 00 04 88 00 04 07 68 04 88 02 68 04 88 00 04' - '06 88 04 11 02 18 0C 66 00 04 68 86 00 00 06 88' - '00 04 84 64 06 88 00 08 86 06 66 64 06 00 00 04' - '04 67 04 37 02 40 04 00 02 44 04 88 04 44 06 88' - '02 84 04 88 02 48 06 88 04 44 06 88 00 08 86 66' - '88 66 06 88 02 60 08 00 00 0A 68 88 60 B0 B6 00' - '0A 66 00 04 86 33 08 66 00 06 33 68 60 00 04 00' - '00 0C 68 E8 87 86 88 60 06 00 00 04 60 06 04 88' - '08 66 00 0A 88 44 48 88 86 00 06 88 00 04 80 68' - '04 88 00 12 68 0E 88 86 88 81 18 81 68 00 08 88' - '06 86 00 00 08 88 02 68 06 88 02 86 04 00 00 06' - '04 06 60 00 04 44 02 63 04 73 06 44 02 46 04 88' - '00 04 44 48 06 88 02 84 04 88 02 48 06 88 00 04' - '84 44 08 88 04 66 02 68 06 88 02 60 08 00 00 06' - '68 88 6B 00 08 0B 02 68 04 88 00 04 86 36 08 88' - '00 06 63 68 60 00 04 00 00 16 67 EE 87 76 88 60' - '66 00 06 86 06 00 04 88 06 66 00 0C 68 88 84 44' - '88 68 08 88 02 86 04 88 00 08 67 00 88 76 04 88' - '00 06 18 81 86 00 08 66 04 68 02 66 00 00 06 88' - '00 04 86 66 06 88 00 08 86 06 66 64 04 00 00 06' - '40 48 67 00 0A 37 02 36 04 88 00 04 44 84 06 88' - '02 84 04 88 02 48 06 88 00 04 48 44 08 88 00 04' - '86 66 08 88 02 60 08 00 00 06 68 88 60 00 08 B0' - '02 68 04 88 00 04 86 36 08 88 00 06 63 68 60 00' - '04 00 00 10 06 78 87 68 88 60 68 60 04 68 00 06' - '66 68 44 00 06 66 06 88 00 06 44 48 68 00 08 88' - '02 86 04 88 00 08 86 78 87 68 06 88 00 06 81 88' - '60 00 06 00 02 06 04 86 00 00 06 88 04 86 06 88' - '02 86 04 00 02 04 04 00 00 08 44 88 63 76 06 66' - '00 04 67 76 04 88 00 06 48 88 44 00 04 88 02 48' - '04 88 02 84 04 88 00 06 44 88 84 00 08 88 04 66' - '02 68 06 88 02 60 08 00 00 08 68 88 6B 0B 06 66' - '02 68 04 88 00 04 86 36 08 88 00 06 63 68 60 00' - '06 00 04 66 04 88 00 04 60 06 06 86 00 06 88 86' - '44 00 04 66 00 10 68 84 44 88 84 44 68 0E 06 88' - '02 86 06 88 04 66 00 04 88 81 08 88 00 04 86 06' - '04 66 00 06 06 66 68 00 00 00 06 88 00 06 66 86' - '68 00 04 88 00 08 86 06 60 64 04 44 00 08 48 88' - '67 76 06 88 00 04 67 36 0A 88 04 44 08 88 04 44' - '0C 88 00 08 86 66 88 66 06 88 02 60 04 00 00 0C' - '06 66 68 88 86 66 08 88 00 08 66 68 86 36 08 88' - '00 06 63 68 60 00 08 00 02 06 04 88 04 66 06 68' - '04 88 02 44 04 66 00 10 88 84 44 88 84 44 68 0E' - '06 88 02 86 0C 88 00 06 81 88 18 00 04 88 02 86' - '08 00 00 04 68 88 00 00 06 88 00 06 68 88 68 00' - '04 88 02 86 04 00 00 04 60 68 06 88 00 0E 63 73' - '6B 66 B6 73 76 00 24 88 00 0C 86 66 68 88 86 68' - '04 88 02 60 04 00 04 06 10 88 00 08 86 68 86 36' - '08 88 00 06 66 68 60 00 06 00 04 66 08 88 04 86' - '06 88 00 18 44 66 68 88 84 44 88 84 44 86 00 EE' - '04 88 02 68 0C 88 00 06 81 88 11 00 06 88 02 60' - '04 66 00 06 60 68 88 00 00 00 06 88 00 06 68 88' - '68 00 04 88 02 86 04 00 02 66 08 88 02 86 04 66' - '02 BB 04 66 02 68 24 88 04 66 06 88 02 66 04 88' - '02 60 04 00 00 04 06 68 0C 88 00 04 68 88 04 68' - '00 04 86 36 08 88 04 68 02 60 06 00 04 68 0A 88' - '02 68 04 88 00 06 86 44 66 00 06 88 06 44 00 0E' - '48 86 70 00 88 87 68 00 0E 88 04 11 02 18 04 88' - '02 60 06 00 00 04 06 88 00 00 06 88 00 06 68 88' - '68 00 04 88 02 86 04 66 02 68 0C 88 00 06 86 66' - '68 00 28 88 00 04 66 68 08 88 00 04 68 88 08 66' - '0E 88 00 04 86 66 04 88 02 86 0C 66 00 04 68 60' - '06 00 02 66 0C 88 02 86 04 66 00 06 68 44 68 00' - '06 88 02 84 04 44 04 88 02 66 04 88 02 66 12 88' - '02 11 06 88 02 86 08 66 02 88 00 00 90 88 08 66' - '02 68 2A 88 04 66 14 88 02 18 12 88 00 00 00 01' -} */ -/* BINRES idb_std_large.bmp */ +/* @makedep: idb_std_large.bmp */ IDB_STD_LARGE BITMAP LOADONCALL DISCARDABLE idb_std_large.bmp -/* { - '42 4D D6 0A 00 00 00 00 00 00 76 00 00 00 28 00' - '00 00 68 01 00 00 18 00 00 00 01 00 04 00 02 00' - '00 00 60 0A 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' - '00 00 00 80 80 00 80 00 00 00 80 00 80 00 00 80' - '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF' - '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' - '00 00 FF FF FF 00 FF 77 69 77 00 00 07 77 03 44' - 'FF 77 5F 77 00 00 06 77 01 47 03 77 01 47 14 77' - '0E 44 5F 77 01 07 06 77 11 00 1F 77 12 00 19 77' - '02 00 03 77 10 00 30 77 02 44 10 77 02 44 0C 77' - '10 00 05 77 00 00 06 77 01 47 03 77 01 47 04 77' - '03 44 0D 77 01 4F 0C FF 01 47 0D 77 0B 44 34 77' - '04 00 16 77 01 0F 0F FF 01 07 04 77 11 00 09 77' - '01 03 03 33 09 00 03 77 00 04 03 30 04 77 10 00' - '03 77 03 00 03 77 01 0F 0E FF 01 07 0E 77 03 00' - '1E 77 03 47 01 47 0E 77 03 47 01 47 0A 77 01 07' - '0E 77 04 07 03 77 00 00 06 77 01 47 03 77 01 47' - '03 77 01 47 03 77 01 47 0C 77 01 4F 0C FF 01 47' - '0D 77 01 4F 09 FF 01 47 34 77 05 00 0D 77 01 07' - '07 77 01 0F 0F FF 01 07 04 77 02 00 0F 33 01 07' - '08 77 01 03 03 33 09 00 03 77 00 04 03 30 04 77' - '01 0F 0E FF 01 07 02 77 04 00 03 77 01 0F 0E FF' - '01 07 0E 77 03 00 04 77 03 44 16 77 03 47 02 44' - '0D 77 03 47 02 44 0A 77 01 07 0E 77 02 07 03 70' - '02 77 00 00 06 77 01 47 03 77 01 47 03 77 01 47' - '03 77 01 47 0C 77 01 4F 02 FF 08 00 01 FF 02 F4' - '0D 77 02 4F 07 00 02 F4 34 77 05 00 0C 77 01 07' - '08 77 01 0F 0F FF 01 07 04 77 03 0F 0F 33 01 07' - '07 77 01 03 03 33 09 00 03 77 00 04 03 30 04 77' - '01 0F 0A FF 0A 00 04 77 00 04 0F F0 03 0F 06 00' - '01 FF 02 F0 0D 77 03 00 04 77 05 44 14 77 03 47' - '02 44 0D 77 03 47 02 44 0A 77 12 00 01 77 03 70' - '01 70 00 00 06 77 01 47 03 77 01 47 03 77 01 47' - '03 77 01 47 06 77 06 00 01 4F 0C FF 01 47 06 77' - '07 00 01 4F 09 FF 01 47 35 77 05 00 0A 77 02 00' - '08 77 01 0F 0F FF 01 07 04 77 00 04 0B F0 0F 33' - '01 07 06 77 01 03 03 33 09 00 03 77 00 04 03 30' - '04 77 01 0F 09 FF 02 08 03 77 01 80 04 00 05 77' - '01 0F 0E FF 01 07 07 77 01 07 05 77 03 00 05 77' - '03 44 14 77 03 47 02 44 09 77 04 00 03 47 02 44' - '0B 77 01 07 10 77 01 00 02 07 03 70 00 00 07 77' - '04 44 03 77 01 47 03 77 01 47 06 77 01 0F 05 FF' - '01 4F 02 FF 08 00 01 FF 02 F4 05 77 01 03 07 38' - '02 4F 07 00 02 F4 12 77 02 44 0D 77 02 44 13 77' - '04 00 09 77 02 00 09 77 01 0F 0F FF 01 07 04 77' - '01 0F 03 FB 01 03 0F 33 01 07 05 77 01 03 03 33' - '09 00 03 77 00 04 03 30 04 77 01 0F 08 FF 00 0A' - '08 77 EE 88 00 77 06 77 00 04 0F F0 03 0F 06 00' - '01 FF 02 F0 07 77 02 00 03 77 03 00 15 77 05 00' - '01 77 04 74 02 44 08 77 02 00 03 77 02 F8 03 44' - '0C 77 01 07 0B 77 03 BB 01 77 07 70 00 00 0A 77' - '01 47 03 77 04 44 07 77 01 0F 05 FF 01 4F 0C FF' - '01 47 05 77 01 08 07 83 01 4F 09 FF 01 47 14 77' - '01 47 0B 77 01 47 16 77 04 00 07 77 03 00 09 77' - '01 0F 0F FF 01 07 04 77 01 0B 04 BF 01 03 0F 33' - '01 07 04 77 01 03 03 33 0D 00 01 33 02 30 04 77' - '01 0F 07 FF 02 08 05 77 00 04 E7 80 06 77 01 0F' - '0E FF 01 07 07 77 03 00 02 77 03 00 06 77 03 44' - '0A 77 02 00 05 77 01 00 02 07 03 44 08 77 02 08' - '05 77 01 F8 02 80 0D 77 01 07 0B 77 03 88 01 77' - '03 70 02 70 02 07 00 00 0A 77 01 44 03 47 01 47' - '0A 77 01 0F 02 FF 03 00 01 4F 02 FF 08 00 01 FF' - '02 F4 05 77 01 03 07 38 02 4F 03 00 02 FF 04 44' - '06 77 06 44 09 77 01 47 09 77 01 47 09 77 06 44' - '09 77 04 00 05 77 03 00 0A 77 01 0F 0F FF 01 07' - '04 77 01 0F 05 FB 01 03 0F 33 01 07 03 77 01 03' - '12 33 01 07 04 77 01 0F 07 FF 01 07 06 77 02 8E' - '03 70 05 77 00 04 0F F0 03 0F 06 00 01 FF 02 F0' - '07 77 07 00 07 77 03 44 09 77 02 08 05 77 01 FF' - '02 F8 03 44 09 77 01 07 07 77 02 F0 06 77 01 17' - '06 77 13 00 01 77 03 70 00 00 0B 77 04 47 0A 77' - '01 0F 05 FF 01 4F 0C FF 01 47 05 77 01 08 07 83' - '01 4F 06 FF 03 4F 07 77 05 44 0B 77 01 47 07 77' - '01 47 0B 77 05 44 0A 77 04 00 03 77 03 00 0B 77' - '01 0F 0F FF 01 07 04 77 01 0B 06 BF 01 03 0F 33' - '00 04 07 70 12 33 01 07 04 77 01 0F 07 FF 01 07' - '06 77 02 8E 03 70 05 77 01 0F 0E FF 01 07 07 77' - '0B 00 03 77 03 44 08 77 02 08 08 77 01 F8 02 80' - '09 77 01 07 0A 77 01 07 04 77 02 11 06 77 01 07' - '10 77 04 07 02 70 00 00 0B 77 03 40 0B 77 01 0F' - '02 FF 03 00 01 4F 02 FF 08 00 01 FF 02 F4 05 77' - '01 03 07 38 01 4F 06 FF 02 44 08 77 04 44 0C 77' - '01 47 07 77 01 47 0C 77 04 44 0B 77 04 00 01 70' - '03 00 0C 77 01 0F 0F FF 01 07 04 77 01 0F 07 FB' - '10 00 01 77 02 70 03 33 0C 00 03 33 01 07 04 77' - '01 0F 07 FF 01 07 03 7E 03 77 02 87 03 70 05 77' - '00 04 0F F0 03 0F 06 00 01 FF 02 F0 07 77 0A 00' - '05 77 03 44 07 77 01 07 0A 77 02 F0 09 77 01 07' - '0A 77 01 07 03 77 06 11 04 77 01 07 0F 77 02 07' - '04 70 00 00 0C 77 01 07 0C 77 01 0F 05 FF 01 4F' - '0C FF 01 47 05 77 01 08 07 83 08 44 09 77 04 44' - '0C 77 01 47 07 77 01 47 0C 77 04 44 0C 77 06 00' - '0D 77 01 0F 0F FF 01 07 04 77 01 0B 10 BF 01 07' - '08 77 00 04 03 30 0C 77 00 04 03 30 04 77 01 0F' - '07 FF 01 08 02 8E 04 77 03 87 01 07 06 77 01 0F' - '0E FF 01 07 07 77 09 00 07 77 03 44 05 77 01 07' - '0B 77 01 F7 03 70 07 77 00 04 07 FE 07 77 01 07' - '04 77 02 11 03 77 01 17 04 77 0F 00 03 70 02 70' - '01 00 00 00 0B 77 03 00 0B 77 01 0F 02 FF 03 00' - '01 4F 02 FF 04 00 02 FF 05 44 05 77 01 03 0E 38' - '01 07 09 77 01 44 02 47 03 74 0A 77 01 47 07 77' - '01 47 0B 77 00 05 47 74 47 88 0D 77 04 00 0E 77' - '01 0F 0F FF 01 07 04 77 01 0F 10 FB 01 07 08 77' - '00 04 03 30 0C 77 00 04 03 30 04 77 01 0F 08 FF' - '00 09 08 EE 77 88 07 68 07 77 01 0F 09 FF 01 0F' - '04 FF 01 07 07 77 08 00 02 77 03 44 04 77 03 44' - '04 77 01 07 03 7F 0A 77 01 07 08 77 00 04 07 FE' - '07 77 01 07 05 77 01 17 03 77 01 17 05 77 01 0F' - '0C FF 01 00 04 07 02 70 00 00 0B 77 04 07 0A 77' - '01 0F 05 FF 01 4F 08 FF 00 04 4F F4 06 77 01 08' - '0E 83 01 07 09 77 01 47 04 77 01 47 09 77 01 47' - '09 77 01 47 09 77 01 47 04 77 01 47 0C 77 06 00' - '0D 77 01 0F 0F FF 01 07 04 77 01 0B 10 BF 01 07' - '08 77 00 04 03 30 0C 77 00 04 03 30 04 77 01 0F' - '09 FF 02 08 03 77 02 80 08 77 01 0F 03 FF 02 00' - '03 FF 03 07 03 FF 01 07 07 77 07 00 03 77 03 44' - '04 77 04 44 03 77 00 04 07 FE 0A 77 01 07 09 77' - '00 05 0F FE E7 88 04 77 01 07 0A 77 01 17 05 77' - '01 0F 02 FF 08 00 02 FF 03 00 04 70 00 00 0A 77' - '01 00 03 07 01 07 0A 77 01 0F 02 FF 03 00 01 4F' - '08 FF 03 4F 07 77 01 03 0E 38 01 07 0F 77 02 44' - '05 77 02 44 0B 77 02 44 05 77 02 44 10 77 04 00' - '02 77 03 00 0C 77 01 0F 0F FF 01 07 04 77 01 0F' - '06 FB 0B 00 08 77 00 04 03 30 0C 77 00 04 03 30' - '04 77 01 0F 0A FF 05 00 09 77 01 0F 03 FF 03 07' - '01 F0 05 07 03 00 02 44 05 77 06 00 04 77 03 44' - '04 77 04 44 03 77 00 05 07 FF E7 00 09 77 01 07' - '09 77 02 08 03 FF 03 77 02 80 03 77 01 17 06 77' - '01 17 06 77 01 0F 0C FF 05 00 01 70 00 00 0A 77' - '01 07 03 77 01 07 0A 77 01 0F 05 FF 01 4F 08 FF' - '02 44 08 77 01 08 02 83 0A 00 01 83 02 30 11 77' - '05 44 0F 77 05 44 11 77 04 00 04 77 03 00 0B 77' - '01 0F 0A FF 06 00 05 77 01 0F 04 FB 01 07 13 77' - '00 04 03 30 0C 77 00 04 03 30 04 77 01 0F 0E FF' - '01 07 09 77 01 0F 04 FF 08 07 00 05 77 04 47 00' - '05 77 05 00 05 77 03 44 04 77 04 44 03 77 00 05' - '07 7F E7 63 09 77 01 07 0A 77 02 00 04 77 02 00' - '04 77 01 17 06 77 01 17 06 77 01 0F 02 FF 08 00' - '01 FF 02 F0 05 77 00 00 09 77 02 00 03 77 02 00' - '09 77 01 0F 02 FF 03 00 0A 44 09 77 00 04 03 80' - '08 77 00 04 03 80 39 77 05 00 07 77 02 00 0A 77' - '01 0F 0A FF 01 0F 03 FF 01 07 07 77 04 00 0C 77' - '05 00 03 77 00 04 03 30 0C 77 00 04 03 30 04 77' - '01 0F 0A FF 05 00 09 77 07 00 05 70 04 77 02 44' - '05 77 04 00 07 77 03 44 02 77 04 44 05 77 00 06' - '07 FF EE 77 06 77 01 07 0D 77 04 00 06 77 01 17' - '0E 77 01 0F 0C FF 01 07 04 77 00 00 09 77 01 07' - '05 77 01 07 09 77 01 0F 08 FF 00 04 0F F0 0C 77' - '01 08 03 83 00 08 0B B0 0B B0 03 38 01 07 38 77' - '05 00 09 77 02 00 09 77 01 0F 0A FF 00 04 0F F0' - '19 77 04 00 03 77 00 04 03 30 0C 77 00 04 03 30' - '04 77 01 0F 0A FF 00 04 0F F0 11 77 04 07 05 77' - '02 44 05 77 03 00 09 77 07 44 06 77 01 08 02 88' - '03 FF 01 E7 04 77 02 80 17 77 01 17 03 77 01 17' - '0A 77 01 0F 02 FF 08 00 01 FF 02 F0 04 77 00 00' - '09 77 01 07 05 77 01 07 09 77 01 0F 08 FF 03 0F' - '0E 77 05 00 04 BB 05 00 38 77 05 00 0B 77 02 00' - '08 77 01 0F 0A FF 03 0F 1B 77 03 00 03 77 00 04' - '03 30 0C 77 04 00 04 77 01 0F 0A FF 03 0F 13 77' - '01 07 06 77 01 04 02 44 05 77 02 00 18 77 00 04' - '08 77 03 FF 00 04 77 80 18 77 01 17 03 77 02 11' - '0A 77 01 0F 0C FF 01 07 03 77 00 00 09 77 01 07' - '05 77 01 07 09 77 01 0F 08 FF 02 00 13 77 06 00' - '3B 77 05 00 0E 77 02 00 06 77 01 0F 0A FF 02 00' - '14 77 01 07 06 77 03 07 01 07 03 77 00 04 03 30' - '0C 77 00 04 07 F0 04 77 01 0F 0A FF 02 00 15 77' - '06 00 01 74 02 44 05 77 01 07 1A 77 02 00 05 77' - '02 00 1A 77 06 11 0A 77 0D 00 03 77 00 00 09 77' - '01 07 05 77 01 07 09 77 0A 00 55 77 04 00 17 77' - '0C 00 16 77 01 07 04 77 01 07 03 77 01 07 03 77' - '14 00 04 77 0C 00 41 77 05 00 1F 77 02 11 1B 77' - '00 00 B6 77 04 00 91 77 01 17 1C 77 00 00 FF 77' - '69 77 00 00 00 01' -} */ - -/* BINRES idb_view_small.bmp */ +/* @makedep: idb_view_small.bmp */ IDB_VIEW_SMALL BITMAP LOADONCALL DISCARDABLE idb_view_small.bmp -/* { - '42 4D 36 10 00 00 00 00 00 00 36 04 00 00 28 00' - '00 00 C0 00 00 00 10 00 00 00 01 00 08 00 00 00' - '00 00 00 0C 00 00 EB 0A 00 00 EB 0A 00 00 00 01' - '00 00 00 01 00 00 00 00 00 00 00 00 80 00 00 80' - '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' - '00 00 C0 C0 C0 00 C0 DC C0 00 F0 CA A6 00 04 04' - '04 00 08 08 08 00 0C 0C 0C 00 11 11 11 00 16 16' - '16 00 1C 1C 1C 00 22 22 22 00 29 29 29 00 55 55' - '55 00 4D 4D 4D 00 42 42 42 00 39 39 39 00 80 7C' - 'FF 00 50 50 FF 00 93 00 D6 00 FF EC CC 00 C6 D6' - 'EF 00 D6 E7 E7 00 90 A9 AD 00 00 00 33 00 00 00' - '66 00 00 00 99 00 00 00 CC 00 00 33 00 00 00 33' - '33 00 00 33 66 00 00 33 99 00 00 33 CC 00 00 33' - 'FF 00 00 66 00 00 00 66 33 00 00 66 66 00 00 66' - '99 00 00 66 CC 00 00 66 FF 00 00 99 00 00 00 99' - '33 00 00 99 66 00 00 99 99 00 00 99 CC 00 00 99' - 'FF 00 00 CC 00 00 00 CC 33 00 00 CC 66 00 00 CC' - '99 00 00 CC CC 00 00 CC FF 00 00 FF 66 00 00 FF' - '99 00 00 FF CC 00 33 00 00 00 33 00 33 00 33 00' - '66 00 33 00 99 00 33 00 CC 00 33 00 FF 00 33 33' - '00 00 33 33 33 00 33 33 66 00 33 33 99 00 33 33' - 'CC 00 33 33 FF 00 33 66 00 00 33 66 33 00 33 66' - '66 00 33 66 99 00 33 66 CC 00 33 66 FF 00 33 99' - '00 00 33 99 33 00 33 99 66 00 33 99 99 00 33 99' - 'CC 00 33 99 FF 00 33 CC 00 00 33 CC 33 00 33 CC' - '66 00 33 CC 99 00 33 CC CC 00 33 CC FF 00 33 FF' - '33 00 33 FF 66 00 33 FF 99 00 33 FF CC 00 33 FF' - 'FF 00 66 00 00 00 66 00 33 00 66 00 66 00 66 00' - '99 00 66 00 CC 00 66 00 FF 00 66 33 00 00 66 33' - '33 00 66 33 66 00 66 33 99 00 66 33 CC 00 66 33' - 'FF 00 66 66 00 00 66 66 33 00 66 66 66 00 66 66' - '99 00 66 66 CC 00 66 99 00 00 66 99 33 00 66 99' - '66 00 66 99 99 00 66 99 CC 00 66 99 FF 00 66 CC' - '00 00 66 CC 33 00 66 CC 99 00 66 CC CC 00 66 CC' - 'FF 00 66 FF 00 00 66 FF 33 00 66 FF 99 00 66 FF' - 'CC 00 CC 00 FF 00 FF 00 CC 00 99 99 00 00 99 33' - '99 00 99 00 99 00 99 00 CC 00 99 00 00 00 99 33' - '33 00 99 00 66 00 99 33 CC 00 99 00 FF 00 99 66' - '00 00 99 66 33 00 99 33 66 00 99 66 99 00 99 66' - 'CC 00 99 33 FF 00 99 99 33 00 99 99 66 00 99 99' - '99 00 99 99 CC 00 99 99 FF 00 99 CC 00 00 99 CC' - '33 00 66 CC 66 00 99 CC 99 00 99 CC CC 00 99 CC' - 'FF 00 99 FF 00 00 99 FF 33 00 99 CC 66 00 99 FF' - '99 00 99 FF CC 00 99 FF FF 00 CC 00 00 00 99 00' - '33 00 CC 00 66 00 CC 00 99 00 CC 00 CC 00 99 33' - '00 00 CC 33 33 00 CC 33 66 00 CC 33 99 00 CC 33' - 'CC 00 CC 33 FF 00 CC 66 00 00 CC 66 33 00 99 66' - '66 00 CC 66 99 00 CC 66 CC 00 99 66 FF 00 CC 99' - '00 00 CC 99 33 00 CC 99 66 00 CC 99 99 00 CC 99' - 'CC 00 CC 99 FF 00 CC CC 00 00 CC CC 33 00 CC CC' - '66 00 CC CC 99 00 CC CC CC 00 CC CC FF 00 CC FF' - '00 00 CC FF 33 00 99 FF 66 00 CC FF 99 00 CC FF' - 'CC 00 CC FF FF 00 CC 00 33 00 FF 00 66 00 FF 00' - '99 00 CC 33 00 00 FF 33 33 00 FF 33 66 00 FF 33' - '99 00 FF 33 CC 00 FF 33 FF 00 FF 66 00 00 FF 66' - '33 00 CC 66 66 00 FF 66 99 00 FF 66 CC 00 CC 66' - 'FF 00 FF 99 00 00 FF 99 33 00 FF 99 66 00 FF 99' - '99 00 FF 99 CC 00 FF 99 FF 00 FF CC 00 00 FF CC' - '33 00 FF CC 66 00 FF CC 99 00 FF CC CC 00 FF CC' - 'FF 00 FF FF 33 00 CC FF 66 00 FF FF 99 00 FF FF' - 'CC 00 66 66 FF 00 66 FF 66 00 66 FF FF 00 FF 66' - '66 00 FF 66 FF 00 FF FF 66 00 21 00 A5 00 5F 5F' - '5F 00 77 77 77 00 86 86 86 00 96 96 96 00 CB CB' - 'CB 00 B2 B2 B2 00 D7 D7 D7 00 DD DD DD 00 E3 E3' - 'E3 00 EA EA EA 00 F1 F1 F1 00 F8 F8 F8 00 F0 FB' - 'FF 00 A4 A0 A0 00 80 80 80 00 00 00 FF 00 00 FF' - '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' - '00 00 FF FF FF 00 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 00' - '00 00 00 00 00 07 07 07 07 04 04 04 07 07 07 07' - '07 07 07 07 07 07 07 07 00 00 00 07 07 07 07 07' - '07 07 07 07 07 07 07 00 00 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 04 04 04 04 07 07 07' - '07 07 07 00 07 07 04 04 04 04 04 04 04 04 04 07' - '07 07 07 00 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 00 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 00 07 07 07 07 00 00 00 00 00 00 00 00' - '00 00 00 00 00 07 07 07 07 00 00 00 00 00 00 00' - '00 00 00 00 00 00 07 07 07 00 07 00 07 00 07 00' - '07 00 07 00 07 00 07 07 00 00 00 00 00 00 00 00' - '00 00 00 00 00 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 04 FF 04 07 00 00 00' - '07 07 07 07 07 07 07 07 FF FF 00 07 00 00 00 00' - '00 00 07 07 07 07 07 FF 00 07 00 00 00 00 07 00' - '00 07 00 00 00 07 07 07 04 04 07 07 04 04 07 07' - '07 07 00 00 00 07 04 FF FF FF FF FF FF FF 04 07' - '07 07 00 00 00 07 07 07 07 07 07 07 07 07 07 07' - '07 07 00 00 00 07 00 00 00 00 00 00 00 00 07 07' - '07 07 00 00 00 07 07 30 79 79 79 79 79 79 79 79' - '79 79 79 79 00 07 07 07 07 00 07 EC EC EC EC EC' - 'EC EC EC EC EC 00 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 30 79 79 79 79 79 79 79 79' - '79 79 79 79 00 07 07 07 07 07 07 07 07 07 07 07' - '04 04 04 04 07 07 07 07 07 04 04 07 07 07 07 07' - '07 07 07 07 07 07 07 07 FF FF 00 07 00 00 00 00' - '00 00 07 07 07 07 07 FF 00 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 04 04 07 07 07 07 07 07' - '07 00 00 00 00 00 04 FF FF FF FF FF FF FF 04 07' - '07 00 00 00 00 00 07 07 07 07 07 07 07 07 07 07' - '07 00 00 00 00 00 00 FF FF FF FF FF FF 00 07 07' - '07 00 00 00 00 00 07 30 C3 A0 9A A0 9A A0 9A A0' - '9A 9A 9A 79 00 07 07 07 07 00 07 07 07 07 07 07' - '07 07 07 07 EC 00 07 07 07 00 07 07 00 07 00 07' - '00 07 00 07 07 00 07 30 C3 A0 9A A0 9A A0 9A A0' - '9A 9A 9A 79 00 07 07 07 07 07 07 07 07 07 07 07' - '04 FF FF 04 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 FF FF 00 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 04 04 04 04 04 04 07 07' - '07 07 07 00 07 07 04 FF FF FF FF FF FF FF 04 07' - '07 07 07 00 07 07 07 00 00 00 00 00 00 00 00 00' - '07 07 07 00 07 07 00 FF FF FF FF FF FF 00 07 07' - '07 07 07 00 07 07 07 30 C3 A0 A0 A0 A0 9A A0 9A' - 'A0 BD 9A 79 00 07 07 07 07 00 07 EC EC EC EC EC' - 'EC EC EC EC EC 00 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 30 C3 A0 A0 A0 A0 9A A0 9A' - 'A0 BD 9A 79 00 07 07 07 07 07 07 07 07 07 07 07' - '04 FF FF 04 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 00 00 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 04 04 07 07 04 04 07 07' - '07 07 07 00 07 07 04 FF FF FF FF FF FF FF 04 07' - '07 07 07 00 07 07 04 04 04 04 04 04 04 04 04 00' - '07 07 07 00 07 07 00 FF FF FF FF FF FF 00 04 04' - '04 07 07 00 07 07 07 30 C3 A0 A0 A0 A0 A0 9A A0' - '9A A0 9A 79 00 07 07 07 07 00 07 07 07 07 07 07' - '07 07 07 07 EC 00 07 07 07 00 07 07 00 07 00 07' - '00 07 00 07 07 00 07 30 C3 A0 A0 A0 A0 A0 9A A0' - '9A A0 9A 79 00 07 07 07 07 07 07 07 07 07 07 07' - '04 FF 04 04 07 07 07 07 07 07 07 07 07 07 04 04' - '04 07 07 07 07 07 07 07 00 00 00 07 07 07 07 07' - '07 07 07 07 07 07 07 FF 00 07 00 00 00 00 07 00' - '00 07 00 00 00 07 07 07 07 04 04 04 04 07 07 07' - '07 07 07 00 07 07 04 FF FF FF FF FF FF FF 04 07' - '07 07 07 00 07 07 04 FF 07 FF 07 FF 07 07 04 00' - '07 07 07 00 07 07 00 FF FF FF FF FF FF 00 A0 A0' - '04 07 07 00 07 07 07 30 C3 A0 A0 A0 A0 9A A0 9A' - 'A0 9A A0 79 00 07 00 07 07 00 07 EC EC EC EC EC' - 'EC EC 02 02 EC 00 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 30 C3 A0 A0 A0 A0 9A A0 9A' - 'A0 FF 00 79 00 07 07 00 00 00 00 00 00 07 07 07' - '04 04 04 07 07 07 07 07 07 07 07 07 07 07 04 FF' - '04 07 00 00 00 07 07 07 FF FF 00 07 00 00 00 00' - '00 00 07 07 07 07 07 FF 00 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 00 07 07 04 FF FF FF FF FF FF FF 04 07' - '07 07 07 00 07 07 04 07 FF 01 FF 01 01 07 04 00' - '07 07 07 00 07 07 00 FF FF FF FF FF FF 00 A0 A0' - '04 07 07 00 07 07 07 30 C3 A0 A0 A0 A0 A0 A0 A0' - '9A A0 9A 79 00 07 07 00 07 00 07 00 EC EC EC EC' - 'EC EC FA FA EC 00 07 07 07 00 07 07 07 07 07 07' - '00 07 00 07 07 00 07 30 C3 A0 A0 A0 A0 A0 A0 A0' - 'A0 FF 9A 79 00 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 04 04' - '07 07 07 07 07 07 07 07 FF FF 00 07 00 00 00 00' - '00 00 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 00 07 07 04 FF FF FF FF FF FF FF 04 07' - '07 07 07 00 07 07 04 FF 07 01 07 01 07 FF 04 00' - '07 07 07 00 07 07 00 FF FF FF 00 00 00 00 A0 A0' - '04 07 07 00 07 07 07 30 C3 A0 A0 A0 A0 A0 A0 A0' - 'A0 00 A0 79 00 07 07 07 00 00 00 07 07 07 07 07' - '07 07 07 07 07 00 01 01 07 07 01 01 07 07 07 07' - '07 07 07 07 07 07 07 30 C3 A0 A0 A0 A0 A0 FF 00' - 'A0 FF 00 00 FF 07 07 07 04 04 04 04 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 FF FF 00 07 07 07 07 07' - '07 07 07 07 07 07 07 00 00 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 04 04 04 04 04 07 07' - '07 07 07 00 07 07 04 04 04 04 04 04 04 04 04 07' - '07 07 07 00 07 07 04 07 01 01 FF 07 01 07 04 00' - '07 07 07 00 07 07 00 FF FF FF 00 FF 00 A0 A0 A0' - '04 07 07 00 07 07 07 30 C3 C3 C3 C3 C3 C3 C3 C3' - 'C3 00 A0 79 07 07 00 00 FF FF 00 00 00 00 00 00' - '00 00 00 00 00 00 07 01 01 01 01 07 07 00 07 00' - '07 00 07 00 07 00 07 30 C3 C3 C3 C3 C3 C3 C3 FF' - '00 FF 00 FF 07 07 07 07 04 FF FF 04 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 FF 00 07 00 00 00 00 07 00' - '00 07 00 00 00 07 07 07 04 04 07 07 04 04 07 07' - '07 07 07 00 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 00 07 07 04 FF 07 01 07 01 01 FF 04 00' - '07 07 07 00 07 07 00 FF FF FF 00 00 A0 A0 A0 A0' - '04 07 07 00 07 07 07 30 79 79 79 79 79 79 79 30' - '30 00 30 30 07 07 07 07 00 FF 00 07 07 07 07 07' - '07 07 07 07 07 07 07 07 01 01 07 07 07 07 07 07' - '07 07 07 07 07 07 07 30 79 79 79 79 79 79 00 00' - 'FF FF FF 00 00 07 07 07 04 FF FF 04 07 07 07 07' - '07 07 07 07 07 07 07 04 04 04 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 00 00 00 07 07 07 07 07' - '07 07 07 07 07 07 07 FF 00 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 04 04 07 07 04 04 07 07' - '07 07 07 00 07 07 07 07 07 07 07 04 04 04 04 07' - '07 07 07 00 07 07 04 07 FF 07 FF 07 FF 07 04 00' - '07 07 07 00 07 07 00 00 00 00 00 A0 A0 04 04 04' - '04 07 07 00 07 07 07 07 30 FF C3 C3 A0 A0 30 00' - '07 00 07 07 07 07 07 00 07 00 07 00 07 07 07 07' - '07 07 07 07 07 07 07 01 01 01 01 07 07 07 07 07' - '07 07 07 07 07 07 07 07 30 FF C3 C3 A0 FF FF FF' - 'FF FF FF FF FF FF 07 07 04 FF 04 04 07 07 07 07' - '07 07 07 07 07 07 07 04 FF 04 07 00 00 00 07 07' - '07 07 07 07 07 07 07 07 FF FF 00 07 00 00 00 00' - '00 00 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 04 04 04 04 04 07 07' - '07 07 07 00 07 07 07 07 07 07 07 04 FF FF 04 07' - '07 07 07 00 07 07 04 04 04 04 04 04 04 04 04 00' - '07 07 07 00 07 07 07 07 07 04 C3 A0 A0 04 C3 04' - '07 07 07 00 07 07 07 07 07 30 30 30 30 30 00 07' - '07 00 07 07 07 07 00 07 07 FF 07 07 00 07 07 07' - '07 07 07 07 07 07 01 01 07 07 01 01 07 07 07 07' - '07 07 07 07 07 07 07 07 07 30 30 30 30 30 00 00' - 'FF FF FF 00 07 07 07 07 04 04 04 07 07 07 07 07' - '07 07 07 07 07 07 07 04 04 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 FF FF 00 07 00 00 00 00' - '00 00 07 07 07 07 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 07 07 07 07 07 07 04 04 07 07' - '07 07 07 00 07 07 07 07 07 07 07 04 FF FF 04 07' - '07 07 07 00 07 07 04 FC 04 FC FC FC 04 FC 04 00' - '07 07 07 00 07 07 07 07 07 04 FF C3 C3 04 04 07' - '07 07 07 00 07 07 07 07 07 07 07 07 07 07 07 00' - '00 00 00 00 07 07 07 07 07 00 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 00 FF' - '00 FF 00 FF 00 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 FF FF 00 07 07 07 07 07' - '07 07 07 07 07 07 00 FF FF 92 FF FF FF FF 92 FF' - 'FF 92 FF FF FF 00 07 07 07 04 04 04 04 07 07 07' - '07 07 07 00 07 07 07 07 07 07 07 04 04 04 04 07' - '07 07 07 00 07 07 04 04 04 04 04 04 04 04 04 07' - '07 07 07 00 07 07 07 07 07 04 04 04 04 04 07 07' - '07 07 07 00 07 07 07 07 07 07 07 07 07 07 07 07' - '00 00 00 07 07 07 07 07 07 FF 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 FF 07' - '07 FF 00 07 FF 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 00 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07' - '07 FF 00 07 07 07' -} */ - -/* BINRES idb_view_large.bmp */ +/* @makedep: idb_view_large.bmp */ IDB_VIEW_LARGE BITMAP LOADONCALL MOVEABLE DISCARDABLE idb_view_large.bmp -/* { - '42 4D DE 08 00 00 00 00 00 00 76 00 00 00 28 00' - '00 00 20 01 00 00 18 00 00 00 01 00 04 00 02 00' - '00 00 68 08 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' - '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' - '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF' - '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' - '00 00 FF FF FF 00 FE 77 22 77 00 00 78 77 0E 44' - '04 77 02 71 16 77 02 71 16 77 02 71 64 77 00 00' - '0C 77 02 70 08 00 08 77 04 44 0E 77 00 06 74 44' - '47 00 06 77 04 44 08 77 00 04 74 77 04 00 00 0E' - '07 00 07 00 07 00 07 00 08 77 06 44 06 77 02 71' - '04 77 02 4F 0A FF 02 F4 04 77 00 04 11 17 14 77' - '00 04 11 17 14 77 00 04 11 17 62 77 00 00 1E 77' - '00 04 4F F4 0E 77 00 06 74 FF 47 00 06 77 00 04' - '4F F4 24 77 00 0A 74 44 77 74 47 00 04 77 00 08' - '11 17 77 4F 0A FF 00 06 F4 77 71 00 04 11 12 77' - '02 71 04 11 12 77 02 71 04 11 00 04 77 70 16 00' - '30 77 12 00 02 07 04 77 00 00 0E 77 06 44 02 47' - '08 77 00 06 4F F4 70 00 06 00 06 77 00 06 74 FF' - '47 00 04 00 00 08 07 4F F4 70 04 00 00 06 77 74' - '77 00 04 00 00 0E 07 00 07 00 07 00 07 00 06 77' - '00 04 74 44 08 77 02 71 04 11 00 04 77 4F 0A FF' - '00 04 F4 77 06 11 02 17 10 77 06 11 02 17 10 77' - '06 11 00 04 17 70 14 BF 02 B0 04 77 12 00 02 07' - '04 77 14 07 02 0F 10 BF 02 07 04 77 00 00 0E 77' - '02 4F 04 FF 02 47 08 77 00 04 4F 44 0E 77 00 06' - '74 F4 47 00 06 77 00 04 4F 44 24 77 00 04 74 44' - '08 77 06 11 00 04 17 4F 0A FF 02 F4 04 77 02 71' - '16 77 02 71 16 77 02 71 04 77 02 70 14 FB 02 F0' - '04 77 02 07 10 88 02 07 18 77 02 0B 10 FB 02 07' - '04 77 00 00 0E 77 02 4F 04 FF 02 47 08 77 00 04' - '44 47 0E 77 00 04 74 44 08 77 00 04 44 47 08 77' - '00 04 74 77 04 00 00 0E 07 00 07 00 07 00 07 00' - '06 77 02 74 06 44 02 47 04 77 02 71 04 77 02 4F' - '0A FF 02 F4 04 77 02 71 16 77 02 71 04 77 02 74' - '08 44 02 47 06 77 02 71 04 77 02 70 14 BF 02 B0' - '04 77 02 07 0E 77 00 04 78 07 04 77 02 07 0E 70' - '00 06 77 07 0F 00 10 BF 02 07 04 77 00 00 0E 77' - '02 4F 04 FF 02 47 4E 77 00 0A 74 44 77 44 47 00' - '04 77 02 71 04 77 02 4F 0A FF 02 F4 04 77 02 71' - '16 77 02 71 04 77 02 74 08 FF 02 47 06 77 02 71' - '04 77 02 70 06 FB 0C 00 00 04 FB F0 04 77 02 07' - '10 88 02 07 18 77 02 0B 10 FB 02 07 04 77 00 00' - '0E 77 02 4F 04 FF 02 47 32 77 00 04 74 77 04 00' - '00 0E 07 00 07 00 07 00 07 00 06 77 00 0A 74 44' - '77 44 47 00 04 77 02 71 04 77 02 4F 0A FF 02 F4' - '04 77 02 71 08 77 0A 00 04 77 02 71 04 77 02 74' - '08 FF 02 47 06 77 02 71 04 77 02 70 06 BF 02 0F' - '0C BF 02 B0 04 77 02 07 0E 77 00 04 78 07 04 77' - '02 07 0E 70 00 06 77 07 0F 00 10 BF 02 07 04 77' - '00 00 0E 77 00 08 4F FF 44 47 1A 77 00 06 74 44' - '47 00 06 77 04 44 26 77 06 44 06 77 02 71 04 77' - '02 4F 0A FF 02 F4 04 77 02 71 06 77 02 74 08 44' - '02 40 04 77 02 71 04 77 02 74 08 FF 02 47 06 77' - '02 71 04 77 02 70 06 FB 02 0B 0C FB 02 F0 04 77' - '02 07 10 88 02 07 18 77 02 0B 10 FB 02 07 04 77' - '00 00 0E 77 00 06 4F FF 44 00 0E 77 00 06 74 44' - '47 00 08 77 00 06 74 FF 47 00 06 77 00 04 4F F4' - '08 77 00 04 74 77 04 00 00 0E 07 00 07 00 07 00' - '07 00 14 77 02 71 04 77 02 4F 0A FF 02 F4 04 77' - '02 71 06 77 02 74 08 F7 02 40 04 77 02 71 04 77' - '02 74 08 FF 04 44 00 06 47 77 71 00 04 77 02 70' - '06 BF 02 0F 0C BF 00 08 B0 07 77 07 10 88 02 07' - '04 77 02 07 10 77 00 04 07 0F 10 BF 02 07 04 77' - '00 00 02 77 08 00 00 04 07 77 04 44 02 47 0E 77' - '00 06 74 FF 47 00 08 77 00 06 74 FF 47 00 04 00' - '00 08 07 4F F4 70 04 00 2C 77 02 71 04 77 02 4F' - '0A FF 02 F4 04 77 02 71 06 77 02 74 08 7F 02 40' - '04 77 02 71 04 77 02 74 08 FF 00 0A 4F BF 47 77' - '71 00 04 77 00 06 70 FB F0 00 06 00 0A FB 00 0A' - 'F0 70 77 07 80 00 0A 88 00 10 82 28 07 71 17 77' - '71 17 06 77 04 70 04 77 02 0B 10 FB 00 06 07 77' - '07 00 00 00 22 77 00 06 74 FF 47 00 06 00 00 08' - '07 74 F4 47 06 77 00 04 4F 44 08 77 00 04 74 77' - '04 00 00 0E 07 00 07 00 07 00 07 00 14 77 02 71' - '04 77 02 4F 0A FF 02 F4 04 77 02 71 06 77 00 0C' - '74 F7 17 11 17 40 04 77 02 71 04 77 02 74 08 FF' - '00 0A 4B FB 47 77 71 00 04 77 02 70 04 BF 04 00' - '02 0F 0A BF 00 04 B0 77 04 07 02 08 0A 88 00 0E' - '8A A8 07 77 11 77 11 00 0E 77 00 04 07 0F 0C BF' - '00 0A B0 BF 07 70 77 00 00 00 00 04 77 74 06 44' - '18 77 00 06 74 F4 47 00 08 77 00 04 74 44 08 77' - '00 04 44 47 26 77 06 44 02 47 04 77 02 71 04 77' - '0E 44 04 77 02 71 06 77 00 0C 74 7F 1F 18 7F 40' - '04 77 02 71 04 77 02 74 08 FF 00 0A 4F BF 47 77' - '71 00 04 77 02 70 04 FB 00 04 F0 00 0C FB 00 08' - 'F0 77 70 00 0E 77 00 0C 78 07 77 71 11 17 10 77' - '02 0B 0E FB 02 0B 04 07 02 77 00 00 00 04 77 74' - '04 FF 02 F4 18 77 00 04 74 44 22 77 00 04 74 77' - '04 00 00 0E 07 00 07 00 07 00 07 00 06 77 00 0A' - '74 44 77 44 47 00 04 77 02 71 16 77 02 71 06 77' - '00 0C 74 F7 17 F1 87 40 04 77 02 71 04 77 02 74' - '04 FF 00 0E F4 44 4B FB 47 77 71 00 04 77 02 70' - '06 BF 02 0F 0C BF 00 08 B0 00 07 70 10 00 02 07' - '04 77 00 04 11 77 10 07 02 0F 0E BF 00 04 B0 00' - '04 77 00 00 00 04 77 74 04 FF 02 F4 5A 77 00 0A' - '74 44 77 44 47 00 04 77 02 71 16 77 02 71 06 77' - '00 0C 74 71 1F 7F 1F 40 04 77 02 71 04 77 02 74' - '04 FF 04 F4 04 BF 00 06 47 77 71 00 04 77 02 70' - '14 FB 00 04 F0 77 04 70 14 77 00 06 71 11 17 00' - '10 77 12 00 00 06 77 00 07 00 00 00 00 04 77 74' - '04 FF 02 F4 0E 77 00 06 74 44 47 00 12 77 00 06' - '74 44 47 00 06 77 04 44 08 77 00 04 74 77 04 00' - '00 0E 07 00 07 00 07 00 07 00 06 77 00 0A 74 44' - '77 44 47 00 04 77 02 71 0A 77 02 74 04 44 02 47' - '04 77 02 71 06 77 00 0C 74 F7 17 11 87 40 04 77' - '02 71 04 77 02 74 04 FF 00 04 F4 4B 04 FB 00 06' - '47 77 71 00 04 77 02 70 14 BF 00 04 B0 77 06 07' - '12 77 00 06 11 77 11 00 10 77 02 70 08 FB 02 07' - '04 77 04 70 04 77 00 00 00 04 77 74 04 FF 02 F4' - '0E 77 00 06 74 FF 47 00 12 77 00 06 74 FF 47 00' - '06 77 00 04 4F F4 24 77 00 0A 74 44 77 44 47 00' - '04 77 02 71 0A 77 02 74 04 FF 02 47 04 77 02 71' - '06 77 02 74 08 7F 02 40 04 77 02 71 04 77 02 74' - '06 44 06 BF 00 06 47 77 71 00 04 77 02 70 14 00' - '00 04 07 70 04 77 02 70 10 77 00 0A 71 17 77 71' - '17 00 10 77 02 0F 04 BF 02 B0 06 77 06 07 02 77' - '00 00 00 0A 77 74 FF F4 44 00 0E 77 00 06 74 FF' - '47 00 06 00 02 07 0A 77 00 06 74 FF 47 00 04 00' - '00 08 07 4F F4 70 04 00 00 04 77 74 14 44 08 77' - '06 44 02 47 04 77 02 71 0A 77 02 74 04 FF 02 47' - '04 77 02 71 06 77 02 74 08 F7 02 40 04 77 02 71' - '08 77 02 74 04 FB 00 0A F4 44 47 77 71 00 06 77' - '02 0F 08 BF 02 07 0A 77 00 0A 07 77 07 77 07 00' - '28 77 02 70 04 00 02 07 04 77 02 70 04 77 00 04' - '70 77 00 00 00 0A 77 74 FF F4 47 00 0E 77 00 06' - '74 F4 47 00 12 77 00 06 74 F4 47 00 06 77 00 04' - '4F 44 2A 77 00 04 44 47 04 77 02 71 0A 77 02 74' - '04 FF 02 47 04 77 02 71 06 77 02 74 08 44 02 40' - '04 77 02 71 08 77 02 74 04 BF 00 04 B4 F4 04 77' - '02 71 06 77 02 70 06 FB 02 F0 4A 77 00 0A 07 77' - '07 77 07 00 00 00 00 04 77 74 04 44 10 77 00 04' - '74 44 14 77 00 04 74 44 08 77 00 04 44 47 0C 77' - '04 00 00 08 70 00 70 00 0E 77 06 44 06 77 02 71' - '0A 77 02 74 04 FF 02 47 04 77 02 71 06 77 00 0C' - '74 CC 4C C4 CC 40 04 77 02 71 08 77 02 74 04 FB' - '00 04 F4 47 04 77 02 71 08 77 06 00 02 07 10 77' - '02 07 42 77 00 00 7E 77 02 74 04 44 02 47 04 77' - '02 71 06 77 02 74 08 44 02 47 04 77 02 71 08 77' - '02 74 06 44 06 77 02 71 5E 77 02 07 04 77 00 00' - 'FE 77 22 77 00 00 FE 77 22 77 00 00 00 01' -} */ - -/* BINRES idb_hist_small.bmp */ +/* @makedep: idb_hist_small.bmp */ IDB_HIST_SMALL BITMAP LOADONCALL DISCARDABLE idb_hist_small.bmp -/* { - '42 4D 8A 05 00 00 00 00 00 00 8A 00 00 00 28 00' - '00 00 50 00 00 00 10 00 00 00 01 00 08 00 00 00' - '00 00 00 05 00 00 12 0B 00 00 12 0B 00 00 15 00' - '00 00 15 00 00 00 FF FF FF 00 00 00 80 00 00 80' - '00 00 00 80 80 00 80 00 00 00 80 00 80 00 00 00' - '00 00 80 80 80 00 C0 C0 C0 00 00 00 FF 00 00 FF' - '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' - '00 00 00 66 66 00 CC FF FF 00 99 CC FF 00 99 FF' - 'FF 00 66 CC CC 00 CC CC FF 00 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 06 06 06 06 06' - '06 06 06 06 06 06 06 06 06 08 08 08 08 08 08 06' - '06 06 06 06 06 06 06 06 06 06 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 03 13 13 13 13 13' - '13 13 13 13 13 13 13 13 06 08 08 08 08 08 03 13' - '13 13 13 13 13 13 13 13 13 06 08 08 04 04 04 04' - '04 04 04 04 04 04 04 04 04 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 03 10 11 12 11 12' - '11 04 11 12 11 11 11 13 06 08 08 08 08 08 03 10' - '12 12 04 11 04 11 04 11 13 06 08 08 04 00 00 00' - '04 00 00 00 00 00 00 00 04 08 08 08 08 08 08 08' - '08 08 08 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 08 08 08 08 08 08 08 08 08 03 10 12 12 12 04' - '12 04 12 04 12 14 11 13 06 08 08 08 08 08 03 10' - '12 12 12 04 04 04 11 12 13 06 08 08 04 00 00 00' - '04 00 00 00 00 00 00 00 04 08 08 08 08 08 08 08' - '08 08 06 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 06 08 08 08 08 08 08 08 08 03 10 12 12 12 12' - '04 04 04 12 11 12 11 13 06 08 06 06 06 06 03 10' - '12 12 04 04 12 04 04 11 13 06 08 08 04 00 06 00' - '04 00 00 06 06 06 00 00 04 08 08 08 08 08 08 08' - '08 06 06 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 06 06 08 08 08 08 08 08 08 03 10 12 12 04 04' - '04 00 04 04 04 11 12 13 06 08 06 00 00 00 03 10' - '12 12 12 04 04 04 12 12 13 06 08 08 04 00 00 00' - '04 00 00 00 00 00 00 00 04 08 08 08 08 08 08 08' - '06 06 06 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 06 06 06 08 08 08 08 08 08 03 10 12 12 12 12' - '04 04 04 12 11 12 11 13 06 08 06 00 04 04 03 10' - '12 12 04 12 04 12 04 11 13 06 08 08 04 00 06 00' - '04 00 00 06 06 06 00 00 04 08 08 08 08 08 08 06' - '06 06 06 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 06 06 06 06 08 08 08 08 08 03 10 12 12 12 04' - '12 04 12 04 12 11 12 13 06 08 06 00 00 00 03 10' - '10 10 10 10 10 10 10 12 13 06 08 08 04 00 00 00' - '04 00 00 00 00 00 00 00 04 08 08 08 08 08 08 08' - '06 06 06 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 06 06 06 08 08 08 08 08 08 03 10 12 12 12 12' - '12 04 12 12 12 12 11 13 06 08 06 00 04 04 03 13' - '13 13 13 13 13 03 03 03 03 08 08 08 04 00 06 00' - '04 00 00 06 06 06 00 00 04 08 08 08 08 08 08 08' - '08 06 06 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 06 06 08 08 08 08 08 08 08 03 10 10 10 10 10' - '10 10 10 10 10 10 12 13 06 08 06 00 00 00 00 03' - '10 10 12 12 03 06 08 08 08 08 08 08 04 00 00 00' - '04 00 00 00 00 00 00 00 04 08 08 08 08 08 08 08' - '08 08 06 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 06 08 08 08 08 08 08 08 08 03 13 13 13 13 13' - '13 13 03 03 03 03 03 03 08 08 06 00 02 02 00 04' - '03 03 03 03 06 08 08 06 08 08 08 08 04 00 00 00' - '04 00 00 00 00 00 00 00 04 08 08 08 08 08 08 08' - '08 08 08 06 08 08 08 08 08 08 08 08 08 08 08 08' - '06 08 08 08 08 08 08 08 08 08 08 03 00 10 10 12' - '12 03 06 08 08 08 08 08 08 08 06 00 02 02 00 00' - '00 00 06 08 08 08 08 06 08 08 08 08 04 04 04 04' - '04 04 04 04 04 04 04 04 04 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 03 03 03 03' - '03 06 08 08 08 08 08 08 08 08 06 00 02 02 00 04' - '04 00 06 08 08 06 06 06 06 06 08 08 04 04 04 04' - '04 04 04 04 04 04 04 04 04 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 06 00 00 00 00 00' - '00 00 06 08 08 08 08 06 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08 06 06 06 06 06 06' - '06 06 06 08 08 08 08 06 08 08 08 08 08 08 08 08' - '08 08 08 08 08 08 08 08 08 08' -} */ - -/* BINRES idb_hist_large.bmp */ +/* @makedep: idb_hist_large.bmp */ IDB_HIST_LARGE BITMAP LOADONCALL DISCARDABLE idb_hist_large.bmp -/* { - '42 4D 16 06 00 00 00 00 00 00 76 00 00 00 28 00' - '00 00 78 00 00 00 18 00 00 00 01 00 04 00 00 00' - '00 00 A0 05 00 00 12 0B 00 00 12 0B 00 00 10 00' - '00 00 10 00 00 00 FF FF FF 00 00 00 80 00 00 80' - '00 00 00 80 80 00 80 00 00 00 80 00 80 00 00 00' - '00 00 80 80 80 00 C0 C0 C0 00 00 00 FF 00 00 FF' - '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' - '00 00 00 66 66 00 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 86 66 66 66 66 66 66 66 66 66' - '66 88 88 88 88 86 66 66 66 66 66 66 66 66 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 86 0B B0 BB 0B B0 BB 0B B0 BB 06 88 88 88' - '88 86 0B B0 BB 0B B0 BB 0B B6 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 86 0B' - 'B0 BB 0B B0 BB 0B B0 BB 06 88 88 88 88 86 0B B0' - 'BB 0B B0 BB 0B B6 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 86 B0 0B 00 B0 04' - '00 B0 0B 00 B6 88 88 88 88 86 B0 0B 44 B4 4B 44' - 'B0 06 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 68 88 88 88 88 88 88 88 88 86 88' - '88 88 88 88 88 88 86 0B B0 BB 4B B4 BB 4B B0 BB' - '06 88 88 88 88 86 0B B0 BB 44 44 BB 0B B6 88 88' - '84 44 44 44 44 44 44 48 88 88 88 88 88 88 88 88' - '86 68 88 88 88 88 88 88 88 88 86 68 88 88 88 88' - '88 88 86 0B B0 BB 4B B4 BB 4B B0 BB 06 88 88 88' - '88 86 0B B0 BB 44 44 BB 0B B6 88 88 84 00 04 00' - '00 00 00 48 88 88 88 88 88 88 88 88 66 68 88 88' - '88 88 88 88 88 88 86 66 88 88 88 88 88 88 86 B0' - '0B 00 B4 44 44 B0 0B 00 B6 88 86 66 66 66 B0 0B' - '44 4B B4 44 B0 06 88 88 84 00 04 00 00 00 00 48' - '88 88 88 88 88 88 88 86 66 68 88 88 88 88 88 88' - '88 88 86 66 68 88 88 88 88 88 86 0B B0 44 44 40' - '44 44 40 BB 06 88 86 00 00 06 0B B0 BB 44 44 BB' - '0B B6 88 88 84 06 04 00 66 66 00 48 88 88 88 88' - '88 88 88 66 66 68 88 88 88 88 88 88 88 88 86 66' - '66 88 88 88 88 88 86 0B B0 44 44 40 44 44 40 BB' - '06 88 86 00 00 06 0B B0 BB 44 44 BB 0B B6 88 88' - '84 00 04 00 00 00 00 48 88 88 88 88 88 88 86 66' - '66 68 88 88 88 88 88 88 88 88 86 66 66 68 88 88' - '88 88 86 B0 0B 00 B4 44 44 B0 0B 00 B6 88 86 04' - '44 46 B0 0B 44 B4 4B 44 B0 06 88 88 84 06 04 00' - '66 66 00 48 88 88 88 88 88 88 66 66 66 68 88 88' - '88 88 88 88 88 88 86 66 66 66 88 88 88 88 86 0B' - 'B0 BB 4B B4 BB 4B B0 BB 06 88 86 00 00 06 0B B0' - 'BB 0B B0 BB 0B B6 88 88 84 00 04 00 00 00 00 48' - '88 88 88 88 88 88 66 66 66 68 88 88 88 88 88 88' - '88 88 86 66 66 66 88 88 88 88 86 0B B0 BB 4B B4' - 'BB 4B B0 BB 06 88 86 00 00 06 0B B0 BB 0B B0 BB' - '0B B6 88 88 84 06 04 00 66 66 00 48 88 88 88 88' - '88 88 86 66 66 68 88 88 88 88 88 88 88 88 86 66' - '66 68 88 88 88 88 86 B0 0B 00 B0 04 00 B0 0B 00' - 'B6 88 86 04 44 46 66 66 66 66 66 66 66 66 88 88' - '84 00 04 00 00 00 00 48 88 88 88 88 88 88 88 66' - '66 68 88 88 88 88 88 88 88 88 86 66 66 88 88 88' - '88 88 86 0B B0 BB 0B B0 BB 0B B0 BB 06 88 86 00' - '00 00 6B B0 BB 06 88 88 88 88 88 88 84 00 04 00' - '00 00 00 48 88 88 88 88 88 88 88 86 66 68 88 88' - '88 88 88 88 88 88 86 66 68 88 88 88 88 88 86 0B' - 'B0 BB 0B B0 BB 0B B0 BB 06 88 86 00 00 00 6B B0' - 'BB 06 88 88 88 88 88 88 84 44 44 44 44 44 44 48' - '88 88 88 88 88 88 88 88 66 68 88 88 88 88 88 88' - '88 88 86 66 88 88 88 88 88 88 86 66 66 66 66 66' - '66 66 66 66 66 88 86 02 22 00 46 66 66 68 88 88' - '68 88 88 88 84 44 44 44 44 44 44 48 88 88 88 88' - '88 88 88 88 86 68 88 88 88 88 88 88 88 88 86 68' - '88 88 88 88 88 88 88 6B B0 BB 0B B6 88 88 88 88' - '88 88 86 02 22 00 00 00 68 88 88 88 68 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 68 88 88 88 88 88 88 88 88 86 88 88 88 88 88' - '88 88 88 6B B0 BB 0B B6 88 88 88 88 88 88 86 02' - '22 00 00 00 68 88 88 88 68 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 86' - '66 66 66 68 88 88 88 88 88 88 86 02 22 00 44 40' - '68 88 86 66 66 66 88 88 88 88 88 88 88 88 88 88' - '87 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 86 00 00 00 00 00 68 88 88 88' - '68 88 88 88 88 88 88 88 88 88 88 88 87 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 86 00 00 00 00 00 68 88 88 88 68 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 88 88 88 86 66' - '66 66 66 66 68 88 88 88 68 88 88 88 88 88 88 88' - '88 88 88 88 88 88' -} */ - -/* BINRES idc_copy.cur */ +/* @makedep: idc_copy.cur */ IDC_COPY CURSOR LOADONCALL DISCARDABLE idc_copy.cur -/* { - '00 00 02 00 01 00 20 20 00 00 00 00 00 00 30 01' - '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 C0 00 00 00 C0' - '00 00 01 80 00 00 01 80 00 00 03 00 00 00 43 00' - '00 00 66 00 00 00 76 00 00 00 7E 00 00 00 7F C0' - '00 00 7F 80 00 00 7F 00 00 00 7E 00 00 00 7C 00' - '00 00 78 00 00 00 70 00 00 00 60 00 00 00 40 00' - '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FD FF FF FF FD FF FF FF F0' - '7F FF FF FD FF FF FF 3D FF FF FE 1F FF FF FE 1F' - 'FF FF FC 3F FF FF 7C 3F FF FF 38 7F FF FF 18 7F' - 'FF FF 00 FF FF FF 00 FF FF FF 00 0F FF FF 00 1F' - 'FF FF 00 3F FF FF 00 7F FF FF 00 FF FF FF 01 FF' - 'FF FF 03 FF FF FF 07 FF FF FF 0F FF FF FF 1F FF' - 'FF FF 3F FF FF FF' -} */ - -/* BINRES idc_divider.cur */ +/* @makedep: idc_divider.cur */ IDC_DIVIDER CURSOR LOADONCALL DISCARDABLE idc_divider.cur -/* { - '00 00 02 00 01 00 20 20 00 00 09 00 09 00 30 01' - '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 01 00 00 00 00 00 80 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 E0' - '00 00 01 20 00 00 01 20 00 00 01 20 00 00 01 20' - '00 00 19 26 00 00 29 25 00 00 4F 3C 80 00 80 00' - '40 00 80 00 40 00 4F 3C 80 00 29 25 00 00 19 26' - '00 00 01 20 00 00 01 20 00 00 01 20 00 00 01 20' - '00 00 01 E0 00 00 FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FE 1F' - 'FF FF FE 1F FF FF FE 1F FF FF FE 1F FF FF FE 1F' - 'FF FF E6 19 FF FF C6 18 FF FF 80 00 7F FF 00 00' - '3F FF 00 00 3F FF 80 00 7F FF C6 18 FF FF E6 19' - 'FF FF FE 1F FF FF FE 1F FF FF FE 1F FF FF FE 1F' - 'FF FF FE 1F FF FF' -} */ - -/* BINRES idc_divideropen.cur */ +/* @makedep: idc_divideropen.cur */ IDC_DIVIDEROPEN CURSOR LOADONCALL DISCARDABLE idc_divideropen.cur -/* { - '00 00 02 00 01 00 20 20 00 00 09 00 09 00 30 01' - '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 01 00 00 00 00 00 80 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 F0' - '00 00 02 D0 00 00 02 D0 00 00 02 D0 00 00 02 D0' - '00 00 1A D6 00 00 2A D5 00 00 4E DC 80 00 80 C0' - '40 00 80 C0 40 00 4E DC 80 00 2A D5 00 00 1A D6' - '00 00 02 D0 00 00 02 D0 00 00 02 D0 00 00 02 D0' - '00 00 03 F0 00 00 FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC 0F' - 'FF FF FC 0F FF FF FC 0F FF FF FC 0F FF FF FC 0F' - 'FF FF E4 09 FF FF C4 08 FF FF 80 00 7F FF 00 00' - '3F FF 00 00 3F FF 80 00 7F FF C4 08 FF FF E4 09' - 'FF FF FC 0F FF FF FC 0F FF FF FC 0F FF FF FC 0F' - 'FF FF FC 0F FF FF' -} */ - -/* BINRES idc_movebutton.cur */ +/* @makedep: idc_movebutton.cur */ IDC_MOVEBUTTON CURSOR LOADONCALL DISCARDABLE idc_movebutton.cur -/* { - '00 00 02 00 01 00 20 20 00 00 10 00 10 00 30 01' - '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 0F F8 00 00 0F' - 'F8 00 00 1F FC 00 00 1F FC 00 00 3F FC 00 00 3F' - 'FE 00 00 7F FE 00 00 5F FE 00 00 DF FE 00 01 DF' - 'FE 00 01 9F FE 00 00 1D B6 00 00 1D B4 00 00 0D' - 'B0 00 00 01 80 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF FF FF D2 49' - '24 93 DF FF FF FF FF FF FF FB DF FF FF FB DF FF' - 'FF FF FF FF FF FB DF E0 03 FB DF E0 03 FF FF E0' - '03 FB DF C0 01 FB DF C0 01 FF FF 80 01 FB DF 80' - '00 FB DF 00 00 FF FF 00 00 FB DE 00 00 FB DC 00' - '00 FF FC 00 00 FB DC 40 00 FB DF C0 01 FF FF E0' - '03 FB DF F0 0F FB DF FE 7F FF FF FF FF FB DF FF' - 'FF FB DF FF FF FF FF FF FF FB C9 24 92 4B FF FF' - 'FF FF FF FF FF FF' -} */ - -/* BINRES idi_dragarrow.ico */ +/* @makedep: idi_dragarrow.ico */ IDI_DRAGARROW ICON LOADONCALL DISCARDABLE idi_dragarrow.ico -/* { - '00 00 01 00 01 00 20 20 02 00 00 00 00 00 30 01' - '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 60 00 00 00 50 00 00 0F C8' - '00 00 08 04 00 00 08 02 00 00 08 04 00 00 09 C8' - '00 00 09 50 00 00 0F 60 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF 9F FF FF FF 8F FF FF F0 07' - 'FF FF F0 03 FF FF F0 01 FF FF F0 03 FF FF F0 07' - 'FF FF F0 8F FF FF F0 9F FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF' -} */ - -/* BINRES idi_tt_info_sm.ico */ +/* @makedep: idi_tt_info_sm.ico */ IDI_TT_INFO_SM ICON LOADONCALL DISCARDABLE idi_tt_info_sm.ico -/* { - '00 00 01 00 01 00 10 10 10 00 00 00 00 00 28 01' - '00 00 16 00 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 04 00 00 00 00 00 C0 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00' - '00 00 80 00 80 00 80 80 00 00 C0 C0 C0 00 80 80' - '80 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00' - '00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 00 00' - '00 00 08 80 00 00 00 00 00 08 00 80 00 00 00 00' - '08 80 F0 80 00 00 00 00 80 0F F0 88 00 00 00 00' - '0F FF FF 00 80 00 00 0F FF FF FF FF 08 00 08 FF' - 'FC CC CC FF F0 80 8F FF FF 8C CF FF FF 08 8F FF' - 'FF 8C CF FF FF 08 8F FF FF 8C CF FF FF 08 8F FF' - 'F8 CC CF FF FF 00 8F FF FF FF FF FF FF 00 08 FF' - 'FF 8C CF FF F0 00 00 8F FF CC CF FF 00 00 00 08' - '8F FF FF 00 00 00 00 00 08 88 88 00 00 00 FF 9F' - '00 00 FE 1F 00 00 F8 1F 00 00 F0 0F 00 00 E0 07' - '00 00 C0 03 00 00 80 01 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 01 00 00 00 01 00 00 80 03' - '00 00 C0 07 00 00 E0 0F 00 00 F8 3F 00 00' -} */ - -/* BINRES idi_tt_warn_sm.ico */ +/* @makedep: idi_tt_warn_sm.ico */ IDI_TT_WARN_SM ICON LOADONCALL DISCARDABLE idi_tt_warn_sm.ico -/* { - '00 00 01 00 01 00 10 10 10 00 00 00 00 00 28 01' - '00 00 16 00 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 04 00 00 00 00 00 C0 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00' - '00 00 80 00 80 00 80 80 00 00 C0 C0 C0 00 80 80' - '80 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00' - '00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 03 33' - '33 33 33 33 33 33 00 00 00 00 00 00 00 03 0B BB' - 'BB BB BB BB BB 03 00 BB BB 30 3B BB B0 30 00 BB' - 'BB 30 3B BB B0 30 00 0B BB BB BB BB 03 00 00 0B' - 'BB B0 BB BB 03 00 00 00 BB 30 3B B0 30 00 00 00' - 'BB 00 0B B0 30 00 00 00 0B 00 0B 03 00 00 00 00' - '0B B0 BB 03 00 00 00 00 00 BB B0 30 00 00 00 00' - '00 BB B0 30 00 00 00 00 00 0B 03 00 00 00 00 00' - '00 0B 03 00 00 00 00 00 00 00 30 00 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 80 01 00 00 80 01' - '00 00 C0 03 00 00 C0 03 00 00 E0 07 00 00 E0 07' - '00 00 F0 0F 00 00 F0 0F 00 00 F8 1F 00 00 F8 1F' - '00 00 FC 3F 00 00 FC 3F 00 00 FE 7F 00 00' -} */ - -/* BINRES idi_tt_error_sm.ico */ +/* @makedep: idi_tt_error_sm.ico */ IDI_TT_ERROR_SM ICON LOADONCALL DISCARDABLE idi_tt_error_sm.ico -/* { - '00 00 01 00 01 00 10 10 10 00 00 00 00 00 28 01' - '00 00 16 00 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 04 00 00 00 00 00 C0 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00' - '00 00 80 00 80 00 80 80 00 00 C0 C0 C0 00 80 80' - '80 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00' - '00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 00 00' - '08 88 88 80 00 00 00 08 81 11 11 88 80 00 00 01' - '19 99 99 11 88 00 00 19 99 99 99 99 18 80 01 99' - 'F9 99 99 F9 91 80 01 9F FF 99 9F FF 91 88 19 99' - 'FF F9 FF F9 99 18 19 99 9F FF FF 99 99 18 19 99' - '99 FF F9 99 99 18 19 99 9F FF FF 99 99 10 19 99' - 'FF F9 FF F9 99 10 01 9F FF 99 9F FF 91 00 01 99' - 'F9 99 99 F9 91 00 00 19 99 99 99 99 10 00 00 01' - '19 99 99 11 00 00 00 00 01 11 11 00 00 00 F8 1F' - '00 00 E0 07 00 00 E0 03 00 00 C0 01 00 00 80 01' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 01 00 00 00 01 00 00 80 03 00 00 80 03' - '00 00 C0 07 00 00 E0 0F 00 00 F8 3F 00 00' -} */ /* @@ -1203,8 +94,8 @@ IDI_TT_ERROR_SM ICON LOADONCALL DISCARDABLE idi_tt_error_sm.ico #include "comctl_Cn.rc" #include "comctl_Cs.rc" #include "comctl_De.rc" -#include "comctl_En.rc" #include "comctl_El.rc" +#include "comctl_En.rc" #include "comctl_Eo.rc" #include "comctl_Es.rc" #include "comctl_Fr.rc" diff --git a/reactos/dll/win32/comctl32/status.c b/reactos/dll/win32/comctl32/status.c index 8106ba9c3dd..dcfe80141e8 100644 --- a/reactos/dll/win32/comctl32/status.c +++ b/reactos/dll/win32/comctl32/status.c @@ -20,14 +20,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * NOTE - * + * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 24, 2002, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. - * + * * TODO: * -- CCS_BOTTOM (default) * -- CCS_LEFT @@ -115,13 +115,13 @@ STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect) INT i; TRACE("draw size grip %d,%d - %d,%d\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); - + if (theme) { RECT gripperRect; SIZE gripperSize; gripperRect = *lpRect; - if (SUCCEEDED (GetThemePartSize (theme, hdc, SP_GRIPPER, 0, lpRect, + if (SUCCEEDED (GetThemePartSize (theme, hdc, SP_GRIPPER, 0, lpRect, TS_DRAW, &gripperSize))) { gripperRect.left = gripperRect.right - gripperSize.cx; @@ -633,9 +633,8 @@ STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height) RECT parent_rect; HTHEME theme; - GetClientRect (infoPtr->Notify, &parent_rect); infoPtr->height = height + infoPtr->verticalBorder; - + if ((theme = GetWindowTheme (infoPtr->Self))) { /* Determine bar height from theme such that the content area is @@ -650,14 +649,15 @@ STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height) } ReleaseDC (infoPtr->Self, hdc); } - - width = parent_rect.right - parent_rect.left; - x = parent_rect.left; - y = parent_rect.bottom - infoPtr->height; - MoveWindow (infoPtr->Self, parent_rect.left, - parent_rect.bottom - infoPtr->height, - width, infoPtr->height, TRUE); - STATUSBAR_SetPartBounds (infoPtr); + + if (GetClientRect (infoPtr->Notify, &parent_rect)) + { + width = parent_rect.right - parent_rect.left; + x = parent_rect.left; + y = parent_rect.bottom - infoPtr->height; + MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE); + STATUSBAR_SetPartBounds (infoPtr); + } } return TRUE; @@ -958,7 +958,7 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) infoPtr->parts[0].x = -1; infoPtr->parts[0].style = 0; infoPtr->parts[0].hIcon = 0; - + OpenThemeData (hwnd, themeClass); if (IsWindowUnicode (hwnd)) { @@ -1029,7 +1029,7 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) GetClientRect (infoPtr->Notify, &rect); width = rect.right - rect.left; infoPtr->height = textHeight + 4 + infoPtr->verticalBorder; - + if ((theme = GetWindowTheme (hwnd))) { /* Determine bar height from theme such that the content area is @@ -1044,7 +1044,7 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) } ReleaseDC (hwnd, hdc); } - + SetWindowPos(hwnd, 0, lpCreate->x, lpCreate->y - 1, width, infoPtr->height, SWP_NOZORDER); STATUSBAR_SetPartBounds (infoPtr); @@ -1191,13 +1191,13 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags) if (GetWindowLongW(infoPtr->Self, GWL_STYLE) & CCS_NORESIZE) return FALSE; /* width and height don't apply */ - GetClientRect (infoPtr->Notify, &parent_rect); + if (!GetClientRect (infoPtr->Notify, &parent_rect)) + return FALSE; + width = parent_rect.right - parent_rect.left; x = parent_rect.left; y = parent_rect.bottom - infoPtr->height; - MoveWindow (infoPtr->Self, parent_rect.left, - parent_rect.bottom - infoPtr->height, - width, infoPtr->height, TRUE); + MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE); STATUSBAR_SetPartBounds (infoPtr); return TRUE; } diff --git a/reactos/dll/win32/comctl32/string.c b/reactos/dll/win32/comctl32/string.c index 1019d4c2e6b..f6dbd8c5589 100644 --- a/reactos/dll/win32/comctl32/string.c +++ b/reactos/dll/win32/comctl32/string.c @@ -680,9 +680,9 @@ LPSTR WINAPI StrRStrIA(LPCSTR lpszStr, LPCSTR lpszEnd, LPCSTR lpszSearch) LPSTR lpszRet = NULL; WORD ch1, ch2; INT iLen; - + TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch)); - + if (!lpszStr || !lpszSearch || !*lpszSearch) return NULL; diff --git a/reactos/dll/win32/comctl32/syslink.c b/reactos/dll/win32/comctl32/syslink.c index cc1e12e5de2..ac3e4648072 100644 --- a/reactos/dll/win32/comctl32/syslink.c +++ b/reactos/dll/win32/comctl32/syslink.c @@ -21,7 +21,7 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Apr. 4, 2005, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. @@ -148,7 +148,7 @@ static PDOC_ITEM SYSLINK_AppendDocItem (SYSLINK_INFO *infoPtr, LPCWSTR Text, UIN Item->nText = textlen; Item->Type = type; Item->Blocks = NULL; - + if(LastItem != NULL) { LastItem->Next = Item; @@ -157,9 +157,9 @@ static PDOC_ITEM SYSLINK_AppendDocItem (SYSLINK_INFO *infoPtr, LPCWSTR Text, UIN { infoPtr->Items = Item; } - + lstrcpynW(Item->Text, Text, textlen + 1); - + return Item; } @@ -170,7 +170,7 @@ static PDOC_ITEM SYSLINK_AppendDocItem (SYSLINK_INFO *infoPtr, LPCWSTR Text, UIN static VOID SYSLINK_ClearDoc (SYSLINK_INFO *infoPtr) { PDOC_ITEM Item, Next; - + Item = infoPtr->Items; while(Item != NULL) { @@ -178,7 +178,7 @@ static VOID SYSLINK_ClearDoc (SYSLINK_INFO *infoPtr) SYSLINK_FreeDocItem(Item); Item = Next; } - + infoPtr->Items = NULL; } @@ -225,7 +225,7 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text) tmp = current + taglen; lpID = NULL; lpUrl = NULL; - + CheckParameter: /* compare the current position with all known parameters */ if(!StrCmpNIW(tmp, SL_HREF, 6)) @@ -246,7 +246,7 @@ CheckParameter: { ValidParam = FALSE; } - + if(ValidParam) { /* we got a known parameter, now search until the next " character. @@ -290,7 +290,7 @@ CheckParameter: tmp++; } } - + if(ValidLink && ValidParam) { /* the tag appears to be valid. save all information @@ -326,7 +326,7 @@ CheckParameter: textstart = NULL; textlen = 0; } - + /* now it's time to add the link to the document */ current += 4; if(linktext != NULL && linklen > 0) @@ -389,7 +389,7 @@ CheckParameter: textstart = current; } } - + textlen += taglen; current += taglen; } @@ -403,11 +403,11 @@ CheckParameter: { textstart = current; } - + current++; } } - + if(textstart != NULL && textlen > 0) { Last = SYSLINK_AppendDocItem(infoPtr, textstart, textlen, CurrentType, Last); @@ -482,12 +482,12 @@ static VOID SYSLINK_RepaintLink (const SYSLINK_INFO *infoPtr, const DOC_ITEM *Do ERR("DocItem not a link!\n"); return; } - + bl = DocItem->Blocks; if (bl != NULL) { n = DocItem->nText; - + while(n > 0) { InvalidateRect(infoPtr->Self, &bl->rc, TRUE); @@ -570,7 +570,7 @@ static PDOC_ITEM SYSLINK_GetPrevLink (const SYSLINK_INFO *infoPtr, PDOC_ITEM Cur { /* returns the last link */ PDOC_ITEM Last = NULL; - + for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) { if(Current->Type == slLink) @@ -584,7 +584,7 @@ static PDOC_ITEM SYSLINK_GetPrevLink (const SYSLINK_INFO *infoPtr, PDOC_ITEM Cur { /* returns the previous link */ PDOC_ITEM Cur, Prev = NULL; - + for(Cur = infoPtr->Items; Cur != NULL; Cur = Cur->Next) { if(Cur == Current) @@ -617,7 +617,7 @@ static BOOL SYSLINK_WrapLine (HDC hdc, LPWSTR Text, WCHAR BreakChar, int *LineLe *LineLen = nFit; Current = Text + nFit; - + /* check if we're in the middle of a word */ if((*Current) != BreakChar) { @@ -627,7 +627,7 @@ static BOOL SYSLINK_WrapLine (HDC hdc, LPWSTR Text, WCHAR BreakChar, int *LineLe Current--; (*LineLen)--; } - + if((*LineLen) == 0) { Extent->cx = 0; @@ -661,13 +661,13 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect) rc.right = MAXLONG; if (rc.bottom - SL_TOPMARGIN < 0) rc.bottom = MAXLONG; - + hOldFont = SelectObject(hdc, infoPtr->Font); - + x = SL_LEFTMARGIN; y = SL_TOPMARGIN; LineHeight = 0; - + for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) { int n, nBlocks; @@ -697,7 +697,7 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect) { SelectObject(hdc, infoPtr->LinkFont); } - + while(n > 0) { int SkipChars = 0; @@ -719,7 +719,7 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect) int LineLen = n; BOOL Wrap = FALSE; PDOC_TEXTBLOCK nbl; - + if(n != 0) { Wrap = SYSLINK_WrapLine(hdc, tx, infoPtr->BreakChar, &LineLen, nFit, &szDim, rc.right - x); @@ -756,7 +756,7 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect) } } } - + nbl = ReAlloc(bl, (nBlocks + 1) * sizeof(DOC_TEXTBLOCK)); if (nbl != NULL) { @@ -764,7 +764,7 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect) nBlocks++; cbl = bl + nBlocks - 1; - + cbl->nChars = LineLen; cbl->nSkip = SkipChars; cbl->rc.left = x; @@ -813,7 +813,7 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect) Current->Blocks = bl; } } - + SelectObject(hdc, hOldFont); pRect->right = pRect->left + szDoc.cx; @@ -834,7 +834,7 @@ static LRESULT SYSLINK_Draw (const SYSLINK_INFO *infoPtr, HDC hdc) hOldFont = SelectObject(hdc, infoPtr->Font); OldTextColor = SetTextColor(hdc, infoPtr->TextColor); OldBkColor = SetBkColor(hdc, GetSysColor(COLOR_BTNFACE)); - + GetClientRect(infoPtr->Self, &rc); rc.right -= SL_RIGHTMARGIN + SL_LEFTMARGIN; rc.bottom -= SL_BOTTOMMARGIN + SL_TOPMARGIN; @@ -846,7 +846,7 @@ static LRESULT SYSLINK_Draw (const SYSLINK_INFO *infoPtr, HDC hdc) int n; LPWSTR tx; PDOC_TEXTBLOCK bl; - + bl = Current->Blocks; if(bl != NULL) { @@ -885,7 +885,7 @@ static LRESULT SYSLINK_Draw (const SYSLINK_INFO *infoPtr, HDC hdc) SetBkColor(hdc, OldBkColor); SetTextColor(hdc, OldTextColor); SelectObject(hdc, hOldFont); - + return 0; } @@ -921,7 +921,7 @@ static HFONT SYSLINK_SetFont (SYSLINK_INFO *infoPtr, HFONT hFont, BOOL bRedraw) RECT rcClient; HFONT hOldFont = infoPtr->Font; infoPtr->Font = hFont; - + /* free the underline font */ if(infoPtr->LinkFont != NULL) { @@ -952,12 +952,12 @@ static HFONT SYSLINK_SetFont (SYSLINK_INFO *infoPtr, HFONT hFont, BOOL bRedraw) ReleaseDC(infoPtr->Self, hdc); } } - + if(bRedraw) { RedrawWindow(infoPtr->Self, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW); } - + return hOldFont; } @@ -971,12 +971,12 @@ static LRESULT SYSLINK_SetText (SYSLINK_INFO *infoPtr, LPCWSTR Text) /* clear the document */ SYSLINK_ClearDoc(infoPtr); - + if(Text == NULL || (textlen = lstrlenW(Text)) == 0) { return TRUE; } - + /* let's parse the string and create a document */ if(SYSLINK_ParseText(infoPtr, Text) > 0) { @@ -995,7 +995,7 @@ static LRESULT SYSLINK_SetText (SYSLINK_INFO *infoPtr, LPCWSTR Text) } } } - + return TRUE; } @@ -1008,7 +1008,7 @@ static LRESULT SYSLINK_SetText (SYSLINK_INFO *infoPtr, LPCWSTR Text) static PDOC_ITEM SYSLINK_SetFocusLink (const SYSLINK_INFO *infoPtr, const DOC_ITEM *DocItem) { PDOC_ITEM Current, PrevFocus = NULL; - + for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) { if(Current->Type == slLink) @@ -1017,7 +1017,7 @@ static PDOC_ITEM SYSLINK_SetFocusLink (const SYSLINK_INFO *infoPtr, const DOC_IT { PrevFocus = Current; } - + if(Current == DocItem) { Current->u.Link.state |= LIS_FOCUSED; @@ -1028,7 +1028,7 @@ static PDOC_ITEM SYSLINK_SetFocusLink (const SYSLINK_INFO *infoPtr, const DOC_IT } } } - + return PrevFocus; } @@ -1109,16 +1109,16 @@ static LRESULT SYSLINK_SetItem (const SYSLINK_INFO *infoPtr, const LITEM *Item) /* copy the bits */ di->u.Link.state |= (Item->state & Item->stateMask) & LIS_MASK; Repaint = (oldstate != di->u.Link.state); - + /* update the focus */ SYSLINK_SetFocusLink(infoPtr, ((di->u.Link.state & LIS_FOCUSED) ? di : NULL)); } - + if(Repaint) { SYSLINK_RepaintLink(infoPtr, di); } - + return TRUE; } @@ -1129,20 +1129,20 @@ static LRESULT SYSLINK_SetItem (const SYSLINK_INFO *infoPtr, const LITEM *Item) static LRESULT SYSLINK_GetItem (const SYSLINK_INFO *infoPtr, PLITEM Item) { PDOC_ITEM di; - + if(!(Item->mask & LIF_ITEMINDEX) || !(Item->mask & (LIF_FLAGSMASK))) { ERR("Invalid Flags!\n"); return FALSE; } - + di = SYSLINK_GetLinkItemByIndex(infoPtr, Item->iLink); if(di == NULL) { ERR("Link %d couldn't be found\n", Item->iLink); return FALSE; } - + if(Item->mask & LIF_STATE) { Item->state = (di->u.Link.state & Item->stateMask); @@ -1152,7 +1152,7 @@ static LRESULT SYSLINK_GetItem (const SYSLINK_INFO *infoPtr, PLITEM Item) Item->state &= ~LIS_FOCUSED; } } - + if(Item->mask & LIF_ITEMID) { if(di->u.Link.szID) @@ -1164,7 +1164,7 @@ static LRESULT SYSLINK_GetItem (const SYSLINK_INFO *infoPtr, PLITEM Item) Item->szID[0] = 0; } } - + if(Item->mask & LIF_URL) { if(di->u.Link.szUrl) @@ -1176,7 +1176,7 @@ static LRESULT SYSLINK_GetItem (const SYSLINK_INFO *infoPtr, PLITEM Item) Item->szUrl[0] = 0; } } - + return TRUE; } @@ -1204,7 +1204,7 @@ static BOOL SYSLINK_PtInDocItem (const DOC_ITEM *DocItem, POINT pt) bl++; } } - + return FALSE; } @@ -1248,7 +1248,7 @@ static LRESULT SYSLINK_HitTest (const SYSLINK_INFO *infoPtr, PLHITTESTINFO HitTe id++; } } - + return FALSE; } @@ -1264,7 +1264,7 @@ static LRESULT SYSLINK_GetIdealHeight (const SYSLINK_INFO *infoPtr) LRESULT height; TEXTMETRICW tm; HGDIOBJ hOldFont = SelectObject(hdc, infoPtr->Font); - + if(GetTextMetricsW(hdc, &tm)) { height = tm.tmHeight; @@ -1275,7 +1275,7 @@ static LRESULT SYSLINK_GetIdealHeight (const SYSLINK_INFO *infoPtr) } SelectObject(hdc, hOldFont); ReleaseDC(infoPtr->Self, hdc); - + return height; } return 0; @@ -1324,7 +1324,7 @@ static LRESULT SYSLINK_SendParentNotify (const SYSLINK_INFO *infoPtr, UINT code, static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr, HWND PrevFocusWindow) { PDOC_ITEM Focus; - + infoPtr->HasFocus = TRUE; /* We always select the first link, even if we activated the control using @@ -1334,9 +1334,9 @@ static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr, HWND PrevFocusWindow) { SYSLINK_SetFocusLink(infoPtr, Focus); } - + SYSLINK_RepaintLink(infoPtr, Focus); - + return 0; } @@ -1347,10 +1347,10 @@ static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr, HWND PrevFocusWindow) static LRESULT SYSLINK_KillFocus (SYSLINK_INFO *infoPtr, HWND NewFocusWindow) { PDOC_ITEM Focus; - + infoPtr->HasFocus = FALSE; Focus = SYSLINK_GetFocusLink(infoPtr, NULL); - + if(Focus != NULL) { SYSLINK_RepaintLink(infoPtr, Focus); @@ -1421,7 +1421,7 @@ static LRESULT SYSLINK_LButtonUp (SYSLINK_INFO *infoPtr, DWORD Buttons, const PO { PDOC_ITEM Current; int id; - + Current = SYSLINK_LinkAtPt(infoPtr, pt, &id, TRUE); if((Current != NULL) && (Current->u.Link.state & LIS_FOCUSED) && (infoPtr->MouseDownID == id)) { @@ -1444,7 +1444,7 @@ static BOOL SYSLINK_OnEnter (const SYSLINK_INFO *infoPtr) { PDOC_ITEM Focus; int id; - + Focus = SYSLINK_GetFocusLink(infoPtr, &id); if(Focus != NULL) { @@ -1561,10 +1561,10 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, { LHITTESTINFO ht; DWORD mp = GetMessagePos(); - + ht.pt.x = (short)LOWORD(mp); ht.pt.y = (short)HIWORD(mp); - + ScreenToClient(infoPtr->Self, &ht.pt); if(SYSLINK_HitTest (infoPtr, &ht)) { @@ -1614,7 +1614,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, pt.y = (short)HIWORD(lParam); return SYSLINK_LButtonUp(infoPtr, wParam, &pt); } - + case WM_KEYDOWN: { switch(wParam) @@ -1631,7 +1631,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, } goto HandleDefaultMessage; } - + case WM_GETDLGCODE: { LRESULT Ret = DLGC_HASSETSEL; @@ -1657,14 +1657,14 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, } return Ret; } - + case WM_NCHITTEST: { POINT pt; RECT rc; pt.x = (short)LOWORD(lParam); pt.y = (short)HIWORD(lParam); - + GetClientRect(infoPtr->Self, &rc); ScreenToClient(infoPtr->Self, &pt); if(pt.x < 0 || pt.y < 0 || pt.x > rc.right || pt.y > rc.bottom) @@ -1676,7 +1676,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, { return HTCLIENT; } - + return HTTRANSPARENT; } diff --git a/reactos/dll/win32/comctl32/tab.c b/reactos/dll/win32/comctl32/tab.c index 3708a4b1b1a..5f9e2957f8c 100644 --- a/reactos/dll/win32/comctl32/tab.c +++ b/reactos/dll/win32/comctl32/tab.c @@ -887,7 +887,7 @@ static LRESULT TAB_AdjustRect(const TAB_INFO *infoPtr, WPARAM fLarger, LPRECT pr ((lStyle & TCS_BUTTONS)? 3 * (infoPtr->uNumRows - 1) : 0); /* Inflate the rectangle for the padding */ - InflateRect(prc, DISPLAY_AREA_PADDINGX, DISPLAY_AREA_PADDINGY); + InflateRect(prc, DISPLAY_AREA_PADDINGX, DISPLAY_AREA_PADDINGY); /* Inflate for the border */ InflateRect(prc, CONTROL_BORDER_SIZEX, CONTROL_BORDER_SIZEY); @@ -1098,7 +1098,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr) /* Now use hPadding and vPadding */ infoPtr->uHItemPadding = infoPtr->uHItemPadding_s; infoPtr->uVItemPadding = infoPtr->uVItemPadding_s; - + /* The leftmost item will be "0" aligned */ curItemLeftPos = 0; curItemRowCount = infoPtr->uNumItem ? 1 : 0; @@ -1125,7 +1125,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr) * Make sure there is enough space for the letters + icon + growing the * selected item + extra space for the selected item. */ - infoPtr->tabHeight = item_height + + infoPtr->tabHeight = item_height + ((lStyle & TCS_BUTTONS) ? 2 : 1) * infoPtr->uVItemPadding; @@ -1150,7 +1150,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr) for (curItem = 0; curItem < infoPtr->uNumItem; curItem++) { TAB_ITEM *curr = TAB_GetItem(infoPtr, curItem); - + /* Set the leftmost position of the tab. */ curr->rect.left = curItemLeftPos; @@ -1203,7 +1203,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr) */ if (((lStyle & TCS_MULTILINE) || (lStyle & TCS_VERTICAL)) && - (curr->rect.right > + (curr->rect.right > (clientRect.right - CONTROL_BORDER_SIZEX - DISPLAY_AREA_PADDINGX))) { curr->rect.right -= curr->rect.left; @@ -1283,7 +1283,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr) { /* normalize the current rect */ TAB_ITEM *curr = TAB_GetItem(infoPtr, iItm); - + /* shift the item to the left side of the clientRect */ curr->rect.right -= curr->rect.left; curr->rect.left = 0; @@ -1501,7 +1501,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect HPEN holdPen; INT oldBkMode; HFONT hOldFont; - + /* if (drawRect == NULL) */ { BOOL isVisible; @@ -1530,7 +1530,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect *drawRect = selectedRect; else *drawRect = itemRect; - + if (lStyle & TCS_BUTTONS) { if (iItem == infoPtr->iSelected) @@ -1634,8 +1634,8 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect */ oldBkMode = SetBkMode(hdc, TRANSPARENT); if (!GetWindowTheme (infoPtr->hwnd) || (lStyle & TCS_BUTTONS)) - SetTextColor(hdc, (((lStyle & TCS_HOTTRACK) && (iItem == infoPtr->iHotTracked) - && !(lStyle & TCS_FLATBUTTONS)) + SetTextColor(hdc, (((lStyle & TCS_HOTTRACK) && (iItem == infoPtr->iHotTracked) + && !(lStyle & TCS_FLATBUTTONS)) | (TAB_GetItem(infoPtr, iItem)->dwState & TCIS_HIGHLIGHTED)) ? comctl32_color.clrHighlight : comctl32_color.clrBtnText); @@ -1670,7 +1670,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect dis.itemState = 0; if ( iItem == infoPtr->iSelected ) dis.itemState |= ODS_SELECTED; - if (infoPtr->uFocus == iItem) + if (infoPtr->uFocus == iItem) dis.itemState |= ODS_FOCUS; dis.hwndItem = infoPtr->hwnd; dis.hDC = hdc; @@ -1713,7 +1713,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect { INT cx; INT cy; - + ImageList_GetIconSize(infoPtr->himl, &cx, &cy); if(lStyle & TCS_VERTICAL) @@ -1738,10 +1738,10 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect if (center_offset_h < 2) center_offset_h = 2; - + if (center_offset_v < 0) center_offset_v = 0; - + TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%d,%d)-(%d,%d), textlen=%d\n", debugstr_w(item->pszText), center_offset_h, center_offset_v, drawRect->left, drawRect->top, drawRect->right, drawRect->bottom, @@ -1963,7 +1963,7 @@ static void TAB_DrawItem(const TAB_INFO *infoPtr, HDC hdc, INT iItem) if (iItem == infoPtr->iSelected) { DrawEdge(hdc, &r, EDGE_SUNKEN, BF_SOFT|BF_RECT); - + OffsetRect(&r, 1, 1); } else /* ! selected */ @@ -1998,7 +1998,7 @@ static void TAB_DrawItem(const TAB_INFO *infoPtr, HDC hdc, INT iItem) * Windows draws even side or bottom tabs themed, with wacky results. * However, since in Wine apps may get themed that did not opt in via * a manifest avoid theming when we know the result will be wrong */ - if ((theme = GetWindowTheme (infoPtr->hwnd)) + if ((theme = GetWindowTheme (infoPtr->hwnd)) && ((lStyle & (TCS_VERTICAL | TCS_BOTTOM)) == 0)) { static const int partIds[8] = { @@ -2325,11 +2325,6 @@ static void TAB_Refresh (TAB_INFO *infoPtr, HDC hdc) /* Then, draw the selected item */ TAB_DrawItem (infoPtr, hdc, infoPtr->iSelected); - - /* If we haven't set the current focus yet, set it now. - * Only happens when we first paint the tab controls */ - if (infoPtr->uFocus == -1) - TAB_SetCurFocus(infoPtr, infoPtr->iSelected); } SelectObject (hdc, hOldFont); @@ -2506,13 +2501,13 @@ static void TAB_InvalidateTabArea(const TAB_INFO *infoPtr) if (infoPtr->uNumRows == 1) rInvalidate.right = clientRect.left + rect.right + 2 * SELECTED_TAB_OFFSET; } - else + else { rInvalidate.bottom = rAdjClient.top; if (infoPtr->uNumRows == 1) rInvalidate.right = clientRect.left + rect.right + 2 * SELECTED_TAB_OFFSET; } - + /* Punch out the updown control */ if (infoPtr->needsScrolling && (rInvalidate.right > 0)) { RECT r; @@ -2522,11 +2517,11 @@ static void TAB_InvalidateTabArea(const TAB_INFO *infoPtr) else rInvalidate.right = clientRect.right - r.left; } - + TRACE("invalidate (%d,%d)-(%d,%d)\n", rInvalidate.left, rInvalidate.top, rInvalidate.right, rInvalidate.bottom); - + InvalidateRect(infoPtr->hwnd, &rInvalidate, TRUE); } @@ -2627,7 +2622,7 @@ TAB_InsertItemT (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL bUnicode) memcpy(item->extra, &pti->lParam, infoPtr->cbInfo); else memset(item->extra, 0, infoPtr->cbInfo); - + TAB_SetItemBounds(infoPtr); if (infoPtr->uNumItem > 1) TAB_InvalidateTabArea(infoPtr); @@ -2637,6 +2632,10 @@ TAB_InsertItemT (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL bUnicode) TRACE("[%p]: added item %d %s\n", infoPtr->hwnd, iItem, debugstr_w(item->pszText)); + /* If we haven't set the current focus yet, set it now. */ + if (infoPtr->uFocus == -1) + TAB_SetCurFocus(infoPtr, iItem); + return iItem; } @@ -2688,7 +2687,7 @@ static inline LRESULT TAB_SetMinTabWidth (TAB_INFO *infoPtr, INT cx) return oldcx; } -static inline LRESULT +static inline LRESULT TAB_HighlightItem (TAB_INFO *infoPtr, INT iItem, BOOL fHighlight) { LPDWORD lpState; @@ -2697,7 +2696,7 @@ TAB_HighlightItem (TAB_INFO *infoPtr, INT iItem, BOOL fHighlight) if (!infoPtr || iItem < 0 || iItem >= infoPtr->uNumItem) return FALSE; - + lpState = &TAB_GetItem(infoPtr, iItem)->dwState; if (fHighlight) @@ -3019,7 +3018,7 @@ static LRESULT TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) } OpenThemeData (infoPtr->hwnd, themeClass); - + /* * We need to get text information so we need a DC and we need to select * a font. @@ -3064,8 +3063,7 @@ TAB_Destroy (TAB_INFO *infoPtr) if (infoPtr->items) { for (iItem = 0; iItem < infoPtr->uNumItem; iItem++) { - if (TAB_GetItem(infoPtr, iItem)->pszText) - Free (TAB_GetItem(infoPtr, iItem)->pszText); + Free (TAB_GetItem(infoPtr, iItem)->pszText); } Free (infoPtr->items); } @@ -3080,7 +3078,7 @@ TAB_Destroy (TAB_INFO *infoPtr) KillTimer(infoPtr->hwnd, TAB_HOTTRACK_TIMER); CloseThemeData (GetWindowTheme (infoPtr->hwnd)); - + Free (infoPtr); return 0; } @@ -3112,7 +3110,7 @@ TAB_SetItemExtra (TAB_INFO *infoPtr, INT cbInfo) /* FIXME: MSDN says this is not allowed, but this hasn't been verified */ return FALSE; } - + infoPtr->cbInfo = cbInfo; return TRUE; } diff --git a/reactos/dll/win32/comctl32/theme_combo.c b/reactos/dll/win32/comctl32/theme_combo.c index 38a26b2ee6f..477138e1792 100644 --- a/reactos/dll/win32/comctl32/theme_combo.c +++ b/reactos/dll/win32/comctl32/theme_combo.c @@ -82,7 +82,7 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c */ CopyRect (&rectEdit, &cbi->rcItem); InflateRect( &rectEdit, -1, -1 ); - + if(dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) { DRAWITEMSTRUCT dis; @@ -106,7 +106,7 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c clipRegion=NULL; } - if (!IsWindowEnabled(hwnd) & WS_DISABLED) itemState |= ODS_DISABLED; + if (!IsWindowEnabled(hwnd)) itemState |= ODS_DISABLED; dis.CtlType = ODT_COMBOBOX; dis.CtlID = ctlid; @@ -158,7 +158,7 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c if( hPrevFont ) SelectObject(hdc, hPrevFont ); - + HeapFree( GetProcessHeap(), 0, pText ); } @@ -179,10 +179,10 @@ static LRESULT paint (HTHEME theme, HWND hwnd, HDC hParamDC, ULONG state) { RECT frameRect; int buttonState; - + cbi.cbSize = sizeof (cbi); SendMessageW (hwnd, CB_GETCOMBOBOXINFO, 0, (LPARAM)&cbi); - + /* paint border */ if ((dwStyle & CBS_DROPDOWNLIST) != CBS_SIMPLE) GetClientRect (hwnd, &frameRect); @@ -190,14 +190,14 @@ static LRESULT paint (HTHEME theme, HWND hwnd, HDC hParamDC, ULONG state) { CopyRect (&frameRect, &cbi.rcItem); - InflateRect(&frameRect, - EDIT_CONTROL_PADDING + COMBO_XBORDERSIZE, + InflateRect(&frameRect, + EDIT_CONTROL_PADDING + COMBO_XBORDERSIZE, EDIT_CONTROL_PADDING + COMBO_YBORDERSIZE); } - - DrawThemeBackground (theme, hDC, 0, + + DrawThemeBackground (theme, hDC, 0, IsWindowEnabled (hwnd) ? CBXS_NORMAL : CBXS_DISABLED, &frameRect, NULL); - + /* paint button */ if (cbi.stateButton != STATE_SYSTEM_INVISIBLE) { @@ -209,7 +209,7 @@ static LRESULT paint (HTHEME theme, HWND hwnd, HDC hParamDC, ULONG state) buttonState = CBXS_HOT; else buttonState = CBXS_NORMAL; - DrawThemeBackground (theme, hDC, CP_DROPDOWNBUTTON, buttonState, + DrawThemeBackground (theme, hDC, CP_DROPDOWNBUTTON, buttonState, &cbi.rcButton, NULL); } @@ -228,21 +228,21 @@ static LRESULT paint (HTHEME theme, HWND hwnd, HDC hParamDC, ULONG state) /********************************************************************** * The combo control subclass window proc. */ -LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam, +LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg, + WPARAM wParam, LPARAM lParam, ULONG_PTR dwRefData) { const WCHAR* themeClass = WC_COMBOBOXW; HTHEME theme; LRESULT result; - + switch (msg) { case WM_CREATE: result = THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); OpenThemeData( hwnd, themeClass ); return result; - + case WM_DESTROY: theme = GetWindowTheme( hwnd ); CloseThemeData ( theme ); @@ -253,21 +253,21 @@ LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg, CloseThemeData ( theme ); OpenThemeData( hwnd, themeClass ); break; - + case WM_SYSCOLORCHANGE: theme = GetWindowTheme( hwnd ); if (!theme) return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); /* Do nothing. When themed, a WM_THEMECHANGED will be received, too, * which will do the repaint. */ break; - + case WM_PAINT: theme = GetWindowTheme( hwnd ); if (!theme) return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); return paint (theme, hwnd, (HDC)wParam, dwRefData); case WM_SETREDRAW: - /* Since there doesn't seem to be WM_GETREDRAW, do redraw tracking in + /* Since there doesn't seem to be WM_GETREDRAW, do redraw tracking in * the subclass as well. */ if( wParam ) dwRefData &= ~STATE_NOREDRAW; @@ -275,7 +275,7 @@ LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg, dwRefData |= STATE_NOREDRAW; THEMING_SetSubclassData (hwnd, dwRefData); return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); - + case WM_MOUSEMOVE: { /* Dropdown button hot-tracking */ @@ -286,7 +286,7 @@ LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg, pt.y = (short)HIWORD(lParam); cbi.cbSize = sizeof (cbi); SendMessageW (hwnd, CB_GETCOMBOBOXINFO, 0, (LPARAM)&cbi); - + if (cbi.stateButton != STATE_SYSTEM_INVISIBLE) { if (PtInRect (&cbi.rcButton, pt)) @@ -295,7 +295,7 @@ LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg, { dwRefData |= STATE_HOT; THEMING_SetSubclassData (hwnd, dwRefData); - RedrawWindow (hwnd, &cbi.rcButton, 0, + RedrawWindow (hwnd, &cbi.rcButton, 0, RDW_INVALIDATE | RDW_UPDATENOW); } } @@ -305,15 +305,15 @@ LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg, { dwRefData &= ~STATE_HOT; THEMING_SetSubclassData (hwnd, dwRefData); - RedrawWindow (hwnd, &cbi.rcButton, 0, + RedrawWindow (hwnd, &cbi.rcButton, 0, RDW_INVALIDATE | RDW_UPDATENOW); } } } } return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); - - default: + + default: /* Call old proc */ return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); } diff --git a/reactos/dll/win32/comctl32/theme_dialog.c b/reactos/dll/win32/comctl32/theme_dialog.c index b9e56dc95ba..92859418e76 100644 --- a/reactos/dll/win32/comctl32/theme_dialog.c +++ b/reactos/dll/win32/comctl32/theme_dialog.c @@ -35,8 +35,8 @@ /********************************************************************** * The dialog subclass window proc. */ -LRESULT CALLBACK THEMING_DialogSubclassProc (HWND hWnd, UINT msg, - WPARAM wParam, LPARAM lParam, +LRESULT CALLBACK THEMING_DialogSubclassProc (HWND hWnd, UINT msg, + WPARAM wParam, LPARAM lParam, ULONG_PTR dwRefData) { HTHEME theme = GetWindowTheme ( hWnd ); @@ -44,14 +44,14 @@ LRESULT CALLBACK THEMING_DialogSubclassProc (HWND hWnd, UINT msg, BOOL themingActive = IsThemeDialogTextureEnabled (hWnd); BOOL doTheming = themingActive && (theme != NULL); LRESULT result; - + switch (msg) { case WM_CREATE: result = THEMING_CallOriginalClass (hWnd, msg, wParam, lParam); theme = OpenThemeData( hWnd, themeClass ); return result; - + case WM_DESTROY: CloseThemeData ( theme ); return THEMING_CallOriginalClass (hWnd, msg, wParam, lParam); @@ -61,13 +61,13 @@ LRESULT CALLBACK THEMING_DialogSubclassProc (HWND hWnd, UINT msg, OpenThemeData( hWnd, themeClass ); InvalidateRect( hWnd, NULL, TRUE ); return 0; - + case WM_SYSCOLORCHANGE: if (!doTheming) return THEMING_CallOriginalClass (hWnd, msg, wParam, lParam); /* Do nothing. When themed, a WM_THEMECHANGED will be received, too, * which will do the repaint. */ break; - + case WM_ERASEBKGND: if (!doTheming) return THEMING_CallOriginalClass (hWnd, msg, wParam, lParam); { @@ -78,20 +78,20 @@ LRESULT CALLBACK THEMING_DialogSubclassProc (HWND hWnd, UINT msg, /* Draw background*/ GetClientRect (hWnd, &rc); if (IsThemePartDefined (theme, WP_DIALOG, 0)) - /* Although there is a theme for the WINDOW class/DIALOG part, + /* Although there is a theme for the WINDOW class/DIALOG part, * but I[res] haven't seen Windows using it yet... Even when - * dialog theming is activated, the good ol' BTNFACE + * dialog theming is activated, the good ol' BTNFACE * background seems to be used. */ #if 0 - DrawThemeBackground (theme, (HDC)wParam, WP_DIALOG, 0, &rc, + DrawThemeBackground (theme, (HDC)wParam, WP_DIALOG, 0, &rc, NULL); #endif return THEMING_CallOriginalClass (hWnd, msg, wParam, lParam); - else - /* We might have gotten a TAB theme class, so check if we can + else + /* We might have gotten a TAB theme class, so check if we can * draw as a tab page. */ if (IsThemePartDefined (theme, TABP_BODY, 0)) - DrawThemeBackground (theme, (HDC)wParam, TABP_BODY, 0, &rc, + DrawThemeBackground (theme, (HDC)wParam, TABP_BODY, 0, &rc, NULL); else return THEMING_CallOriginalClass (hWnd, msg, wParam, lParam); @@ -112,11 +112,11 @@ LRESULT CALLBACK THEMING_DialogSubclassProc (HWND hWnd, UINT msg, WCHAR controlClass[32]; RECT rc; - GetClassNameW (controlWnd, controlClass, + GetClassNameW (controlWnd, controlClass, sizeof(controlClass) / sizeof(controlClass[0])); if (lstrcmpiW (controlClass, WC_STATICW) == 0) { - /* Static control - draw parent background and set text to + /* Static control - draw parent background and set text to * transparent, so it looks right on tab pages. */ GetClientRect (controlWnd, &rc); DrawThemeParentBackground (controlWnd, controlDC, &rc); @@ -132,7 +132,7 @@ LRESULT CALLBACK THEMING_DialogSubclassProc (HWND hWnd, UINT msg, return result; } - default: + default: /* Call old proc */ return THEMING_CallOriginalClass (hWnd, msg, wParam, lParam); } diff --git a/reactos/dll/win32/comctl32/theme_edit.c b/reactos/dll/win32/comctl32/theme_edit.c index e1fa1907019..b3b142a11db 100644 --- a/reactos/dll/win32/comctl32/theme_edit.c +++ b/reactos/dll/win32/comctl32/theme_edit.c @@ -46,26 +46,26 @@ static void nc_paint (HTHEME theme, HWND hwnd, HRGN region) int part = EP_EDITTEXT; int state = ETS_NORMAL; DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE); - + if (!IsWindowEnabled (hwnd)) state = ETS_DISABLED; else if (dwStyle & ES_READONLY) state = ETS_READONLY; else if (GetFocus() == hwnd) state = ETS_FOCUSED; - + GetWindowRect(hwnd, &r); - + /* New clipping region passed to default proc to exclude border */ cliprgn = CreateRectRgn (r.left + cxEdge, r.top + cyEdge, r.right - cxEdge, r.bottom - cyEdge); if (region != (HRGN)1) CombineRgn (cliprgn, cliprgn, region, RGN_AND); OffsetRect(&r, -r.left, -r.top); - + dc = GetDCEx(hwnd, region, DCX_WINDOW|DCX_INTERSECTRGN); OffsetRect(&r, -r.left, -r.top); - + if (IsThemeBackgroundPartiallyTransparent (theme, part, state)) DrawThemeParentBackground(hwnd, dc, &r); DrawThemeBackground (theme, dc, part, state, &r, 0); @@ -79,21 +79,21 @@ static void nc_paint (HTHEME theme, HWND hwnd, HRGN region) /********************************************************************** * The edit control subclass window proc. */ -LRESULT CALLBACK THEMING_EditSubclassProc (HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam, +LRESULT CALLBACK THEMING_EditSubclassProc (HWND hwnd, UINT msg, + WPARAM wParam, LPARAM lParam, ULONG_PTR dwRefData) { const WCHAR* themeClass = WC_EDITW; HTHEME theme; LRESULT result; - + switch (msg) { case WM_CREATE: result = THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); OpenThemeData( hwnd, themeClass ); return result; - + case WM_DESTROY: theme = GetWindowTheme( hwnd ); CloseThemeData ( theme ); @@ -104,14 +104,14 @@ LRESULT CALLBACK THEMING_EditSubclassProc (HWND hwnd, UINT msg, CloseThemeData ( theme ); OpenThemeData( hwnd, themeClass ); break; - + case WM_SYSCOLORCHANGE: theme = GetWindowTheme( hwnd ); if (!theme) return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); /* Do nothing. When themed, a WM_THEMECHANGED will be received, too, * which will do the repaint. */ break; - + case WM_NCPAINT: theme = GetWindowTheme( hwnd ); if (!theme) return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); @@ -120,11 +120,11 @@ LRESULT CALLBACK THEMING_EditSubclassProc (HWND hwnd, UINT msg, case WM_ENABLE: theme = GetWindowTheme( hwnd ); - if (theme) RedrawWindow (hwnd, NULL, NULL, + if (theme) RedrawWindow (hwnd, NULL, NULL, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW); return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); - - default: + + default: /* Call old proc */ return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); } diff --git a/reactos/dll/win32/comctl32/theme_listbox.c b/reactos/dll/win32/comctl32/theme_listbox.c index ffd0d052682..8147ba4cf15 100644 --- a/reactos/dll/win32/comctl32/theme_listbox.c +++ b/reactos/dll/win32/comctl32/theme_listbox.c @@ -43,19 +43,19 @@ static void nc_paint (HTHEME theme, HWND hwnd, HRGN region) RECT r; int cxEdge = GetSystemMetrics (SM_CXEDGE), cyEdge = GetSystemMetrics (SM_CYEDGE); - + GetWindowRect(hwnd, &r); - + /* New clipping region passed to default proc to exclude border */ cliprgn = CreateRectRgn (r.left + cxEdge, r.top + cyEdge, r.right - cxEdge, r.bottom - cyEdge); if (region != (HRGN)1) CombineRgn (cliprgn, cliprgn, region, RGN_AND); OffsetRect(&r, -r.left, -r.top); - + dc = GetDCEx(hwnd, region, DCX_WINDOW|DCX_INTERSECTRGN); OffsetRect(&r, -r.left, -r.top); - + if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0)) DrawThemeParentBackground(hwnd, dc, &r); DrawThemeBackground (theme, dc, 0, 0, &r, 0); @@ -69,21 +69,21 @@ static void nc_paint (HTHEME theme, HWND hwnd, HRGN region) /********************************************************************** * The list control subclass window proc. */ -LRESULT CALLBACK THEMING_ListBoxSubclassProc (HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam, +LRESULT CALLBACK THEMING_ListBoxSubclassProc (HWND hwnd, UINT msg, + WPARAM wParam, LPARAM lParam, ULONG_PTR dwRefData) { const WCHAR* themeClass = WC_LISTBOXW; HTHEME theme; LRESULT result; - + switch (msg) { case WM_CREATE: result = THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); OpenThemeData( hwnd, themeClass ); return result; - + case WM_DESTROY: theme = GetWindowTheme( hwnd ); CloseThemeData ( theme ); @@ -94,21 +94,21 @@ LRESULT CALLBACK THEMING_ListBoxSubclassProc (HWND hwnd, UINT msg, CloseThemeData ( theme ); OpenThemeData( hwnd, themeClass ); break; - + case WM_SYSCOLORCHANGE: theme = GetWindowTheme( hwnd ); if (!theme) return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); /* Do nothing. When themed, a WM_THEMECHANGED will be received, too, * which will do the repaint. */ break; - + case WM_NCPAINT: theme = GetWindowTheme( hwnd ); if (!theme) return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); nc_paint (theme, hwnd, (HRGN)wParam); break; - default: + default: /* Call old proc */ return THEMING_CallOriginalClass (hwnd, msg, wParam, lParam); } diff --git a/reactos/dll/win32/comctl32/theming.c b/reactos/dll/win32/comctl32/theming.c index df0043a0c26..5b5f6b304ee 100644 --- a/reactos/dll/win32/comctl32/theming.c +++ b/reactos/dll/win32/comctl32/theming.c @@ -68,7 +68,7 @@ static ATOM atSubclassProp; /* Generate a number of subclass window procs. * With a single proc alone, we can't really reliably find out the superclass, * so have one for each subclass. The subclass number is also stored in a prop - * since it's needed by THEMING_CallOriginalClass(). Then, the the subclass + * since it's needed by THEMING_CallOriginalClass(). Then, the subclass * proc and ref data are fetched and the proc called. */ #define MAKE_SUBCLASS_PROC(N) \ @@ -109,9 +109,9 @@ static const WNDPROC subclassProcs[NUM_SUBCLASSES] = { void THEMING_Initialize (void) { int i; - static const WCHAR subclassPropName[] = + static const WCHAR subclassPropName[] = { 'C','C','3','2','T','h','e','m','i','n','g','S','u','b','C','l',0 }; - static const WCHAR refDataPropName[] = + static const WCHAR refDataPropName[] = { 'C','C','3','2','T','h','e','m','i','n','g','D','a','t','a',0 }; if (!IsThemeActive()) return; @@ -128,10 +128,10 @@ void THEMING_Initialize (void) GetClassInfoExW (NULL, subclasses[i].className, &class); originalProcs[i] = class.lpfnWndProc; class.lpfnWndProc = subclassProcs[i]; - + if (!class.lpfnWndProc) { - ERR("Missing proc for class %s\n", + ERR("Missing proc for class %s\n", debugstr_w (subclasses[i].className)); continue; } @@ -143,7 +143,7 @@ void THEMING_Initialize (void) } else { - TRACE("Re-registered class %s\n", + TRACE("Re-registered class %s\n", debugstr_w (subclasses[i].className)); } } diff --git a/reactos/dll/win32/comctl32/toolbar.c b/reactos/dll/win32/comctl32/toolbar.c index 4cbe2114016..429444e15ae 100644 --- a/reactos/dll/win32/comctl32/toolbar.c +++ b/reactos/dll/win32/comctl32/toolbar.c @@ -23,11 +23,11 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Mar. 14, 2004, by Robert Shearman. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features or bugs please note them below. - * + * * TODO: * - Styles: * - TBSTYLE_REGISTERDROP @@ -279,7 +279,7 @@ TOOLBAR_DumpButton(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *bP, INT btn_ { if (TRACE_ON(toolbar)){ TRACE("button %d id %d, bitmap=%d, state=%02x, style=%02x, data=%08lx, stringid=0x%08lx\n", - btn_num, bP->idCommand, GETIBITMAP(infoPtr, bP->iBitmap), + btn_num, bP->idCommand, GETIBITMAP(infoPtr, bP->iBitmap), bP->fsState, bP->fsStyle, bP->dwData, bP->iString); TRACE("string %s\n", debugstr_w(TOOLBAR_GetText(infoPtr,bP))); if (internal) @@ -341,7 +341,7 @@ TOOLBAR_SendNotify (NMHDR *nmhdr, const TOOLBAR_INFO *infoPtr, UINT code) TRACE("to window %p, code=%08x, %s\n", infoPtr->hwndNotify, code, (infoPtr->bUnicode) ? "via Unicode" : "via ANSI"); - return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, + return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmhdr->idFrom, (LPARAM)nmhdr); } @@ -706,10 +706,10 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, INT left, I } } else if (tbcd->nmcd.uItemState & CDIS_CHECKED || - ((tbcd->nmcd.uItemState & CDIS_HOT) + ((tbcd->nmcd.uItemState & CDIS_HOT) && ((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf)))) { - /* if hot, attempt to draw with hot image list, if fails, + /* if hot, attempt to draw with hot image list, if fails, use default image list */ himl = TOOLBAR_GetImageListForDrawing(infoPtr, btnPtr, IMAGE_LIST_HOT, &index); if (!himl) @@ -721,7 +721,7 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, INT left, I if (!himl) return; - if (!(dwItemCDFlag & TBCDRF_NOOFFSET) && + if (!(dwItemCDFlag & TBCDRF_NOOFFSET) && (tbcd->nmcd.uItemState & (CDIS_SELECTED | CDIS_CHECKED))) offset = 1; @@ -749,7 +749,7 @@ TOOLBAR_DrawFrame(const TOOLBAR_INFO *infoPtr, const NMTBCUSTOMDRAW *tbcd, DWORD BOOL non_interactive_state = (tbcd->nmcd.uItemState & CDIS_DISABLED) || (tbcd->nmcd.uItemState & CDIS_INDETERMINATE); BOOL pressed_look = !non_interactive_state && - ((tbcd->nmcd.uItemState & CDIS_SELECTED) || + ((tbcd->nmcd.uItemState & CDIS_SELECTED) || (tbcd->nmcd.uItemState & CDIS_CHECKED)); /* app don't want us to draw any edges */ @@ -820,7 +820,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr BOOL hasDropDownArrow = (TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle) && (btnPtr->fsStyle & BTNS_DROPDOWN)) || (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN); - BOOL drawSepDropDownArrow = hasDropDownArrow && + BOOL drawSepDropDownArrow = hasDropDownArrow && (~btnPtr->fsStyle & BTNS_WHOLEDROPDOWN); RECT rc, rcArrow, rcBitmap, rcText; LPWSTR lpText = NULL; @@ -839,8 +839,8 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr if (btnPtr->fsStyle & BTNS_SEP) { if (theme) { - DrawThemeBackground (theme, hdc, - (dwStyle & CCS_VERT) ? TP_SEPARATORVERT : TP_SEPARATOR, 0, + DrawThemeBackground (theme, hdc, + (dwStyle & CCS_VERT) ? TP_SEPARATORVERT : TP_SEPARATOR, 0, &rc, NULL); } else @@ -983,11 +983,11 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr (btnPtr->fsState & (TBSTATE_PRESSED | TBSTATE_CHECKED))) OffsetRect(&rcText, 1, 1); - if (!(tbcd.nmcd.uItemState & CDIS_HOT) && + if (!(tbcd.nmcd.uItemState & CDIS_HOT) && ((tbcd.nmcd.uItemState & CDIS_CHECKED) || (tbcd.nmcd.uItemState & CDIS_INDETERMINATE))) TOOLBAR_DrawPattern (&rc, &tbcd); - if (((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf)) + if (((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf)) && (tbcd.nmcd.uItemState & CDIS_HOT)) { if ( dwItemCDFlag & TBCDRF_HILITEHOTTRACK ) @@ -1006,7 +1006,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr { int partId = drawSepDropDownArrow ? TP_SPLITBUTTON : TP_BUTTON; int stateId = TS_NORMAL; - + if (tbcd.nmcd.uItemState & CDIS_DISABLED) stateId = TS_DISABLED; else if (tbcd.nmcd.uItemState & CDIS_SELECTED) @@ -1016,7 +1016,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr else if ((tbcd.nmcd.uItemState & CDIS_HOT) || (drawSepDropDownArrow && btnPtr->bDropDownPressed)) stateId = TS_HOT; - + DrawThemeBackground (theme, hdc, partId, stateId, &tbcd.nmcd.rc, NULL); } else @@ -1027,7 +1027,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr if (theme) { int stateId = TS_NORMAL; - + if (tbcd.nmcd.uItemState & CDIS_DISABLED) stateId = TS_DISABLED; else if (btnPtr->bDropDownPressed || (tbcd.nmcd.uItemState & CDIS_SELECTED)) @@ -1036,7 +1036,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_HOT; else if (tbcd.nmcd.uItemState & CDIS_HOT) stateId = TS_HOT; - + DrawThemeBackground (theme, hdc, TP_DROPDOWNBUTTON, stateId, &rcArrow, NULL); DrawThemeBackground (theme, hdc, TP_SPLITBUTTONDROPDOWN, stateId, &rcArrow, NULL); } @@ -1704,7 +1704,7 @@ TOOLBAR_LayoutToolbar(HWND hwnd) { if (btnPtr->cx) cx = btnPtr->cx; - else if ((infoPtr->dwExStyle & TBSTYLE_EX_MIXEDBUTTONS) || + else if ((infoPtr->dwExStyle & TBSTYLE_EX_MIXEDBUTTONS) || (btnPtr->fsStyle & BTNS_AUTOSIZE)) { SIZE sz; @@ -1729,7 +1729,7 @@ TOOLBAR_LayoutToolbar(HWND hwnd) /* if size has been set manually then don't add on extra space * for the drop down arrow */ - if (!btnPtr->cx && hasDropDownArrows && + if (!btnPtr->cx && hasDropDownArrows && ((btnPtr->fsStyle & BTNS_DROPDOWN) || (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN))) cx += DDARROW_WIDTH; } @@ -2353,7 +2353,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) break; TRACE("WM_INITDIALOG style: %x iItem(%d) idCommand(%d) iString(%ld) %s\n", - nmtb.tbButton.fsStyle, i, + nmtb.tbButton.fsStyle, i, nmtb.tbButton.idCommand, nmtb.tbButton.iString, nmtb.tbButton.iString >= 0 ? debugstr_w(infoPtr->strings[nmtb.tbButton.iString]) @@ -2369,7 +2369,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } else { - btnInfo = (PCUSTOMBUTTON)SendDlgItemMessageW (hwnd, + btnInfo = (PCUSTOMBUTTON)SendDlgItemMessageW (hwnd, IDC_TOOLBARBTN_LBOX, LB_GETITEMDATA, index, 0); } @@ -2378,10 +2378,10 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (lstrlenW(nmtb.pszText)) lstrcpyW(btnInfo->text, nmtb.pszText); - else if (nmtb.tbButton.iString >= 0 && + else if (nmtb.tbButton.iString >= 0 && nmtb.tbButton.iString < infoPtr->nNumStrings) { - lstrcpyW(btnInfo->text, + lstrcpyW(btnInfo->text, infoPtr->strings[nmtb.tbButton.iString]); } } @@ -2605,9 +2605,9 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) /* draw image and text */ if ((btnInfo->btn.fsStyle & BTNS_SEP) == 0) { - HIMAGELIST himl = GETDEFIMAGELIST(infoPtr, GETHIMLID(infoPtr, + HIMAGELIST himl = GETDEFIMAGELIST(infoPtr, GETHIMLID(infoPtr, btnInfo->btn.iBitmap)); - ImageList_Draw (himl, GETIBITMAP(infoPtr, btnInfo->btn.iBitmap), + ImageList_Draw (himl, GETIBITMAP(infoPtr, btnInfo->btn.iBitmap), lpdis->hDC, rcButton.left+3, rcButton.top+3, ILD_NORMAL); } DrawTextW (lpdis->hDC, btnInfo->text, -1, &rcText, @@ -2677,12 +2677,12 @@ TOOLBAR_AddBitmapToImageList(TOOLBAR_INFO *infoPtr, HIMAGELIST himlDef, const TB ImageList_GetIconSize(himlDef, &cxIcon, &cyIcon); if (bitmap->hInst != COMCTL32_hModule) COMCTL32_EnsureBitmapSize(&hbmLoad, cxIcon*(INT)bitmap->nButtons, cyIcon, comctl32_color.clrBtnFace); - + nIndex = ImageList_AddMasked(himlDef, hbmLoad, comctl32_color.clrBtnFace); DeleteObject(hbmLoad); if (nIndex == -1) return FALSE; - + nCountAfter = ImageList_GetImageCount(himlDef); nAdded = nCountAfter - nCountBefore; if (bitmap->nButtons == 0) /* wParam == 0 is special and means add only one image */ @@ -2704,7 +2704,7 @@ TOOLBAR_CheckImageListIconSize(TOOLBAR_INFO *infoPtr) HIMAGELIST himlNew; INT cx, cy; INT i; - + himlDef = GETDEFIMAGELIST(infoPtr, 0); if (himlDef == NULL || himlDef != infoPtr->himlInt) return; @@ -2800,7 +2800,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) info.nID = lpAddBmp->nID; TRACE("adding %d bitmaps!\n", info.nButtons); } - + /* check if the bitmap is already loaded and compute iSumButtons */ iSumButtons = 0; for (i = 0; i < infoPtr->nNumBitmapInfos; i++) @@ -3051,7 +3051,7 @@ TOOLBAR_AutoSize (HWND hwnd) if (infoPtr->dwStyle & CCS_NOPARENTALIGN) uPosFlags |= SWP_NOMOVE; - + if (!(infoPtr->dwStyle & CCS_NODIVIDER)) cy += GetSystemMetrics(SM_CYEDGE); @@ -3934,10 +3934,10 @@ TOOLBAR_MapAccelerator (HWND hwnd, WPARAM wParam, LPARAM lParam) UINT* pIDButton = (UINT*)lParam; WCHAR wszAccel[] = {'&',wAccel,0}; int i; - + TRACE("hwnd = %p, wAccel = %x(%s), pIDButton = %p\n", hwnd, wAccel, debugstr_wn(&wAccel,1), pIDButton); - + for (i = 0; i < infoPtr->nNumButtons; i++) { TBUTTON_INFO *btnPtr = infoPtr->buttons+i; @@ -3946,7 +3946,7 @@ TOOLBAR_MapAccelerator (HWND hwnd, WPARAM wParam, LPARAM lParam) { int iLen = strlenW(wszAccel); LPCWSTR lpszStr = TOOLBAR_GetText(infoPtr, btnPtr); - + if (!lpszStr) continue; @@ -4142,7 +4142,7 @@ TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) WARN("No hinst/bitmap found! hInst %p nID %lx\n", lpReplace->hInstOld, lpReplace->nIDOld); return FALSE; } - + /* copy the bitmap before adding it as ImageList_AddMasked modifies the * bitmap */ @@ -4272,7 +4272,7 @@ TOOLBAR_Restore(TOOLBAR_INFO *infoPtr, const TBSAVEPARAMSW *lpSave) nmtbr.tbButton.idCommand = (int)*nmtbr.pCurrent; nmtbr.pCurrent++; - + TOOLBAR_SendNotify(&nmtbr.hdr, infoPtr, TBN_RESTORE); /* can't contain real string as we don't know whether @@ -4546,13 +4546,13 @@ TOOLBAR_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam) */ if (cx == 0) cx = 24; if (cy == 0) cx = 22; - + cx = max(cx, infoPtr->szPadding.cx + infoPtr->nBitmapWidth); cy = max(cy, infoPtr->szPadding.cy + infoPtr->nBitmapHeight); infoPtr->nButtonWidth = cx; infoPtr->nButtonHeight = cy; - + infoPtr->iTopMargin = default_top_margin(infoPtr); TOOLBAR_LayoutToolbar(hwnd); return TRUE; @@ -4622,7 +4622,7 @@ TOOLBAR_SetDisabledImageList (HWND hwnd, WPARAM wParam, LPARAM lParam) if (infoPtr->iVersion >= 5) id = wParam; - himlTemp = TOOLBAR_InsertImageList(&infoPtr->himlDis, + himlTemp = TOOLBAR_InsertImageList(&infoPtr->himlDis, &infoPtr->cimlDis, himl, id); /* FIXME: redraw ? */ @@ -4691,7 +4691,7 @@ TOOLBAR_SetHotImageList (HWND hwnd, WPARAM wParam, LPARAM lParam) TRACE("hwnd = %p, himl = %p, id = %d\n", hwnd, himl, id); - himlTemp = TOOLBAR_InsertImageList(&infoPtr->himlHot, + himlTemp = TOOLBAR_InsertImageList(&infoPtr->himlHot, &infoPtr->cimlHot, himl, id); /* FIXME: redraw ? */ @@ -4752,7 +4752,7 @@ TOOLBAR_SetHotItemEx (TOOLBAR_INFO *infoPtr, INT nHit, DWORD dwReason) infoPtr->nHotItem = nHit; } else - infoPtr->nHotItem = -1; + infoPtr->nHotItem = -1; } } } @@ -4767,7 +4767,7 @@ TOOLBAR_SetHotItem (HWND hwnd, WPARAM wParam) if ((INT)wParam > infoPtr->nNumButtons) return infoPtr->nHotItem; - + if ((INT)wParam < 0) wParam = -1; @@ -4795,7 +4795,7 @@ TOOLBAR_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam) if (infoPtr->iVersion >= 5) id = wParam; - himlTemp = TOOLBAR_InsertImageList(&infoPtr->himlDef, + himlTemp = TOOLBAR_InsertImageList(&infoPtr->himlDef, &infoPtr->cimlDef, himl, id); infoPtr->nNumBitmaps = 0; @@ -4857,7 +4857,7 @@ TOOLBAR_SetInsertMark (HWND hwnd, WPARAM wParam, LPARAM lParam) return 0; } - if ((lptbim->iButton == -1) || + if ((lptbim->iButton == -1) || ((lptbim->iButton < infoPtr->nNumButtons) && (lptbim->iButton >= 0))) { @@ -4902,8 +4902,8 @@ TOOLBAR_SetMaxTextRows (HWND hwnd, WPARAM wParam, LPARAM lParam) * 1. It is not only used on buttons with the BTNS_AUTOSIZE style * 2. It is not used to create a blank area between the edge of the button * and the text or image if TBSTYLE_LIST is set. It is used to control - * the gap between the image and text. - * 3. It is not applied to both sides. If TBSTYLE_LIST is set it is used + * the gap between the image and text. + * 3. It is not applied to both sides. If TBSTYLE_LIST is set it is used * to control the bottom and right borders [with the border being * szPadding.cx - (GetSystemMetrics(SM_CXEDGE)+1)], otherwise the padding * is shared evenly on both sides of the button. @@ -5269,10 +5269,10 @@ static LRESULT TOOLBAR_Unkwn460(HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd); TRACE("hwnd=%p iListGap=%ld\n", hwnd, wParam); - + if (lParam != 0) FIXME("lParam = 0x%08lx. Please report\n", lParam); - + infoPtr->iListGap = (INT)wParam; InvalidateRect(hwnd, NULL, TRUE); @@ -5395,13 +5395,13 @@ TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) infoPtr->dwStyle = dwStyle; infoPtr->tbim.iButton = -1; GetClientRect(hwnd, &infoPtr->client_rect); - infoPtr->bUnicode = infoPtr->hwndNotify && + infoPtr->bUnicode = infoPtr->hwndNotify && (NFR_UNICODE == SendMessageW(hwnd, WM_NOTIFYFORMAT, (WPARAM)hwnd, (LPARAM)NF_REQUERY)); infoPtr->hwndToolTip = NULL; /* if needed the tooltip control will be created after a WM_MOUSEMOVE */ SystemParametersInfoW (SPI_GETICONTITLELOGFONT, 0, &logFont, 0); infoPtr->hFont = infoPtr->hDefaultFont = CreateFontIndirectW (&logFont); - + OpenThemeData (hwnd, themeClass); TOOLBAR_CheckStyle (hwnd, dwStyle); @@ -5430,8 +5430,7 @@ TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam) if (infoPtr->strings) { INT i; for (i = 0; i < infoPtr->nNumStrings; i++) - if (infoPtr->strings[i]) - Free (infoPtr->strings[i]); + Free (infoPtr->strings[i]); Free (infoPtr->strings); } @@ -5446,7 +5445,7 @@ TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam) /* delete default font */ DeleteObject (infoPtr->hDefaultFont); - + CloseThemeData (GetWindowTheme (hwnd)); /* free toolbar info data */ @@ -5556,7 +5555,7 @@ TOOLBAR_SetRelativeHotItem(TOOLBAR_INFO *infoPtr, INT iDirection, DWORD dwReason nmtbwhi.idNew = infoPtr->buttons[nNewHotItem].idCommand; nmtbwhi.iDirection = iDirection; nmtbwhi.dwReason = dwReason; - + if (TOOLBAR_SendNotify(&nmtbwhi.hdr, infoPtr, TBN_WRAPHOTITEM)) return; } @@ -5662,7 +5661,7 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) { infoPtr->nButtonDrag = nHit; SetCapture (hwnd); - + /* If drag cursor has not been loaded, load it. * Note: it doesn't need to be freed */ if (!hCursorDrag) @@ -5678,7 +5677,7 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) arrowRect.left = max(btnPtr->rect.left, btnPtr->rect.right - DDARROW_WIDTH); /* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */ - if ((btnPtr->fsState & TBSTATE_ENABLED) && + if ((btnPtr->fsState & TBSTATE_ENABLED) && ((btnPtr->fsStyle & BTNS_WHOLEDROPDOWN) || ((btnPtr->fsStyle & BTNS_DROPDOWN) && ((TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle) && PtInRect(&arrowRect, pt)) || @@ -5719,7 +5718,7 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) nHit = TOOLBAR_InternalHitTest(hwnd, &pt); if (!infoPtr->bAnchor || (nHit >= 0)) TOOLBAR_SetHotItemEx(infoPtr, nHit, HICF_MOUSE | HICF_LMOUSE); - + /* remove any left mouse button down or double-click messages * so that we can get a toggle effect on the button */ while (PeekMessageW(&msg, hwnd, WM_LBUTTONDOWN, WM_LBUTTONDOWN, PM_REMOVE) || @@ -5762,7 +5761,7 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) nmmouse.dwItemData = infoPtr->buttons[nmmouse.dwHitInfo].dwData; } - ClientToScreen(hwnd, &pt); + ClientToScreen(hwnd, &pt); nmmouse.pt = pt; if (!TOOLBAR_SendNotify(&nmmouse.hdr, infoPtr, NM_LDOWN)) @@ -5928,7 +5927,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) nmmouse.dwItemData = infoPtr->buttons[nmmouse.dwHitInfo].dwData; } - ClientToScreen(hwnd, &pt); + ClientToScreen(hwnd, &pt); nmmouse.pt = pt; if (!TOOLBAR_SendNotify((LPNMHDR)&nmmouse, infoPtr, NM_CLICK)) @@ -5958,7 +5957,7 @@ TOOLBAR_RButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam) nmmouse.dwItemData = infoPtr->buttons[nmmouse.dwHitInfo].dwData; } - ClientToScreen(hwnd, &pt); + ClientToScreen(hwnd, &pt); nmmouse.pt = pt; if (!TOOLBAR_SendNotify((LPNMHDR)&nmmouse, infoPtr, NM_RCLICK)) @@ -6055,10 +6054,10 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) TRACKMOUSEEVENT trackinfo; INT nHit; TBUTTON_INFO *btnPtr; - + if ((infoPtr->dwStyle & TBSTYLE_TOOLTIPS) && (infoPtr->hwndToolTip == NULL)) TOOLBAR_TooltipCreateControl(infoPtr); - + if ((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf)) { /* fill in the TRACKMOUSEEVENT struct */ trackinfo.cbSize = sizeof(TRACKMOUSEEVENT); @@ -6087,7 +6086,7 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) nHit = TOOLBAR_InternalHitTest (hwnd, &pt); - if (((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf)) + if (((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf)) && (!infoPtr->bAnchor || (nHit >= 0))) TOOLBAR_SetHotItemEx(infoPtr, nHit, HICF_MOUSE); @@ -6208,7 +6207,7 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam) * (Guy Albertelli 9/2001) * */ - if (((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf)) + if (((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf)) && !(cs->style & TBSTYLE_TRANSPARENT)) styleadd |= TBSTYLE_TRANSPARENT; if (!(cs->style & (CCS_TOP | CCS_NOMOVEY))) { @@ -6333,7 +6332,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm return 0; } } - else if (len > 0) + else if (tbgit.pszText[0]) { MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, -1, lpnmtdi->lpszText, sizeof(lpnmtdi->szText)/sizeof(lpnmtdi->szText[0])); @@ -6375,7 +6374,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm /* last resort: send notification on to app */ /* FIXME: find out what is really used here */ - return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, 0, (LPARAM)lpnmtdi); + return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)lpnmtdi->hdr.idFrom, (LPARAM)lpnmtdi); } @@ -6493,9 +6492,9 @@ static LRESULT TOOLBAR_SetFont(HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd); - + TRACE("font=%p redraw=%ld\n", (HFONT)wParam, lParam); - + if (wParam == 0) infoPtr->hFont = infoPtr->hDefaultFont; else @@ -6616,7 +6615,7 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nType, const STYLESTRUCT *lpStyle) if ((dwOldStyle ^ lpStyle->styleNew) & COMMON_STYLES) { TOOLBAR_AutoSize (hwnd); - + InvalidateRect(hwnd, NULL, TRUE); } } @@ -7034,7 +7033,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_SYSCOLORCHANGE: return TOOLBAR_SysColorChange (hwnd); - + case WM_THEMECHANGED: return theme_changed (hwnd); @@ -7183,7 +7182,7 @@ static BOOL TOOLBAR_GetButtonInfo(const TOOLBAR_INFO *infoPtr, NMTOOLBARW *nmtb) { int ccht = strlen(nmtba.pszText); if (ccht) - MultiByteToWideChar(CP_ACP, 0, (LPCSTR)nmtba.pszText, -1, + MultiByteToWideChar(CP_ACP, 0, (LPCSTR)nmtba.pszText, -1, nmtb->pszText, nmtb->cchText); memcpy(&nmtb->tbButton, &nmtba.tbButton, sizeof(TBBUTTON)); diff --git a/reactos/dll/win32/comctl32/tooltips.c b/reactos/dll/win32/comctl32/tooltips.c index eff84bd3439..6882a178225 100644 --- a/reactos/dll/win32/comctl32/tooltips.c +++ b/reactos/dll/win32/comctl32/tooltips.c @@ -22,11 +22,11 @@ * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 08, 2004, by Robert Shearman. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features or bugs please note them below. - * + * * TODO: * - Custom draw support. * - Animation. @@ -261,7 +261,7 @@ TOOLTIPS_Refresh (HWND hwnd, HDC hdc) BOOL icon_present; /* draw icon */ - icon_present = infoPtr->hTitleIcon && + icon_present = infoPtr->hTitleIcon && DrawIconEx(hdc, rc.left, rc.top, infoPtr->hTitleIcon, ICON_WIDTH, ICON_HEIGHT, 0, NULL, DI_NORMAL); if (icon_present) @@ -515,7 +515,7 @@ TOOLTIPS_CalcTipSize (HWND hwnd, const TOOLTIPS_INFO *infoPtr, LPSIZE lpSize) static void -TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) +TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr, BOOL track_activate) { TTTOOL_INFO *toolPtr; HMONITOR monitor; @@ -525,25 +525,40 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) NMHDR hdr; int ptfx = 0; DWORD style = GetWindowLongW(hwnd, GWL_STYLE); + INT nTool; - if (infoPtr->nTool == -1) { - TRACE("invalid tool (-1)!\n"); - return; + if (track_activate) + { + if (infoPtr->nTrackTool == -1) + { + TRACE("invalid tracking tool (-1)!\n"); + return; + } + nTool = infoPtr->nTrackTool; + } + else + { + if (infoPtr->nTool == -1) + { + TRACE("invalid tool (-1)!\n"); + return; + } + nTool = infoPtr->nTool; } - infoPtr->nCurrentTool = infoPtr->nTool; + TRACE("Show tooltip pre %d! (%p)\n", nTool, hwnd); - TRACE("Show tooltip pre %d! (%p)\n", infoPtr->nTool, hwnd); + TOOLTIPS_GetTipText (hwnd, infoPtr, nTool); - TOOLTIPS_GetTipText (hwnd, infoPtr, infoPtr->nCurrentTool); + if (infoPtr->szTipText[0] == '\0') + return; - if (infoPtr->szTipText[0] == '\0') { - infoPtr->nCurrentTool = -1; - return; - } + toolPtr = &infoPtr->tools[nTool]; - TRACE("Show tooltip %d!\n", infoPtr->nCurrentTool); - toolPtr = &infoPtr->tools[infoPtr->nCurrentTool]; + if (!track_activate) + infoPtr->nCurrentTool = infoPtr->nTool; + + TRACE("Show tooltip %d!\n", nTool); hdr.hwndFrom = hwnd; hdr.idFrom = toolPtr->uId; @@ -556,61 +571,103 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size); TRACE("size %d x %d\n", size.cx, size.cy); - if (toolPtr->uFlags & TTF_CENTERTIP) { - RECT rc; + if (track_activate) + { + rect.left = infoPtr->xTrackPos; + rect.top = infoPtr->yTrackPos; + ptfx = rect.left; - if (toolPtr->uFlags & TTF_IDISHWND) - GetWindowRect ((HWND)toolPtr->uId, &rc); - else { - rc = toolPtr->rect; - MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rc, 2); - } - rect.left = (rc.left + rc.right - size.cx) / 2; - if (style & TTS_BALLOON) - { - ptfx = rc.left + ((rc.right - rc.left) / 2); - - /* CENTERTIP ballon tooltips default to below the field - if they fit on the screen */ - if(rc.bottom + size.cy > GetSystemMetrics(SM_CYSCREEN)) - { - rect.top = rc.top - size.cy; - infoPtr->bToolBelow = FALSE; - } - else - { - infoPtr->bToolBelow = TRUE; - rect.top = rc.bottom; - } - rect.left = max(0, rect.left - BALLOON_STEMINDENT); - } - else + if (toolPtr->uFlags & TTF_CENTERTIP) { - rect.top = rc.bottom + 2; - infoPtr->bToolBelow = TRUE; + rect.left -= (size.cx / 2); + if (!(style & TTS_BALLOON)) + rect.top -= (size.cy / 2); + } + infoPtr->bToolBelow = TRUE; + + if (!(toolPtr->uFlags & TTF_ABSOLUTE)) + { + if (style & TTS_BALLOON) + rect.left -= BALLOON_STEMINDENT; + else + { + RECT rcTool; + + if (toolPtr->uFlags & TTF_IDISHWND) + GetWindowRect ((HWND)toolPtr->uId, &rcTool); + else + { + rcTool = toolPtr->rect; + MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rcTool, 2); + } + + /* smart placement */ + if ((rect.left + size.cx > rcTool.left) && (rect.left < rcTool.right) && + (rect.top + size.cy > rcTool.top) && (rect.top < rcTool.bottom)) + rect.left = rcTool.right; + } } } - else { - GetCursorPos ((LPPOINT)&rect); - if (style & TTS_BALLOON) - { - ptfx = rect.left; - if(rect.top - size.cy >= 0) + else + { + if (toolPtr->uFlags & TTF_CENTERTIP) + { + RECT rc; + + if (toolPtr->uFlags & TTF_IDISHWND) + GetWindowRect ((HWND)toolPtr->uId, &rc); + else { + rc = toolPtr->rect; + MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rc, 2); + } + rect.left = (rc.left + rc.right - size.cx) / 2; + if (style & TTS_BALLOON) { - rect.top -= size.cy; - infoPtr->bToolBelow = FALSE; + ptfx = rc.left + ((rc.right - rc.left) / 2); + + /* CENTERTIP ballon tooltips default to below the field + * if they fit on the screen */ + if (rc.bottom + size.cy > GetSystemMetrics(SM_CYSCREEN)) + { + rect.top = rc.top - size.cy; + infoPtr->bToolBelow = FALSE; + } + else + { + infoPtr->bToolBelow = TRUE; + rect.top = rc.bottom; + } + rect.left = max(0, rect.left - BALLOON_STEMINDENT); } else { - infoPtr->bToolBelow = TRUE; - rect.top += 20; + rect.top = rc.bottom + 2; + infoPtr->bToolBelow = TRUE; } - rect.left = max(0, rect.left - BALLOON_STEMINDENT); } else { - rect.top += 20; - infoPtr->bToolBelow = TRUE; + GetCursorPos ((LPPOINT)&rect); + if (style & TTS_BALLOON) + { + ptfx = rect.left; + if(rect.top - size.cy >= 0) + { + rect.top -= size.cy; + infoPtr->bToolBelow = FALSE; + } + else + { + infoPtr->bToolBelow = TRUE; + rect.top += 20; + } + rect.left = max(0, rect.left - BALLOON_STEMINDENT); + } + else + { + rect.top += 20; + infoPtr->bToolBelow = TRUE; + } } } @@ -685,7 +742,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) } hrStem = CreatePolygonRgn(pts, sizeof(pts) / sizeof(pts[0]), ALTERNATE); - + hRgn = CreateRoundRectRgn(0, (infoPtr->bToolBelow ? BALLOON_STEMHEIGHT : 0), rect.right - rect.left, @@ -696,7 +753,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) DeleteObject(hrStem); SetWindowRgn(hwnd, hRgn, FALSE); - /* we don't free the region handle as the system deletes it when + /* we don't free the region handle as the system deletes it when * it is no longer needed */ } @@ -708,10 +765,13 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) InvalidateRect(hwnd, NULL, TRUE); UpdateWindow(hwnd); - SetTimer (hwnd, ID_TIMERPOP, infoPtr->nAutoPopTime, 0); - TRACE("timer 2 started!\n"); - SetTimer (hwnd, ID_TIMERLEAVE, infoPtr->nReshowTime, 0); - TRACE("timer 3 started!\n"); + if (!track_activate) + { + SetTimer (hwnd, ID_TIMERPOP, infoPtr->nAutoPopTime, 0); + TRACE("timer 2 started!\n"); + SetTimer (hwnd, ID_TIMERLEAVE, infoPtr->nReshowTime, 0); + TRACE("timer 3 started!\n"); + } } @@ -745,98 +805,7 @@ TOOLTIPS_Hide (HWND hwnd, TOOLTIPS_INFO *infoPtr) static void TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr) { - TTTOOL_INFO *toolPtr; - RECT rect; - SIZE size; - NMHDR hdr; - - if (infoPtr->nTrackTool == -1) { - TRACE("invalid tracking tool (-1)!\n"); - return; - } - - TRACE("show tracking tooltip pre %d!\n", infoPtr->nTrackTool); - - TOOLTIPS_GetTipText (hwnd, infoPtr, infoPtr->nTrackTool); - - if (infoPtr->szTipText[0] == '\0') { - infoPtr->nTrackTool = -1; - return; - } - - TRACE("show tracking tooltip %d!\n", infoPtr->nTrackTool); - toolPtr = &infoPtr->tools[infoPtr->nTrackTool]; - - hdr.hwndFrom = hwnd; - hdr.idFrom = toolPtr->uId; - hdr.code = TTN_SHOW; - SendMessageW (toolPtr->hwnd, WM_NOTIFY, - (WPARAM)toolPtr->uId, (LPARAM)&hdr); - - TRACE("%s\n", debugstr_w(infoPtr->szTipText)); - - TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size); - TRACE("size %d x %d\n", size.cx, size.cy); - - if (toolPtr->uFlags & TTF_ABSOLUTE) { - rect.left = infoPtr->xTrackPos; - rect.top = infoPtr->yTrackPos; - - if (toolPtr->uFlags & TTF_CENTERTIP) { - rect.left -= (size.cx / 2); - rect.top -= (size.cy / 2); - } - } - else { - RECT rcTool; - - if (toolPtr->uFlags & TTF_IDISHWND) - GetWindowRect ((HWND)toolPtr->uId, &rcTool); - else { - rcTool = toolPtr->rect; - MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rcTool, 2); - } - - GetCursorPos ((LPPOINT)&rect); - rect.top += 20; - - if (toolPtr->uFlags & TTF_CENTERTIP) { - rect.left -= (size.cx / 2); - rect.top -= (size.cy / 2); - } - - /* smart placement */ - if ((rect.left + size.cx > rcTool.left) && (rect.left < rcTool.right) && - (rect.top + size.cy > rcTool.top) && (rect.top < rcTool.bottom)) - rect.left = rcTool.right; - } - - TRACE("pos %d - %d\n", rect.left, rect.top); - - rect.right = rect.left + size.cx; - rect.bottom = rect.top + size.cy; - - AdjustWindowRectEx (&rect, GetWindowLongW (hwnd, GWL_STYLE), - FALSE, GetWindowLongW (hwnd, GWL_EXSTYLE)); - - if (GetWindowLongW(hwnd, GWL_STYLE) & TTS_BALLOON) - { - HRGN hRgn; - - /* FIXME: need to add pointy bit using CreatePolyRgn & CombinRgn */ - hRgn = CreateRoundRectRgn(0, 0, rect.right - rect.left, rect.bottom - rect.top, BALLOON_ROUNDEDNESS, BALLOON_ROUNDEDNESS); - - SetWindowRgn(hwnd, hRgn, FALSE); - /* we don't free the region handle as the system deletes it when - * it is no longer needed */ - } - - SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top, - rect.right - rect.left, rect.bottom - rect.top, - SWP_SHOWWINDOW | SWP_NOACTIVATE ); - - InvalidateRect(hwnd, NULL, TRUE); - UpdateWindow(hwnd); + TOOLTIPS_Show(hwnd, infoPtr, TRUE); } @@ -2133,7 +2102,7 @@ TOOLTIPS_SetToolInfoW (HWND hwnd, WPARAM wParam, LPARAM lParam) if (infoPtr->szTipText[0] == 0) TOOLTIPS_Hide(hwnd, infoPtr); else - TOOLTIPS_Show (hwnd, infoPtr); + TOOLTIPS_Show (hwnd, infoPtr, FALSE); } return 0; @@ -2255,7 +2224,7 @@ TOOLTIPS_UpdateTipTextA (HWND hwnd, WPARAM wParam, LPARAM lParam) if(infoPtr->nCurrentTool == -1) return 0; /* force repaint */ if (infoPtr->bActive) - TOOLTIPS_Show (hwnd, infoPtr); + TOOLTIPS_Show (hwnd, infoPtr, FALSE); else if (infoPtr->bTrackActive) TOOLTIPS_TrackShow (hwnd, infoPtr); @@ -2311,9 +2280,9 @@ TOOLTIPS_UpdateTipTextW (HWND hwnd, WPARAM wParam, LPARAM lParam) if(infoPtr->nCurrentTool == -1) return 0; /* force repaint */ if (infoPtr->bActive) - TOOLTIPS_Show (hwnd, infoPtr); + TOOLTIPS_Show (hwnd, infoPtr, FALSE); else if (infoPtr->bTrackActive) - TOOLTIPS_TrackShow (hwnd, infoPtr); + TOOLTIPS_Show (hwnd, infoPtr, TRUE); return 0; } @@ -2597,7 +2566,7 @@ TOOLTIPS_Timer (HWND hwnd, WPARAM wParam, LPARAM lParam) KillTimer (hwnd, ID_TIMERSHOW); nOldTool = infoPtr->nTool; if ((infoPtr->nTool = TOOLTIPS_CheckTool (hwnd, TRUE)) == nOldTool) - TOOLTIPS_Show (hwnd, infoPtr); + TOOLTIPS_Show (hwnd, infoPtr, FALSE); break; case ID_TIMERPOP: diff --git a/reactos/dll/win32/comctl32/trackbar.c b/reactos/dll/win32/comctl32/trackbar.c index 7e3e9bedd89..f95ec5edccd 100644 --- a/reactos/dll/win32/comctl32/trackbar.c +++ b/reactos/dll/win32/comctl32/trackbar.c @@ -20,14 +20,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * NOTE - * + * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 12, 2002, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. - * + * */ #include @@ -102,18 +102,18 @@ typedef struct static const WCHAR themeClass[] = { 'T','r','a','c','k','b','a','r',0 }; -static inline int +static inline int notify_customdraw (const TRACKBAR_INFO *infoPtr, NMCUSTOMDRAW *pnmcd, int stage) { pnmcd->dwDrawStage = stage; - return SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, + return SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, pnmcd->hdr.idFrom, (LPARAM)pnmcd); } static LRESULT notify_hdr (const TRACKBAR_INFO *infoPtr, INT code, LPNMHDR pnmh) { LRESULT result; - + TRACE("(code=%d)\n", code); pnmh->hwndFrom = infoPtr->hwndSelf; @@ -144,7 +144,7 @@ notify_with_scroll (const TRACKBAR_INFO *infoPtr, UINT code) bVert ? WM_VSCROLL : WM_HSCROLL, (WPARAM)code, (LPARAM)infoPtr->hwndSelf); } - + static void TRACKBAR_RecalculateTics (TRACKBAR_INFO *infoPtr) { int i, tic, nrTics; @@ -474,8 +474,8 @@ TRACKBAR_DrawChannel (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) if (theme) { - DrawThemeBackground (theme, hdc, - (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT) ? + DrawThemeBackground (theme, hdc, + (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT) ? TKP_TRACKVERT : TKP_TRACK, TKS_NORMAL, &rcChannel, 0); } else @@ -544,7 +544,7 @@ TRACKBAR_DrawOneTic (const TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos, int fla if (flags & TBS_VERT) x += len * side; else y += len * side; LineTo(hdc, x, y); - + if (flags & TIC_SELECTIONMARK) { if (flags & TBS_VERT) { x -= side; @@ -557,7 +557,7 @@ TRACKBAR_DrawOneTic (const TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos, int fla } else { x += 2 * indent; } - + LineTo(hdc, x, y); LineTo(hdc, ox, oy); } @@ -582,7 +582,7 @@ TRACKBAR_DrawTics (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) LOGPEN ticPen = { PS_SOLID, {1, 0}, GetSysColor (COLOR_3DDKSHADOW) }; HPEN hOldPen, hTicPen; HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); - + if (theme) { int part = (dwStyle & TBS_VERT) ? TKP_TICSVERT : TKP_TICS; @@ -605,7 +605,7 @@ TRACKBAR_DrawTics (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) TRACKBAR_DrawTic (infoPtr, hdc, infoPtr->lSelMax, ticFlags | TIC_SELECTIONMARKMAX); } - + /* clean up the pen, if we created one */ if (hTicPen) { SelectObject(hdc, hOldPen); @@ -625,7 +625,7 @@ TRACKBAR_DrawThumb (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) int fillClr; int PointDepth; HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); - + if (theme) { int partId; @@ -636,7 +636,7 @@ TRACKBAR_DrawThumb (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) partId = (dwStyle & TBS_VERT) ? TKP_THUMBLEFT : TKP_THUMBTOP; else partId = (dwStyle & TBS_VERT) ? TKP_THUMBRIGHT : TKP_THUMBBOTTOM; - + if (dwStyle & WS_DISABLED) stateId = TUS_DISABLED; else if (infoPtr->flags & TB_DRAG_MODE) @@ -645,9 +645,9 @@ TRACKBAR_DrawThumb (const TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) stateId = TUS_HOT; else stateId = TUS_NORMAL; - + DrawThemeBackground (theme, hdc, partId, stateId, &thumb, 0); - + return; } @@ -824,6 +824,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) HBITMAP hOldBmp = 0, hOffScreenBmp = 0; NMCUSTOMDRAW nmcd; int gcdrf, icdrf; + HTHEME theme; if (infoPtr->flags & TB_THUMBCHANGED) { TRACKBAR_UpdateThumb (infoPtr); @@ -839,7 +840,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) infoPtr->flags &= ~ (TB_THUMBCHANGED | TB_SELECTIONCHANGED); GetClientRect (infoPtr->hwndSelf, &rcClient); - + /* try to render offscreen, if we fail, carrry onscreen */ hdc = CreateCompatibleDC(hdcDst); if (hdc) { @@ -864,18 +865,22 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) nmcd.rc = rcClient; gcdrf = notify_customdraw(infoPtr, &nmcd, CDDS_PREPAINT); if (gcdrf & CDRF_SKIPDEFAULT) goto cleanup; - + /* Erase backbround */ if (gcdrf == CDRF_DODEFAULT || notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) { - if (GetWindowTheme (infoPtr->hwndSelf)) + if ((theme = GetWindowTheme (infoPtr->hwndSelf))) { + DrawThemeBackground (theme, hdc, + (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT) ? + TKP_TRACKVERT : TKP_TRACK, TKS_NORMAL, &rcClient, 0); DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &rcClient); + } else FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE)); if (gcdrf != CDRF_DODEFAULT) notify_customdraw(infoPtr, &nmcd, CDDS_POSTERASE); } - + /* draw channel */ if (gcdrf & CDRF_NOTIFYITEMDRAW) { nmcd.dwItemSpec = TBCD_CHANNEL; @@ -904,7 +909,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) notify_customdraw(infoPtr, &nmcd, CDDS_ITEMPOSTPAINT); } } - + /* draw thumb */ if (!(dwStyle & TBS_NOTHUMB)) { if (gcdrf & CDRF_NOTIFYITEMDRAW) { @@ -928,7 +933,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) /* finish up the painting */ if (gcdrf & CDRF_NOTIFYPOSTPAINT) notify_customdraw(infoPtr, &nmcd, CDDS_POSTPAINT); - + cleanup: /* cleanup, if we rendered offscreen */ if (hdc != hdcDst) { @@ -1430,7 +1435,7 @@ TRACKBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs) hwnd, 0, 0, 0); if (infoPtr->hwndToolTip) { - TTTOOLINFOW ti; + TTTOOLINFOW ti; ZeroMemory (&ti, sizeof(ti)); ti.cbSize = sizeof(ti); ti.uFlags = TTF_IDISHWND | TTF_TRACK | TTF_ABSOLUTE; @@ -1439,7 +1444,7 @@ TRACKBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs) SendMessageW (infoPtr->hwndToolTip, TTM_ADDTOOLW, 0, (LPARAM)&ti); } } - + OpenThemeData (hwnd, themeClass); return 0; @@ -1608,7 +1613,7 @@ TRACKBAR_MouseMove (TRACKBAR_INFO *infoPtr, DWORD fwKeys, INT x, INT y) return TRUE; } - if (!(infoPtr->flags & TB_DRAG_MODE)) + if (!(infoPtr->flags & TB_DRAG_MODE)) { if (GetWindowTheme (infoPtr->hwndSelf)) { @@ -1632,7 +1637,7 @@ TRACKBAR_MouseMove (TRACKBAR_INFO *infoPtr, DWORD fwKeys, INT x, INT y) tme.dwFlags = TME_CANCEL; tme.hwndTrack = infoPtr->hwndSelf; TrackMouseEvent( &tme ); - infoPtr->flags &= ~TB_THUMB_HOT; + infoPtr->flags &= ~TB_THUMB_HOT; } if (oldFlags != infoPtr->flags) InvalidateRect (infoPtr->hwndSelf, &infoPtr->rcThumb, FALSE); } @@ -1880,10 +1885,10 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TRACKBAR_LButtonUp (infoPtr, wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam)); case WM_MOUSELEAVE: - infoPtr->flags &= ~TB_THUMB_HOT; + infoPtr->flags &= ~TB_THUMB_HOT; InvalidateRect (infoPtr->hwndSelf, &infoPtr->rcThumb, FALSE); return 0; - + case WM_MOUSEMOVE: return TRACKBAR_MouseMove (infoPtr, wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam)); diff --git a/reactos/dll/win32/comctl32/treeview.c b/reactos/dll/win32/comctl32/treeview.c index 0eff5f9e88f..937bd0ee938 100644 --- a/reactos/dll/win32/comctl32/treeview.c +++ b/reactos/dll/win32/comctl32/treeview.c @@ -2325,7 +2325,7 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE hbr = CreateSolidBrush(infoPtr->clrBk); hbrOld = SelectObject(hdc, hbr); - + centerx = (item->linesOffset + item->stateOffset) / 2; centery = (item->rect.top + item->rect.bottom) / 2; @@ -2406,21 +2406,21 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE LONG rectsize = min(height, width) / 4; /* plussize = ceil(rectsize * 3/4) */ LONG plussize = (rectsize + 1) * 3 / 4; - + HPEN hNewPen = CreatePen(PS_SOLID, 0, infoPtr->clrLine); HPEN hOldPen = SelectObject(hdc, hNewPen); - + Rectangle(hdc, centerx - rectsize - 1, centery - rectsize - 1, centerx + rectsize + 2, centery + rectsize + 2); - + SelectObject(hdc, hOldPen); DeleteObject(hNewPen); - + if (height < 18 || width < 18) { MoveToEx(hdc, centerx - plussize + 1, centery, NULL); LineTo(hdc, centerx + plussize, centery); - + if (!(item->state & TVIS_EXPANDED)) { MoveToEx(hdc, centerx, centery - plussize + 1, NULL); @@ -2431,7 +2431,7 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE { Rectangle(hdc, centerx - plussize + 1, centery - 1, centerx + plussize, centery + 2); - + if (!(item->state & TVIS_EXPANDED)) { Rectangle(hdc, centerx - 1, centery - plussize + 1, @@ -2601,7 +2601,7 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *wineItem wineItem->pszText, lstrlenW(wineItem->pszText), NULL); - + /* Draw the box around the selected item */ if ((wineItem == infoPtr->selectedItem) && inFocus) { @@ -2870,7 +2870,7 @@ TREEVIEW_Paint(TREEVIEW_INFO *infoPtr, WPARAM wParam) if (wParam) { hdc = (HDC)wParam; - GetClientRect(infoPtr->hwnd, &rc); + GetClientRect(infoPtr->hwnd, &rc); TREEVIEW_EraseBackground(infoPtr, hdc); } else @@ -4997,7 +4997,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) /* Make sure actual scrollbar state is consistent with uInternalStatus */ ShowScrollBar(hwnd, SB_VERT, FALSE); ShowScrollBar(hwnd, SB_HORZ, FALSE); - + OpenThemeData (hwnd, themeClass); return 0; diff --git a/reactos/dll/win32/comctl32/updown.c b/reactos/dll/win32/comctl32/updown.c index c919cd6c912..f7dd6883765 100644 --- a/reactos/dll/win32/comctl32/updown.c +++ b/reactos/dll/win32/comctl32/updown.c @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * NOTE - * + * * This code was audited for completeness against the documented features * of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun. - * + * * Unless otherwise noted, we believe this code to be complete, as per * the specification mentioned above. * If you discover missing features, or bugs, please note them below. - * + * */ #include @@ -100,7 +100,7 @@ typedef struct #define COUNT_OF(a) (sizeof(a)/sizeof(a[0])) static const WCHAR BUDDY_UPDOWN_HWND[] = { 'b', 'u', 'd', 'd', 'y', 'U', 'p', 'D', 'o', 'w', 'n', 'H', 'W', 'N', 'D', 0 }; -static const WCHAR BUDDY_SUPERCLASS_WNDPROC[] = { 'b', 'u', 'd', 'd', 'y', 'S', 'u', 'p', 'p', 'e', 'r', +static const WCHAR BUDDY_SUPERCLASS_WNDPROC[] = { 'b', 'u', 'd', 'd', 'y', 'S', 'u', 'p', 'p', 'e', 'r', 'C', 'l', 'a', 's', 's', 'W', 'n', 'd', 'P', 'r', 'o', 'c', 0 }; static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action); @@ -312,7 +312,7 @@ static BOOL UPDOWN_SetBuddyInt (const UPDOWN_INFO *infoPtr) WCHAR txt[20]; int len; - if (!((infoPtr->dwStyle & UDS_SETBUDDYINT) && IsWindow(infoPtr->Buddy))) + if (!((infoPtr->dwStyle & UDS_SETBUDDYINT) && IsWindow(infoPtr->Buddy))) return FALSE; TRACE("set new value(%d) to buddy.\n", infoPtr->CurVal); @@ -384,10 +384,10 @@ static LRESULT UPDOWN_Draw (const UPDOWN_INFO *infoPtr, HDC hdc) dHot = (infoPtr->Flags & FLAG_DECR) && (infoPtr->Flags & FLAG_MOUSEIN); if (theme) { uPart = (infoPtr->dwStyle & UDS_HORZ) ? SPNP_UPHORZ : SPNP_UP; - uState = (infoPtr->dwStyle & WS_DISABLED) ? DNS_DISABLED + uState = (infoPtr->dwStyle & WS_DISABLED) ? DNS_DISABLED : (uPressed ? DNS_PRESSED : (uHot ? DNS_HOT : DNS_NORMAL)); dPart = (infoPtr->dwStyle & UDS_HORZ) ? SPNP_DOWNHORZ : SPNP_DOWN; - dState = (infoPtr->dwStyle & WS_DISABLED) ? DNS_DISABLED + dState = (infoPtr->dwStyle & WS_DISABLED) ? DNS_DISABLED : (dPressed ? DNS_PRESSED : (dHot ? DNS_HOT : DNS_NORMAL)); needBuddyBg = IsWindow (infoPtr->Buddy) && (IsThemeBackgroundPartiallyTransparent (theme, uPart, uState) @@ -765,7 +765,7 @@ static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, INT x, INT if(temp != infoPtr->Flags) InvalidateRect (infoPtr->Self, NULL, FALSE); - /* Set up tracking so the mousein flags can be reset when the + /* Set up tracking so the mousein flags can be reset when the * mouse leaves the control */ tme.cbSize = sizeof( tme ); tme.dwFlags = TME_LEAVE;