Using VS2005, C++, .NET
I have a ListView with OwnerDraw=true, Details view, that I am using
to display messages in real-time. Ideally I want to scroll down to the
bottom, i.e. most recent message, each time one is added.
However the control flickers horribly, much worse than the RichTextBox
which I'm using elsewhere.
I've tried various techniques, double-buffering, filtering out
WM_ERASEBKGND, but none of them seem to work.
Any suggestions for a way to prevent flickering?
TIA,
KK 4 1717
Did you try using ListView.BeginU pdate and EndUpdate? Put your item
addition and scrolling calls between these two. Not sure how it
behaves with OwnerDraw, though.
-- http://www.kynosarges.de
On 29 Mar, 09:24, Chris Nahr <dioge...@kynos arges.dewrote:
Did you try using ListView.BeginU pdate and EndUpdate? *Put your item
addition and scrolling calls between these two. *Not sure how it
behaves with OwnerDraw, though.
--http://www.kynosarges. de
I haven't tried BeginUpdate and EndUpdate because all the postings
I've seen from other users say they don't work.
KK
On Mon, 31 Mar 2008 00:47:04 -0700 (PDT), ke***********@g ooglemail.com
wrote:
>I haven't tried BeginUpdate and EndUpdate because all the postings I've seen from other users say they don't work.
I have no idea what postings you might be referring to. Of course
these calls work, in some way at least. They might not have the
effect you want in your specific scenario but you won't know that
until you try them.
-- http://www.kynosarges.de ke***********@g ooglemail.com wrote:
However the control flickers horribly, much worse than the RichTextBox
which I'm using elsewhere.
I've tried various techniques, double-buffering, filtering out
WM_ERASEBKGND, but none of them seem to work.
Any suggestions for a way to prevent flickering?
Take a look at ControlStyles.O paque, ControlStyles.D oubleBuffer,
ControlStyles.R esizeRedraw, etc.: http://msdn2.microsoft.com/en-us/lib...es(VS.71).aspx
Opaque
If true, the control is drawn opaque and the background is not painted.
If I remember correctly, setting the Opaque flag is the most important
thing. Otherwise the control paints a solid background, which undermines
all your double buffering efforts (i.e. the control will fill a solid
rectangle before you paint your stuff, and that causes the most terrible
flicker).
Without seeing your code, this is the best I can recommend.
Tom This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Anushya |
last post by:
Hi
I am using Listview and inherited listview control overriding WndProc
& PreProcessMessage in ListView.
I need this to customize listview to display only the page the user
scrolls to. Since i am populating listview with more than 200,000
items. It is too slow and tried virtual listview. But that doesnot
allow me to add images in the listview. So now trying to list only the
page user scrolls to.
|
by: Joaquin Grech |
last post by:
Hi
I did alot of research on this on the web and msdn and I couldn't find
anything.
I have a listview showing as a grid (table looking, with rows and columns
and no images at all, only text). I get the information to display on the
listview from the network and I add items often and stuff.
But more than adding items, what worries me is the step of modifying items.
|
by: Anushya devi |
last post by:
Hi All
I used listview and tried to update it by using Addrange.
When the number of items is less, it works fine.. But I
need to update nearly 200,000 items and it hangs. Also i
need to add images to listview also(This is to list all
the items in my inbox, and want to give the user the feel
of outlook).
Since it hangs for even 1000 items in the inbox, i tried
to shift to virtual listview. But virtual listview
|
by: C# Learner |
last post by:
Has anyone else noticed ListView's unbearable flickering?
I have a project containing a list-view with the following:
- View: Details
- Columns: 5
The following code causes the list-view to flicker:
private void TestListView()
{
|
by: John Lee |
last post by:
Hi,
I have a windows application that uses the listview to display about 50
items in detailed view - 4 columns. The first column is static and other
columns will be updated in 100-1000ms - it looks awful when it's running -
flickering too much!!!
Anyone know how to solve this flickering problem? or how should I deal with
this issue? I see some other C++ app can display more than 100 items without
any flickering in such as speed. Can...
| |
by: John Lee |
last post by:
Thanks Jay for your response.
I tried your code and it still flickering a lot. To demonstrate it, you can
grab a listview, create 3 columns - name, value, timestamp, in form_load
event to add 50 items into that listview as Item1 - Item49, add a timer to
your windows form, set the timer interval to 100 ms, in the event handler,
add the code to update the value and timestamp
Random r = new Random();
listView1.BeginUpdate();
|
by: jtalbot_vizible |
last post by:
I was looking at the code on codeproject to solve my listview
flickering issue. All the references to functions in the rest of my
post refer to that code. It's available at
http://www.codeproject.com/cs/miscctrl/listviewff.asp?df=100&forumid=14314&select=1488858&msg=1488858
That code didn't solve my problem. I have a ListView (in Details mode)
with about 70 rows and 12 columns. It's a stock ticker kind of app.
When it first starts, each...
|
by: James |
last post by:
Hi all,
I have made a derived Listview which can accept the controls as
items in it. Controls that we are using are Buttons in each row and
implemented Grouping with the help of controls(label on panel) . Coz
Inbuilt listview Grouping not supported in OS like window 98.
Although I had used Double buffering
(SetStyle(ControlStyles.DoubleBuffer, true); .. in my Listview) but
still the listview flickers much when we scroll its items. ...
|
by: James |
last post by:
Hi all,
I have made a derived Listview in C# .net 1.1 framework, which can
accept the controls as
items in it. Controls that we are using are Buttons in each row and
implemented Grouping with the help of controls(label on panel) . Coz
Inbuilt listview Grouping not supported in OS like window 98.
Although I had used Double buffering
(SetStyle(ControlStyles.DoubleBuffer, true); .. in my Listview) but
still the listview flickers much...
|
by: IanWright |
last post by:
I'm trying to change the cursor that appears on a standard ListView when the cursor appears over an item. However I am getting a flickering effect as the mouse is changed to a finger cursor, and then back to what I asked it to be.
I'm trying to isolate this flicker/changing to the hand cursor but can't figure out where it's occuring or how to stop it. To replicate this...
1) Create a form with a ListView on it.
2) Add an image list and...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |