LVN_KEYDOWN - how to discard the keypress

Giganews Newsgroups
Subject: LVN_KEYDOWN - how to discard the keypress
Posted by:  R.Wieser (addre…@not.available)
Date: Wed, 23 Dec 2020

Hello all,

I've got a listview in which I when the "up" or "down" arrow is pressed when
on the top or bottom  rows the contents of the listview are reloaded and I
set the bottom / top row as focussed and selected.

The problem is that the actual focussed and selected row becomes the second
one / one before last.  I take it that that happens because the listviews
internal mechanics still see the "up" / "down" keypress and executes it -
after I placed the "cursor" on the top / bottom row.

My question therefore is:
Can I, in the LVN_KEYDOWN event, either erase the keystroke or mark the it
as already having been handled ?

Regards,
Rudy Wieser

Replies