does anyone know how to reduce the flickering of an ownerdrawn listbox (when you scroll or resize the window)
it works with a normal listbox (using wm_erasebkgnd), but that dosn't work with an ownerdrawn one.
anyone know how to fix it ?
Posted on 2004-06-11 01:11:43 by someone
anyone ?
Posted on 2004-06-12 07:45:16 by someone
i think i read this somewhere. You need to lock the listbox while updating (which causes the flicker) and then unlock when done. don't exactly know how that's done tho.
Posted on 2004-06-12 10:23:42 by evil__donkey

invoke LockWindowUpdate, hListboxHandle

;update listbox

invoke LockWindowUpdate, 0

Posted on 2004-06-12 11:29:54 by Delight
hi, nope
i'm already using LockWindowUpdate, the flickering happens when the window is resized, rather than when adding stuff
thanks for replying though

any other ideas ?
Posted on 2004-06-13 00:32:34 by someone
Flickering during a resize is (usually) a result of the parent
window overdrawing the child and the child having to
repaint itself. Its usually very fast, but the eye is faster.

In such cases, experiment with the different clipping

My guess is that your main window needs to clip its children...
Of course there are other reasons why you might be getting
Posted on 2004-06-13 12:20:38 by Graebel
Use double-buffering?
CreateCompatibleDC, CreateCompatibleBitmap, SelectObject, BitBlt, DeleteDC, DeleteObject
Posted on 2004-06-13 13:05:20 by comrade
i tried ws_clipsiblings and ws_clipchildren, but that just made it worse.
also double buffering seems pretty complex just to stop flickering, but i'll try it anyway
Posted on 2004-06-14 00:16:32 by someone
if the flickering appear just when scrolling the listbox (without resizeing) , double buffering will possibly not help. Post your code.

Posted on 2004-06-14 00:34:18 by japheth
hey, nah the flickering is also when resizing the window
i think double buffering should fix it cause it's owner-drawn
but i gotta work out how to do double buffering first, seems a bit complicated
Posted on 2004-06-14 05:23:29 by someone