In my list view, I'm responding to LVN_ITEMACTIVATE when the user selects an
item from the list. But this notification is sent when the user double-taps
the item; unlike the default behaviour people are used to in the rest of the
OS, where items are activated when the user TAPS and LETS GO from the item.
Naturally, I could respond to LVN_ITEMCHANGED, but that would happen so fast
the user would not even notice the item being selected.

I don't understand this, I find it unlogical. Can anyone explain to me how I
can make my list list behave like the rest of the list views, I'd be grateful!

I'm using API not MFC.

Re: List views - why is double-tapping the default activation action? by Ilya

Ilya
Thu Dec 02 23:54:18 CST 2004

This is normal for common list view. You can set LVS_EX_ONECLICKACTIVATE
style form ListView_SetExtendedListViewStyle function.


"Chris Oz" <ChrisOz@discussions.microsoft.com> wrote in message
news:7F0A02BD-E8CF-4EBE-AD0C-65473C7FA213@microsoft.com...
> In my list view, I'm responding to LVN_ITEMACTIVATE when the user selects
an
> item from the list. But this notification is sent when the user
double-taps
> the item; unlike the default behaviour people are used to in the rest of
the
> OS, where items are activated when the user TAPS and LETS GO from the
item.
> Naturally, I could respond to LVN_ITEMCHANGED, but that would happen so
fast
> the user would not even notice the item being selected.
>
> I don't understand this, I find it unlogical. Can anyone explain to me how
I
> can make my list list behave like the rest of the list views, I'd be
grateful!
>
> I'm using API not MFC.



Re: List views - why is double-tapping the default activation acti by ChrisOz

ChrisOz
Fri Dec 03 02:12:20 CST 2004

Thanks Ilya!

"Ilya Manin" wrote:

> This is normal for common list view. You can set LVS_EX_ONECLICKACTIVATE
> style form ListView_SetExtendedListViewStyle function.
>
>
> "Chris Oz" <ChrisOz@discussions.microsoft.com> wrote in message
> news:7F0A02BD-E8CF-4EBE-AD0C-65473C7FA213@microsoft.com...
> > In my list view, I'm responding to LVN_ITEMACTIVATE when the user selects
> an
> > item from the list. But this notification is sent when the user
> double-taps
> > the item; unlike the default behaviour people are used to in the rest of
> the
> > OS, where items are activated when the user TAPS and LETS GO from the
> item.
> > Naturally, I could respond to LVN_ITEMCHANGED, but that would happen so
> fast
> > the user would not even notice the item being selected.
> >
> > I don't understand this, I find it unlogical. Can anyone explain to me how
> I
> > can make my list list behave like the rest of the list views, I'd be
> grateful!
> >
> > I'm using API not MFC.
>
>
>

Re: List views - why is double-tapping the default activation action? by Magnus

Magnus
Fri Dec 03 03:33:34 CST 2004

That is how the listview notification works. Nothing wrong with that.

I suspect that you refer to the way "Settings" works in the PDA when you say
"unlike the default behaviour people are used to in the rest of the OS".

To get that functionallity you need to handle both NM_CLICK and
LVN_ITEMACTIVATE.
The WPARAM holds the control ID and LPARAM contain a pointer to a NMHDR
structure. You could pass LPARAM to your own method that will handle the
notification. Take a look at the example function below.

E.g.
LRESULT OnListViewItemClick(LPNMHDR pNMHDR)
{
int nItem = ((LPNMLISTVIEW)pNMHDR)->iItem;
if (nItem >= 0)
{
// Do your stuff here.
}

return 0;
}

So... when you get the notifications NM_CLICK or LVN_ITEMACTIVATE you can
call OnListViewItemClick((LPNMHDR)lParam); Just make sure the events comes
from your listview by matching the ID with wParam.

/Magnus

"Chris Oz" <ChrisOz@discussions.microsoft.com> wrote in message
news:7F0A02BD-E8CF-4EBE-AD0C-65473C7FA213@microsoft.com...
> In my list view, I'm responding to LVN_ITEMACTIVATE when the user selects
> an
> item from the list. But this notification is sent when the user
> double-taps
> the item; unlike the default behaviour people are used to in the rest of
> the
> OS, where items are activated when the user TAPS and LETS GO from the
> item.
> Naturally, I could respond to LVN_ITEMCHANGED, but that would happen so
> fast
> the user would not even notice the item being selected.
>
> I don't understand this, I find it unlogical. Can anyone explain to me how
> I
> can make my list list behave like the rest of the list views, I'd be
> grateful!
>
> I'm using API not MFC.