-
September 19th, 2004, 05:41 AM
#1
Reducing flickering when resizing
I am looking for ways to reduce flickering when resizing. I've set WS_CLIPCHILDREN on parent windows, which reduced a lot of flicker. I couldn't find anywhere were WS_CLIPSIBLINGS made a difference. I still have a lot of flicker, and its only really in 3 places. In my edit controls, tab controls, and list controls, there is a lot of flickering when resizing. How do I stop this from happening?
edit: I've also tried to put FALSE in the last parameter of MoveWindow, that doesn't help and causes really bad smearing effects. also tried making window classes without CS_VREDRAW and CS_HREDRAW in PreCreateWindow, usually caused bad smearing effects also.
Last edited by Kibble; September 19th, 2004 at 05:44 AM.
-
September 19th, 2004, 06:13 AM
#2
Re: Reducing flickering when resizing
Where do you put those controls? What do you do on resizing? Do you move that controls to fit?
"Programs must be written for people to read, and only incidentally for machines to execute."
-
September 19th, 2004, 02:37 PM
#3
Re: Reducing flickering when resizing
here is an example of a WM_SIZE handler:
Code:
void CEdConsole::OnSize(UINT nType, int cx, int cy)
{
m_Text.MoveWindow(0, 0, cx, cy - 21);
m_Input.MoveWindow(0, cy - 18, cx - 52, 18);
m_Enter.MoveWindow(cx - 48, cy - 18, 48, 18);
m_Input.Invalidate(FALSE); // needed because for some reason little graphics errors occurred in the border
CSizingControlBarCF::OnSize(nType, cx, cy);
}
m_Text is a multiline readonly edit control, m_Input is a single line edit control, m_Enter is a button. The text m_Text flickers pretty badly when resizing. I tried passing FALSE in the last param of m_Text.MoveWindow, but it doesn't help, and it causes the scroll bars to get screwed up.
-
September 19th, 2004, 04:05 PM
#4
Re: Reducing flickering when resizing
Instead of .MoveWindow you might want to try .SetWindowPos function. I was having a similar problem and SetWindowPos solved it. Also you might be interested in WM_EXITSIZEMOVE to refresh once resizing ends. I hope these help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|