aboutsummaryrefslogtreecommitdiff
path: root/c/datalistview.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/datalistview.c')
-rw-r--r--c/datalistview.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/c/datalistview.c b/c/datalistview.c
index 829f6d6..e9ad2ac 100644
--- a/c/datalistview.c
+++ b/c/datalistview.c
@@ -34,9 +34,12 @@ DlvCreate()
void
DlvShowEpisode(int iEpisode)
{
+ int i, iItem;
+ LVFINDINFO lvfi;
LVITEM lviKey, lviValue;
term_t t;
qid_t q;
+ extern HWND HElv;
ListView_DeleteAllItems(HDlv);
@@ -47,7 +50,7 @@ DlvShowEpisode(int iEpisode)
PI(t,iEpisode) return;
q = Q("episode_data","episode_datum",3,t);
- for (int i = 0; Qn(q); i++) {
+ for (i = 0; Qn(q); i++) {
char *szKey;
char *szValue;
TCHAR *tszKey, *tszValue;
@@ -77,4 +80,10 @@ DlvShowEpisode(int iEpisode)
Qc(q);
UpdateLayout();
+
+ lvfi.flags = LVFI_PARAM;
+ lvfi.lParam = iEpisode;
+ iItem = ListView_FindItem(HElv, -1, &lvfi);
+ if (iItem != -1)
+ ListView_EnsureVisible(HElv, iItem, TRUE);
}