im using MoveWindow under WM_SIZE to change my subwindows according to the
parent window but all the child windows are blinking all the time...
is there a way i can make em stop?
im using MoveWindow under WM_SIZE to change my subwindows according to the
parent window but all the child windows are blinking all the time...
is there a way i can make em stop?
yes i do for every subwindow that needs to be resized (total of 5 and i need to add another 4)
I don't want to test, but it may be that the windows are resized too frequently. Each time you "move" them, Windows will repaint them and if you repaint too often, you get blinking or flickering effect due to Windows limitations.
This is my theory on your problem.
i do belive you could be right. so i could do some sort of global counter to divide it by 4 or something..
i`ll let you know in a few minutes
nop, not it.
i got it down to 1/15 times and the listboxs resized noticably less but the text inside and the buttons are flickering.
Well, can you use Spy++ to monitor how many WM_PAINT messages the child windows are receiving?
Unless you have window proc's for those too. Otherwise you could subclass them and monitor how many WM_PAINT messages they get.
EDIT: Well, I'm stabbing in the wild again, but you do call MoveWindow with FALSE for bRepaint, right?
never used or heard of spy++ before but i found it and im working on finding out how its done... will take me a few mins at least.....
wow, i just resized the parent window just a bit and it posted A LOT of WM_PAINT msgs
and this is using the 1/15 divider, so maybe i need to limit the amount of WM_PAINT msgs the main windows sends it and then it could be all right!
Last edited by robig2; 01-12-2008 at 03:13 PM.
I just solved a flickering problem similar to this. All I did was add WS_CLIPCHILDREN to the windows style. There is also this website I found with other tips on how to reduce flickering...
http://www.catch22.net/tuts/flicker.asp
Also this site...
http://msdn2.microsoft.com/en-us/library/ms969905.aspx
thanks rakan, that helped me stop the buttons from flickering now i need to get the text in the list boxs to stop and im there!
ive been playing around with
but i need to find exactly where to place those in order that my list is updated when should but thats it. that would eliminate all flickering inside it i think.Code:SendMessage(hwndListFname,WM_SETREDRAW,1,0);
edit:
anyway i loot at it, i need to handle the listbox`s WM_PAINT msg. but since the listbox`s proc is predefined, i cant change it!
ideas?
did anyone ever get a listbox or any edit control working that doesnt flicker the text inside it on resize?
Last edited by robig2; 01-13-2008 at 04:19 AM.
The article mentions you can handle the WM_ERASEBKG message or specify a style when creating it.
You can subclass a control, though. What dose this do? It allows you to specify a new window proc procedure for the control where messages are sent.
How do you do it? You do it using SetWindowLong I believe.