listviews in win32
by oBelIX
*STATUTORY WARNING*
This is a highly specific and technical post. You may get bored out of your skulls.
——————————————————-
Recently have worked a little with listview controls in win32 …
- In icon mode listviews tend to chop off the first pixel with LVS_EX_BORDERSELECT enabled. Dunno why, seems like a bug.
- In icon mode if you want to display checkboxes next to the items with BORDERSELECT enabled then you are in trouble. THe checkbox is drawn so close to the icon that the border overlaps it and it looks ugly. So, create a state image list and add it to the listview with two icons of a checked and unchecked state, leaving enough space around the right for the line of the BORDERSELECT to draw over 😀
- IF you enable flat headers by changing the style of the header to style & (~HDS_BUTTONS) then you wont get LVN_COLUMNCLICK notifications
- TO change the background colour of listview headers put a custom draw header. Subclass the listview and in the OnNotify handler look for NM_CUSTOMDRAW. There in CDDS_ITEMPREPAINT put in a SetBkCOlor(<hdc>, <color>) to set the background colour of the listview
Hopefully this helps some poor soul when he is trying to get listviews to work well. Mostly, I spent a heckuva lot of time on google looking for the above issues.
—————————————————
PS1 – got a lot of work
PS2 – oblivion rocks. it simply does
Even i experienced lots of problems with that pixel chopping thing.It is not a bug . It was a deliberate mistake.You can talk to me abt that , i will be happy to explain you the inricacies of programming.
Jus kiddin 😀
what the hell is a listview control ???
oblivion’s scrweing up CS these days .. oblivions sucks .. it simply does … we cud have played new maps(read de_nuke,de_train) & practised for ESWC prelims 😀
he he 🙂 welcome aboard !!!
Just my one paisa – move to .Net
@ obelix :
ur recent commnets looked like u re-initiated the flaming thingie 😉
so here goes my contribution 🙂 ……. **** PUKE ***** u geeky fellow …wat sort of stuff is that … :-X ..start writing good stuff will u ?
hey dumbfuck … are you so fucking bored ? who’s downloading Godfather ?
and check my timetable .. it rocks compared to your useless, incompetent, pathetic timetable 😀
@sanyam
i’d gladly move to .NET, but it is a compulsion to use win32
@sid:
ur timetable sucks ass