SAMPLE: FLICKER - Sample Application

PSS ID Number: Q103221
Article last modified on 08-23-1993

3.10
WINDOWS

----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Windows Software Development Kit (SDK) for Windows
   version 3.1
----------------------------------------------------------------------

Flicker: Shows How to Update Screen Without Flickers
Flicker is a companion sample application for the "Flicker-Free
Displays Using an Off-Screen DC" technical article on the Microsoft®
Developer Network CD.
Many applications written for the Microsoft Windows™ operating
system maintain status information such as the current time in a small
control window that flickers very annoyingly each time it's updated.
All standard Windows controls flicker if updated at frequent
intervals. The solution to this problem is to implement a simple
control and use an off-screen device context (DC) to construct the
image, which is then copied in total to the client area of the control
window. The net result is a control that can be updated without
causing any flicker.
Flicker has window procedures for two controls--one of these flickers;
the other one doesn't. The application creates an instance of each of
these controls and updates the window text ten times every second to
show how one flickers and the other doesn't. Both controls support the
system text color, window background color, and the WM_SETTEXT and
WM_SETFONT messages.
Flicker was built and tested under Microsoft Windows version 3.1 and
the Microsoft C/C++ version 7.0 compiler.
KEYWORDS: CD4
For Microsoft OnLine customers, FLICKER is available in the
Software/Data Library as 3X60.ZIP and can be found by searching on the
word FLICKER, the Q number of this article, or S14244. For CompuServe
Customers, FLICKER can be downloaded from the file 3-60.ZIP in library
section number 3 of the MSDNLIB forum. FLICKER was archived using the
PKware file-compression utility.

Additional reference words: 3.10
KBCategory:
KBSubcategory:
Copyright Microsoft Corporation 1993.