|
My control inherit from list control of icon,and i reload OnCustomDraw
event.The list need refresh every minute, but OnCustomDraw will be executed when every item drawing, so the control flicks badly, how to avoid?
|
|
|
|
|
Set the extended list view style LVS_EX_DOUBLEBUFFER
If you need this to work on older windows systems you'll have to do the double buffering yourself.
|
|
|
|
|
Where did you get the LVS_EX_DOUBLEBUFFER style flag. I can't find it.
|
|
|
|
|
It's defined in commctrl.h
<br />
#if (_WIN32_WINNT >= 0x501)<br />
#define LVS_EX_DOUBLEBUFFER 0x00010000<br />
|
|
|
|
|
|
|
its an extended listview style ,EX is for that .
Regards,
FarPointer
|
|
|
|
|
Yes it's an extended listview style, and you don't use SetWindowLong to set that.
|
|
|
|
|
I thought that setting the index to GWL_EXSTYLE, you could set the style for the listview,Thanks for the info i will check it out .
Regards,
FarPointer
|
|
|
|
|
How to set the style to LVS_EX_DOUBLEBUFFER? I have no found the LVS_EX_DOUBLEBUFFER ,so I include the commctrl.h file and put SetExtendedStyle( LVS_EX_DOUBLEBUFFER ) in init method,However
error occur. Not define "CALLBACK" in PrSht.h What should i do?
|
|
|
|
|
How much custom drawing are you doing, and how are you doing it? Bad flickering/flashing can be the result of bad drawing code, so you might want to look there first and watch out for things like redundant lookups/searches, using non-cached data/values, heap abuse, etc.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
100 hundred times per second. Because i get message from server to flash items of list control per second, and the item is picture.
|
|
|
|
|
100 messages per second from the server, or updating up to 100 images per message from the server, which happens once a second? I have to guess the latter, otherwise things would likely be changing too fast for the eye to notice each discrete change.
That being the case, it is likely you do not have all 100 images visible at once, correct? Or they would be rather small, and you would likely lose fidelity. Even if they are all visible at once, you should check to make sure that:
1: Ensuring that it is only trying to draw visible items
2: Not erasing the client/drawing area before drawing the image (if an updated image is the same size as the previous one)
3: Correctly managing invalidated areas (you should only invalidate areas that have changed image data, not the entire rect of the control)
4: Correctly using CustomDraw such that you do not get draw messages for items/subitems that do not need updating, or for images that have not changed from the last update interval.
5: Not doing something naive like creating temporary CString objects (or other unnecessary heap activity) each time a draw request is received
I would start with optimizing your drawing code before you go about trying to optimize how Windows is going to paint your data. (And ignore the git that voted my previous post a "2" without providing a reason.)
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thank a million.
Server sends a flag and client gets it and updates the list control (icon style).Because the item (icon) is drawn by OnCustomDraw one by one, the list control blinks. How to draw items once?
-- modified at 1:37 Friday 31st March, 2006
|
|
|
|
|
You cannot draw all iems at once using CustomDraw (well, you could draw over the entire area, but that is not likely what you want).
You should make sure that you are not drawing any items that do not need to be updated (if not all 100 items are having their images changed), and that you are not erasing the background when doing it. That is where I would suggest you start.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks
modified 28-Sep-16 7:17am.
|
|
|
|
|
Well, you must use a (local) smtp account to send e-mails to yahoo, gmail and other.
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi.
A DLL is ANSI version(non-source code), create a ANSI window.
my project had ANSI and UNICODE version, how to let my UNICODE project easy and well handle the DLL ANSI window ?
Thanks.
|
|
|
|
|
If you are trying to mix both Ansi and Unicode I would recomend using only MBCS. You are just bound to end up in deep water if you don't. Most of my projects need to deal with Unicode and Ansi, and I have never had a problem with the MBCS. Maybe some of the other posters would be able to give you a better answer.
|
|
|
|
|
Hi all
I am making a file wiping tool.
For data wiping I googled many algorithms one of them is "The Russian GOST P 50739 95"
In this algorithm it is given that:
"1 Logical zeros (0x00 numbers) is overwritten to each byte of each sector for 6th to 4th security level systems. Randomly selected symbols (numbers)are to be overwritten to each byte of each sector for 3rd to 1st security level systems."
Here I am not getting the term "6th to 4th security level systems" and "3rd to 1st Security level systems".
So Please guide me to understand these term.
Thanks
|
|
|
|
|
Is it possible it is refering to the amount of times the algorithm passes over the selected data block? I don't know too much about data wiping, but I do know they will usually wipe the same area more than one time.
|
|
|
|
|
Thanks for your reply
it is fine that this is overwriting more than once.
but my problem is to clarify
"6th to 4th security level systems" and "3rd to 1st Security level systems".
Please guide me.
Thanks
|
|
|
|
|
Well usually a data wipe is a time consuming process, especially on computers which hold sensetive information. These types of computers can have a very large storage capacity, which when wiping, involves wiping files, free space and the swap.
Obviously the more times you wipe, the more secure your system. Most wiping utilites allow you to set the security level, they do this by adjusting the amount of times they wipe the same data block.
Take the best-crypt wipe utility for example, it offers you an 8 level passover, A level 8 (MOD level) being the highest.
rajeevktripathi wrote: "6th to 4th security level systems" and "3rd to 1st Security level systems".
I would take a guess here that there are 6 levels invloved. And the 1st to 3rd would be the highest level i.e 3 to 6 passes. But this is only a guess. I would do some googling and find out more about this particular method of wiping.
|
|
|
|
|
What Hotkey would you normally associate with Delete or Clear?
MS Word claims it to be 'Del' but I want to use this with Rich text, therefore a hotkey would clear the whole selection, formatting included.
All the Ctrl + ? hotkeys seem to be located on the left of the keyboard, so which would you choose for a Delete?
|
|
|
|