Solved

How to stop a CWnd flickers & tramble

Posted on 1998-06-24
4
350 Views
Last Modified: 2013-11-20
I have created a control with 4 buttons & with drawing some
lines in the OnPaint. when pressing one of the buttons causes other buttons to move with the CWnd::MoveWindow().
The buttons move as expected but the control flickers and
trumbles while moving the button.
why is that and how can i correct it ???
0
Comment
Question by:sector
  • 3
4 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 30 total points
ID: 1318370
Apply the WS_CLIPCHILDREN style to your control window (the parent window of the buttons).
0
 
LVL 23

Expert Comment

by:chensu
ID: 1318371
This is because when the button is moved, the parent window gets a WM_PAINT message, which causes the parent window to redraw, it clears the buttons, then the buttons are put back. Thus, you see it flicker.
0
 
LVL 8

Expert Comment

by:trestan
ID: 1318372
The window flickering because it is slow to draw graph in Windows. Windows do not have direct access to the memory cells corresponding to the onscreen pixels, it processes the drawing statement through many layers of sofware. This process takes a long time time and results in the flickering.
Microsoft release the WinG library to help developing fast graphics operations with windows. It can be realized through a WinG OLE control.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1318373
Slow drawing does not cause flickering. Filickering is caused by drawing it, clearing it and drawing it again.

WinG is obsolete. Use DirectX if you want fast graphics operations.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Running shell command from Access 3 72
has22 challenge 11 93
sumHeights  challenge 17 70
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 535
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question