--- trunk/reactos/lib/aclui/checklist.c 2005-07-04 11:52:16 UTC (rev 16407)
+++ trunk/reactos/lib/aclui/checklist.c 2005-07-04 13:21:14 UTC (rev 16408)
@@ -50,6 +50,7 @@
PCHECKITEM FocusedCheckItem;
UINT FocusedCheckItemBox;
BOOL FocusedPushed;
+ BOOL FocusVisible;
COLORREF TextColor[2];
UINT CheckBoxLeft[2];
@@ -840,7 +841,7 @@
((Item->State & CIS_ALLOW) ? DFCS_CHECKED : 0) |
(IsPushed ? DFCS_PUSHED : 0));
}
- if (Item == infoPtr->FocusedCheckItem &&
+ if (Item == infoPtr->FocusedCheckItem && infoPtr->FocusVisible &&
infoPtr->HasFocus &&
infoPtr->FocusedCheckItemBox != CLB_DENY)
{
@@ -895,7 +896,7 @@
((Item->State & CIS_DENY) ? DFCS_CHECKED : 0) |
(IsPushed ? DFCS_PUSHED : 0));
}
- if (infoPtr->HasFocus &&
+ if (infoPtr->HasFocus && infoPtr->FocusVisible &&
Item == infoPtr->FocusedCheckItem &&
infoPtr->FocusedCheckItemBox == CLB_DENY)
{
@@ -995,8 +996,8 @@
rcUpdate.left = rcClient.left + infoPtr->CheckBoxLeft[ItemBox] - (infoPtr->ItemHeight / 2);
rcUpdate.right = rcUpdate.left + infoPtr->ItemHeight;
- rcUpdate.top = ((Index - VisibleFirst) * infoPtr->ItemHeight) + CI_TEXT_MARGIN_HEIGHT;
- rcUpdate.bottom = rcUpdate.top + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT);
+ rcUpdate.top = ((Index - VisibleFirst) * infoPtr->ItemHeight);
+ rcUpdate.bottom = rcUpdate.top + infoPtr->ItemHeight;
RedrawWindow(infoPtr->hSelf,
&rcUpdate,
@@ -1727,6 +1728,15 @@
Shift,
&NewFocusBox);
+ if (!infoPtr->FocusVisible)
+ {
+ /* change the UI status */
+ SendMessage(GetAncestor(hwnd, GA_ROOT),
+ WM_CHANGEUISTATE,
+ MAKEWPARAM(UIS_INITIALIZE, UISF_HIDEFOCUS),
+ 0);
+ }
+
ChangeCheckItemFocus(infoPtr,
NewFocus,
NewFocusBox);
@@ -1852,6 +1862,35 @@
TRUE);
break;
}
+
+ case WM_UPDATEUISTATE:
+ {
+ BOOL OldFocusVisible = infoPtr->FocusVisible;
+
+ switch(LOWORD(wParam))
+ {
+ case UIS_CLEAR:
+ {
+ infoPtr->FocusVisible = (HIWORD(wParam) & UISF_HIDEFOCUS);
+ break;
+ }
+ case UIS_SET:
+ case UIS_INITIALIZE:
+ {
+ infoPtr->FocusVisible = !(HIWORD(wParam) & UISF_HIDEFOCUS);
+ break;
+ }
+ }
+
+ if (infoPtr->FocusVisible != OldFocusVisible &&
+ infoPtr->FocusedCheckItem != NULL)
+ {
+ UpdateCheckItemBox(infoPtr,
+ infoPtr->FocusedCheckItem,
+ infoPtr->FocusedCheckItemBox);
+ }
+ break;
+ }
case WM_CREATE:
{
@@ -1908,6 +1947,11 @@
infoPtr->ThemeHandle = NULL;
}
#endif
+
+ infoPtr->FocusVisible = !(SendMessage(hwnd,
+ WM_QUERYUISTATE,
+ 0,
+ 0) & UISF_HIDEFOCUS);
}
else
{
--- trunk/reactos/w32api/include/winuser.h 2005-07-04 11:52:16 UTC (rev 16407)
+++ trunk/reactos/w32api/include/winuser.h 2005-07-04 13:21:14 UTC (rev 16408)
@@ -1316,7 +1316,24 @@
#define WM_CANCELMODE 31
#define WM_CAPTURECHANGED 533
#define WM_CHANGECBCHAIN 781
+
+#if (WINVER >= 0x0500)
#define WM_CHANGEUISTATE 295
+#define WM_UPDATEUISTATE 296
+#define WM_QUERYUISTATE 297
+
+#define UIS_SET 1
+#define UIS_CLEAR 2
+#define UIS_INITIALIZE 3
+
+#define UISF_HIDEFOCUS 0x1
+#define UISF_HIDEACCEL 0x2
+#if (WINVER >= 0x0501)
+#define UISF_ACTIVE 0x4
+#endif
+
+#endif
+
#define WM_CHAR 258
#define WM_CHARTOITEM 47
#define WM_CHILDACTIVATE 34