Print Page | Close Window

ScrollWindowEx causes flickering!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=15156
Printed Date: 09 June 2024 at 8:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ScrollWindowEx causes flickering!
Posted By: znakeeye
Subject: ScrollWindowEx causes flickering!
Date Posted: 11 September 2009 at 4:32am
I've created a CWnd-derived window with scrollbars. In both OnVScroll and OnHScroll I call ScrollWindowEx(..., SW_INVALIDATE) to update my view.
 
The problem is that vertical scrolling causes extreme flickering (WS_CLIPCHILDREN and WS_CLIPSIBLINGS are set, CS_VREDRAW and CS_HREDRAW are not set). Using CXTMemDC and returning FALSE from OnEraseBkgnd (tried TRUE too).
 
SB_THUMTRACK causes the flickering... I have to somehow improve the redraw mechanism.
 
Please help.


-------------
PokerMemento - http://www.pokermemento.com/



Replies:
Posted By: znakeeye
Date Posted: 11 September 2009 at 5:17am
Removing the call to ScrollWindow alltogether solves the problem. *stupid* :P

-------------
PokerMemento - http://www.pokermemento.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net