1482{
1485
1487 0);
1488
1490 {
1491 goto HandleDefaultMessage;
1492 }
1493
1494 Ret = 0;
1495
1496 switch (uMsg)
1497 {
1499 {
1503
1505 &rcUpdate,
1507 {
1509
1511 {
1514 &rcUpdate);
1515
1517 {
1519 &ps);
1520 }
1521 }
1522 }
1523 break;
1524 }
1525
1527 {
1531
1534
1535#if SUPPORT_UXTHEME
1536
1537 if (hWndCapture ==
NULL && infoPtr->ThemeHandle !=
NULL)
1538 {
1541 UINT HotTrackItemBox;
1542
1545 &HotTrackItemBox,
1546 &InCheckBox);
1547 if (HotTrackItem !=
NULL && InCheckBox)
1548 {
1549 if (infoPtr->HoveredCheckItem != HotTrackItem ||
1550 infoPtr->HoveredCheckItemBox != HotTrackItemBox)
1551 {
1552 ChangeCheckItemHotTrack(infoPtr,
1553 HotTrackItem,
1554 HotTrackItemBox);
1555 }
1556 }
1557 else
1558 {
1559 ChangeCheckItemHotTrack(infoPtr,
1561 0);
1562 }
1563
1564 tme.
cbSize =
sizeof(tme);
1568
1570 }
1571#endif
1572
1574 {
1578
1581 &PtItemBox,
1582 &InCheckBox);
1583
1587
1589 {
1593 }
1594 }
1595
1596 break;
1597 }
1598
1600 {
1602
1603 ScrollInfo.
cbSize =
sizeof(ScrollInfo);
1605
1608 &ScrollInfo))
1609 {
1611
1613 {
1616 break;
1617
1619 if (ScrollInfo.
nPos < ScrollInfo.
nMax)
1620 {
1622 }
1623 break;
1624
1626 if (ScrollInfo.
nPos > 0)
1627 {
1629 }
1630 break;
1631
1633 {
1636
1637
1638
1639
1640
1641
1643 &rcClient);
1644
1645 ScrollLines =
max(1,
1647
1648 if (ScrollInfo.
nPos + ScrollLines <= ScrollInfo.
nMax)
1649 {
1650 ScrollInfo.
nPos += ScrollLines;
1651 }
1652 else
1653 {
1655 }
1656 break;
1657 }
1658
1660 {
1663
1664
1665
1666
1667
1668
1670 &rcClient);
1671
1672 ScrollLines =
max(1,
1674
1675 if (ScrollInfo.
nPos >= ScrollLines)
1676 {
1677 ScrollInfo.
nPos -= ScrollLines;
1678 }
1679 else
1680 {
1681 ScrollInfo.
nPos = 0;
1682 }
1683 break;
1684 }
1685
1688 {
1690 break;
1691 }
1692
1694 ScrollInfo.
nPos = 0;
1695 break;
1696 }
1697
1698 if (OldPos != ScrollInfo.
nPos)
1699 {
1701
1704 &ScrollInfo,
1706
1707 if (OldPos != ScrollInfo.
nPos)
1708 {
1710 0,
1717
1722 }
1723 }
1724 }
1725 break;
1726 }
1727
1729 {
1737 {
1740 }
1741 else
1742 {
1744 }
1745 break;
1746 }
1747
1749 {
1753 {
1756 if (Ret)
1757 {
1759 }
1760 }
1761 else
1762 {
1764 }
1765 break;
1766 }
1767
1769 {
1773 {
1776
1777 if (
Item->State != OldState)
1778 {
1779
1780
1783 {
1785 {
1787 {
1789 }
1790 }
1791 else
1792 {
1794 {
1796 }
1797 }
1798 }
1799
1801 }
1803 }
1804 break;
1805 }
1806
1808 {
1810 break;
1811 }
1812
1814 {
1817 break;
1818 }
1819
1821 {
1824 Ret = 1;
1825 break;
1826 }
1827
1829 {
1831 break;
1832 }
1833
1835 {
1837 if (Ret)
1838 {
1840 }
1841 break;
1842 }
1843
1845 {
1847 {
1849 }
1851 break;
1852 }
1853
1855 {
1857 break;
1858 }
1859
1861 {
1863 break;
1864 }
1865
1867 {
1870 break;
1871 }
1872
1874 {
1878 break;
1879 }
1880
1882 {
1884 break;
1885 }
1886
1887 case WM_STYLECHANGED:
1888 {
1890 {
1892 }
1893 break;
1894 }
1895
1897 {
1899
1901 break;
1902 }
1903
1905 {
1907 UINT ScrollLines = 3;
1908
1910 0,
1911 &ScrollLines,
1912 0);
1914
1915 if (ScrollLines != 0 &&
1917 {
1919
1920 ScrollInfo.
cbSize =
sizeof(ScrollInfo);
1922
1925 &ScrollInfo))
1926 {
1928
1930 if (ScrollInfo.
nPos < 0)
1931 ScrollInfo.
nPos = 0;
1932 else if (ScrollInfo.
nPos > ScrollInfo.
nMax)
1934
1935 if (OldPos != ScrollInfo.
nPos)
1936 {
1938
1941 &ScrollInfo,
1943
1944 if (OldPos != ScrollInfo.
nPos)
1945 {
1947 0,
1954
1959 }
1960 }
1961 }
1962 }
1963 break;
1964 }
1965
1967 {
1969
1971 {
1976 }
1978 {
1981
1984 }
1985 break;
1986 }
1987
1989 {
1991
1994 {
1996
1999 }
2000 break;
2001 }
2002
2007 {
2009 {
2011 UINT NewFocusBox = 0;
2015
2018
2021 &NewFocusBox,
2022 &InCheckBox);
2023 if (NewFocus !=
NULL)
2024 {
2026 {
2027
2028
2029
2031
2033 if (ChangeFocus)
2034 {
2036 }
2037 }
2038 else
2039 {
2041 }
2042
2045 {
2048 }
2049 }
2050 else
2051 {
2053 }
2054
2055 if (ChangeFocus)
2056 {
2059 {
2061 }
2062
2064 NewFocus,
2065 NewFocusBox);
2066 }
2067
2069 {
2071 }
2072
2074 {
2076 }
2077 }
2078 break;
2079 }
2080
2082 {
2084 {
2086 {
2091
2094
2096
2099 &PtItemBox,
2100 &InCheckBox);
2101
2104 {
2109 DWORD OtherStateOld = PtItem->
State & OtherStateMask;
2111 PtItem,
2112 PtItemBox) &&
2113 ((PtItem->
State & OtherStateMask) != OtherStateOld))
2114 {
2117 OtherBox);
2118 }
2119 }
2120
2124 }
2125
2127 }
2128 break;
2129 }
2130
2132 {
2134 {
2136 {
2140 {
2144 {
2147
2149 {
2152
2156 }
2157 }
2158 }
2159 break;
2160 }
2161
2163 {
2167 {
2170 {
2172 DWORD OtherStateMask;
2173 DWORD OtherStateOld;
2174
2177
2179 OtherStateMask = ((OtherBox ==
CLB_ALLOW) ?
2186 {
2191 {
2194 OtherBox);
2195 }
2196 }
2197 }
2198 }
2199 break;
2200 }
2201
2203 {
2205 {
2207 UINT NewFocusBox = 0;
2209
2211
2214 &NewFocusBox);
2215
2216
2219 WM_CHANGEUISTATE,
2221 0),
2222 0);
2223
2225 NewFocus,
2226 NewFocusBox);
2227 }
2228 break;
2229 }
2230
2231 default:
2232 {
2233 goto HandleDefaultMessage;
2234 }
2235 }
2236 break;
2237 }
2238
2240 {
2244 {
2250
2252
2256 {
2260
2262 {
2265 OtherBox);
2266 }
2267 }
2268 }
2269 break;
2270 }
2271
2273 {
2275
2276 Ret = 0;
2278 switch (virtKey)
2279 {
2281 {
2283 {
2285 }
2286 else
2287 {
2289 }
2290 break;
2291 }
2292
2294 {
2298
2303 break;
2304 }
2305
2306 default:
2307 {
2309 {
2311 }
2312 break;
2313 }
2314 }
2315 break;
2316 }
2317
2319 {
2322 break;
2323 }
2324
2326 {
2329 break;
2330 }
2331
2332#if SUPPORT_UXTHEME
2334 {
2335 if (infoPtr->HoveredCheckItem !=
NULL)
2336 {
2337
2338 ChangeCheckItemHotTrack(infoPtr,
2340 0);
2341 }
2342 break;
2343 }
2344
2345 case WM_THEMECHANGED:
2346 {
2347 if (infoPtr->ThemeHandle !=
NULL)
2348 {
2350 infoPtr->ThemeHandle =
NULL;
2351 }
2353 {
2356 }
2357 break;
2358 }
2359#endif
2360
2362 {
2364
2365#if SUPPORT_UXTHEME
2366
2368 0,
2369 &infoPtr->HoverTime,
2370 0))
2371 {
2373 }
2374#endif
2375
2376
2378 0,
2380 0))
2381 {
2383 }
2385 {
2391 }
2392 break;
2393 }
2394
2396 {
2398 break;
2399 }
2400
2401 case WM_UPDATEUISTATE:
2402 {
2404
2406 {
2407 case UIS_SET:
2409 break;
2410
2411 case UIS_CLEAR:
2413 break;
2414 }
2415
2416 if (OldUIState != infoPtr->
UIState)
2417 {
2419 {
2423 }
2424 }
2425 break;
2426 }
2427
2429 {
2431 {
2433 {
2434
2437
2439 {
2440
2441
2445
2446
2448 {
2453 }
2454 }
2455 break;
2456 }
2458 {
2459
2462
2463
2465 break;
2466 }
2467 }
2468 break;
2469 }
2470
2472 {
2474 0,
2476 if (infoPtr !=
NULL)
2477 {
2479
2482
2484 0,
2486
2489
2491 0,
2493 0))
2494 {
2496 }
2499
2504
2507
2509 &rcClient);
2510
2513
2516
2519
2520#if SUPPORT_UXTHEME
2521 infoPtr->HoveredCheckItem =
NULL;
2522 infoPtr->HoveredCheckItemBox = 0;
2524 0,
2525 &infoPtr->HoverTime,
2526 0))
2527 {
2529 }
2530
2532 {
2535 }
2536 else
2537 {
2538 infoPtr->ThemeHandle =
NULL;
2539 }
2540#endif
2541
2543 WM_QUERYUISTATE,
2544 0,
2545 0);
2546 }
2547 else
2548 {
2549 Ret = -1;
2550 }
2551 break;
2552 }
2553
2555 {
2557 {
2559 }
2560
2562
2563#if SUPPORT_UXTHEME
2564 if (infoPtr->ThemeHandle !=
NULL)
2565 {
2567 }
2568#endif
2569
2571 0,
2572 infoPtr);
2574 0,
2576 break;
2577 }
2578
2579 default:
2580 {
2581HandleDefaultMessage:
2583 uMsg,
2586 break;
2587 }
2588 }
2589
2590 return Ret;
2591}
#define CI_TEXT_MARGIN_HEIGHT
static PCHECKITEM AddCheckItem(IN PCHECKLISTWND infoPtr, IN LPWSTR Name, IN DWORD State, IN ACCESS_MASK AccessMask, OUT INT *Index)
static VOID EscapeQuickSearch(IN PCHECKLISTWND infoPtr)
static VOID ChangeCheckItemFocus(IN PCHECKLISTWND infoPtr, IN PCHECKITEM NewFocus, IN UINT NewFocusBox)
static UINT ClearCheckBoxes(IN PCHECKLISTWND infoPtr)
static BOOL QuickSearchFindHit(IN PCHECKLISTWND infoPtr, IN WCHAR c)
static BOOL ChangeCheckBox(IN PCHECKLISTWND infoPtr, IN PCHECKITEM CheckItem, IN UINT CheckItemBox)
static BOOL DeleteCheckItem(IN PCHECKLISTWND infoPtr, IN PCHECKITEM Item)
struct _CHECKLISTWND * PCHECKLISTWND
#define DEFAULT_QUICKSEARCH_SETFOCUS_DELAY
static HFONT RetChangeControlFont(IN PCHECKLISTWND infoPtr, IN HFONT hFont, IN BOOL Redraw)
#define DEFAULT_QUICKSEARCH_RESET_DELAY
static PCHECKITEM PtToCheckItemBox(IN PCHECKLISTWND infoPtr, IN PPOINT ppt, OUT UINT *CheckBox, OUT BOOL *DirectlyInCheckBox)
static INT FindCheckItemIndexByAccessMask(IN PCHECKLISTWND infoPtr, IN ACCESS_MASK AccessMask)
static VOID UpdateCheckItemBox(IN PCHECKLISTWND infoPtr, IN PCHECKITEM Item, IN UINT ItemBox)
static VOID UpdateControl(IN PCHECKLISTWND infoPtr)
static PCHECKITEM FindEnabledCheckBox(IN PCHECKLISTWND infoPtr, IN BOOL ReverseSearch, OUT UINT *CheckBox)
static PCHECKITEM FindCheckItemByIndex(IN PCHECKLISTWND infoPtr, IN INT Index)
static VOID PaintControl(IN PCHECKLISTWND infoPtr, IN HDC hDC, IN PRECT rcUpdate)
static VOID ClearCheckItems(IN PCHECKLISTWND infoPtr)
#define CLM_CLEARCHECKBOXES
#define CLM_ENABLEQUICKSEARCH
#define CIS_ALLOWDISABLED
#define CLM_SETCHECKBOXCOLUMN
#define CLM_SETQUICKSEARCH_TIMEOUT_SETFOCUS
#define CLM_GETCHECKBOXCOLUMN
#define CLM_SETQUICKSEARCH_TIMEOUT_RESET
#define CLM_FINDITEMBYACCESSMASK
#define HeapFree(x, y, z)
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
BOOL WINAPI IsAppThemed(void)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
PCHECKITEM FocusedCheckItem
UINT QuickSearchResetDelay
PCHECKITEM QuickSearchHitItem
WCHAR QuickSearchText[65]
PCHECKITEM CheckItemListHead
UINT QuickSearchSetFocusDelay
HWND WINAPI SetCapture(_In_ HWND hWnd)
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
BOOL WINAPI ReleaseCapture(void)
#define SW_SCROLLCHILDREN
HWND WINAPI GetCapture(void)
BOOL WINAPI TrackMouseEvent(_Inout_ LPTRACKMOUSEEVENT)
#define WM_SYSCOLORCHANGE
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI IsWindowEnabled(_In_ HWND)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
BOOL WINAPI CreateCaret(_In_ HWND, _In_opt_ HBITMAP, _In_ int, _In_ int)
BOOL WINAPI DestroyCaret(void)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SystemParametersInfo
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
struct tagCREATESTRUCTW * LPCREATESTRUCTW
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
SHORT WINAPI GetKeyState(_In_ int)