Hm, added a cw3 variable for third column and after that has been taken
care of, can do something like:
Have only used ownerdrawn listview once before, in code where I wanted
columns in different colors, so fumbling in the dark here. Normally, not
necessary to sub-class and handle WM_ERASEBKGND, but this is a bit special.
Okay, if process is slow and fast screen update, guess one can live with
slight flicker and skip sub-class. Definitely better for total repaint..
Real neat implementation is by also adding %LVS_OWNERDATA style to LV.
Then, virtual, ownerdrawn listview - must keep items in global array,
but advantage is one can add a million items to list instantly. See if
I can extract a sample from other huge code here later on today.
Nor sure about THREAD CLOSE there. Never had to work with the THREAD
commands, so don't know if it's correct way to do it.
------------------
Forgot, need to add "DECR rc.nTop" after text is drawn in second column,
otherwise it will cause "lines" in last columns.
[This message has been edited by Borje Hagsten (edited October 20, 2001).]
care of, can do something like:
Code:
'COLUMN.. the rest.. GetClientRect hListView, rc rc.nLeft = cw1 + cw2 + cw3 'add up column widths and see if we have something left to paint IF rc.nLeft < rc.nRight THEN FillRect @lpdis.hDC, rc, GetSysColorBrush(%COLOR_WINDOW)
columns in different colors, so fumbling in the dark here. Normally, not
necessary to sub-class and handle WM_ERASEBKGND, but this is a bit special.
Okay, if process is slow and fast screen update, guess one can live with
slight flicker and skip sub-class. Definitely better for total repaint..

Real neat implementation is by also adding %LVS_OWNERDATA style to LV.
Then, virtual, ownerdrawn listview - must keep items in global array,
but advantage is one can add a million items to list instantly. See if
I can extract a sample from other huge code here later on today.
Nor sure about THREAD CLOSE there. Never had to work with the THREAD
commands, so don't know if it's correct way to do it.
------------------
Forgot, need to add "DECR rc.nTop" after text is drawn in second column,
otherwise it will cause "lines" in last columns.
[This message has been edited by Borje Hagsten (edited October 20, 2001).]
Comment