{"id":90,"date":"2007-05-12T13:50:56","date_gmt":"2007-05-12T11:50:56","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/listview-background-bitmap\/"},"modified":"2007-05-12T13:50:58","modified_gmt":"2007-05-12T11:50:58","slug":"listview-background-bitmap","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/listview-background-bitmap\/","title":{"rendered":"ListView Background Bitmap"},"content":{"rendered":"<p>Mike Orriss (TeamB)  wrote in message<br \/>\nnews:<br \/>\nVA.00000e12.00b01e3c@mikedesk&#8230; <\/p>\n<p><em>> In article <7ldg3p$\ns2p2@forums.borland.com \n \n>, Daniel Gothe wrote:<br \/>\n> > When I then add items to the ListView, they erase the Bitmap. I tried<br \/>\n> > putting the Brush.Style of the TListView as bsClear, but it doesn&#8217;t seem<br \/>\nto<br \/>\n> > work.<br \/>\n> ><br \/>\n><br \/>\n> Are you providing OnCustomDrawItem\/OnCustomDrawItem events?<br \/>\n<\/em><br \/>\nOK, me and Jody Dawkins just got this all sorted out and working. To create<br \/>\na listview with a custom bitmap in the background do the following:<\/p>\n<p>1) Add an event handler for OnCustomDraw that paints your bitmap to the<br \/>\nbackground<br \/>\n2) Add the following lines to the end of the OnCustomDraw routine:<\/p>\n<p>[code lang=&#8221;delphi&#8221;]    SetBkMode(Canvas.Handle,TRANSPARENT);<br \/>\n    Perform(LVM_SETTEXTBKCOLOR,0,LongInt(CLR_NONE));<br \/>\n    ListView_SetBKColor(Handle,CLR_NONE);<br \/>\n[\/code]<br \/>\nYour text and images should now paint correctly over the bitmap.<\/p>\n<p>Gerald<\/p>\n<p>[tags]Delphi, Components, ListView[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mike Orriss (TeamB) wrote in message news: VA.00000e12.00b01e3c@mikedesk&#8230; > In article , Daniel Gothe wrote: > > When I then add items to&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[90,75,78],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-1s","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/90"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}