home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!agate!ames!pacbell.com!charon.amdahl.com!netcomsv!delfin.com!dan
- From: dan@delfin.com (Dan Stickel)
- Subject: Re: LB_ADDSTRING Redrawing
- Message-ID: <1993Jan12.222639.19974@delfin.com>
- Organization: Delfin Systems
- X-Newsreader: Tin 1.1 PL4
- References: <726546452snz@chrism.demon.co.uk>
- Date: Tue, 12 Jan 1993 22:26:39 GMT
- Lines: 33
-
- chris@chrism.demon.co.uk (Chris Marriott) writes:
- : In article <1993Jan9.011837.22185@delfin.com> dan@delfin.com writes:
- :
- : >I have created an owner draw listbox. Is there any way to prevent
- : >the listbox from redrawing all visible items when it scrolls one line
- : >after receiving an LB_ADDSTRING message? Without the LB_ADDSTRING,
- : >scrolling only redraws the newly visible item, doing a quick bitmap
- : >shift of the other items.
- : >
- : >I have tried everything I could think of. At this point, it seems
- : >to me that there is no way to avoid it.
- : >
- : >
- :
- : Send the listbox a WM_SETREDRAW, FALSE message. Add all the strings
- : except the last one. Send WM_SETREDRAW, TRUE. Add the last string.
- : --
- :
-
- I appreciate the responses, but my question is actually much more
- sophisticated. I know all about WM_SETREDRAW. I want to append one
- line to the listbox and have it visible. No matter how I get it
- to be visible (SCROLL,SETPOS,etc.), all my visible owner draw lines
- receive WM_DRAWITEM messages --- this is not necessary! In fact,
- when repositioning using the WM_VSCROLL message, Windows does what I
- want (no owner draw requests except for the newly added item at the
- bottom), but then repaints the entire listbox (sending many draw item
- requests).
-
- For most people, this activity is so fast it is invisible (you can only
- catch Windows in the act by overloading your system (say, by running Spy),
- or by tracing messages. I like to really optimize my code, however.
-
-