Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Disable dotted selection border - 5.02 beta

dmex wrote:

There is also some nastly flickering of the ListView controls while moving/hovering the mouse over items, Sending the control a LVS_EX_DOUBLEBUFFER message will allow the ListView controls to paint smoothly. :wink:

I've tried. But the flickering is even worse then. Would require more investigation. So I've postponed it.
martin

Re: Disable dotted selection border - 5.02 beta

dmex wrote:

The problem is that once it's reactivated by the keyboard it stays activated for the lifetime the application is running.

You can still see the last item selected by the keyboard without focus rectangles as it's darker than the other items, Explorer also does this on Vista/7 if you want an example :wink:

I'm sorry, but I do not underastand. Can you post a screenshot?
dmex

Re: Disable dotted selection border - 5.02 beta

martin wrote:

dmex wrote:

At Runtime in your WndProc callback to keep focus rectangles disabled if the user uses the keyboard to select items.

Well, I believe the focus rectangle should be there when using the keybord, shouldn't it? So that you know what item (out of many selected) has the focus.


The problem is that once it's reactivated by the keyboard it stays activated for the lifetime the application is running.

You can still see the last item selected by the keyboard without focus rectangles as it's darker than the other items, Explorer also does this on Vista/7 if you want an example :wink:
martin

Re: Disable dotted selection border - 5.02 beta

dmex wrote:

At Runtime in your WndProc callback to keep focus rectangles disabled if the user uses the keyboard to select items.

Well, I believe the focus rectangle should be there when using the keybord, shouldn't it? So that you know what item (out of many selected) has the focus.

There is also some nastly flickering of the ListView controls while moving/hovering the mouse over items, Sending the control a LVS_EX_DOUBLEBUFFER message will allow the ListView controls to paint smoothly. :wink:

Will check.
dmex

Disable dotted selection border - 5.02 beta

It's possible to disable the dotted selection border (focus rectangles) when the Explorer listview style is enabled by sending a WM_CHANGEUISTATE message at initialization of the Listview/Treeview.

More information is available here: https://devblogs.microsoft.com/oldnewthing/?p=35723

At initialization:
// Make sure focus rectangles are disabled.
SendMessage(ListViewHwnd, WM_CHANGEUISTATE, MAKELONG(UIS_SET, UISF_HIDEFOCUS), 0);

At Runtime in your WndProc callback to keep focus rectangles disabled if the user uses the keyboard to select items.
case WM_UPDATEUISTATE:
{
// Disable focus rectangles by setting or masking out the flag where appropriate.
switch (LOWORD(wParam))
{
case UIS_SET:
wParam |= UISF_HIDEFOCUS << 16;
break;
case UIS_CLEAR:
case UIS_INITIALIZE:
wParam &= ~(UISF_HIDEFOCUS << 16);
break;
}
}
break;

There is also some nastly flickering of the ListView controls while moving/hovering the mouse over items, Sending the control a LVS_EX_DOUBLEBUFFER message will allow the ListView controls to paint smoothly. :wink: