Flickering in custom draw ListCtrl
-
I've inherited my control from CListCtrl and overriden OnCustomDraw. And in OnCustomDraw method i do my own drawing only at CDDS_ITEMPOSTPAINT|CDDS_SUBITEM stage. At other stages before this one CDRF_SKIPDEFAULT flag is UNset (i want standart CListCtrl to draw header). Now, with every drawing of my control it flickers. I tried to use double buffering (draw in memory DC and than BitBlt to original), but there was just black screen. Does anyone know what's the problem? And how can i avoid flickering? Thanks in advance.
-
I've inherited my control from CListCtrl and overriden OnCustomDraw. And in OnCustomDraw method i do my own drawing only at CDDS_ITEMPOSTPAINT|CDDS_SUBITEM stage. At other stages before this one CDRF_SKIPDEFAULT flag is UNset (i want standart CListCtrl to draw header). Now, with every drawing of my control it flickers. I tried to use double buffering (draw in memory DC and than BitBlt to original), but there was just black screen. Does anyone know what's the problem? And how can i avoid flickering? Thanks in advance.
With CDDS_POSTPAINT you're getting the chance to draw *after* item/subitem was painted. What kind of information are you displaying? Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
-
With CDDS_POSTPAINT you're getting the chance to draw *after* item/subitem was painted. What kind of information are you displaying? Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
-
I'm drawing images and text. the problem, why i cant use standart list, is that i have to draw multiple selection in my own way. e.g. selected images should be drawn like another image etc. its not my idea, so did customer want :( nobody is perfect
You've mentioned that CDRF_SKIPDEFAULT is unset, so basically you're telling Windows to draw the default stuff and notify you when it's done. Except this 'selected image', what are other things you want to do with selection? Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
-
You've mentioned that CDRF_SKIPDEFAULT is unset, so basically you're telling Windows to draw the default stuff and notify you when it's done. Except this 'selected image', what are other things you want to do with selection? Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.