-
August 2nd, 2006, 01:31 PM
#1
Flickering Problem in VC++
Hello,
I've created a MFC based VC++ Dialog application. I set green color as background for the dialog by overriding the OnCtlColor method.
I've three ActiveX Controls( Rounded Rectangle, Rectangle, Line) and i'll move these based on the value i read from the device.
I'm using the following function call to move these controls
::SetWindowPos(<Controlhandle>, HWND_TOP, objLineRect.left ,lMovePos - nCenter, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
These controls are flickering when it is moved from one place to another.
I move these controls 5 times per second.
Please help me how to get rid of the flickering.
Thanks and Regards,
Muthu.
-
August 2nd, 2006, 02:03 PM
#2
Re: Flickering Problem in VC++
Hi
Search for "Double buffering" on the net. There is a class called CMemDC
by Keith Rule which will help u avoid the flickering.
-
August 2nd, 2006, 02:28 PM
#3
Re: Flickering Problem in VC++
Maybe applying WS_CLIPCHILDREN style to the dialog window will work.
If there is no love sun won't shine
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
|