Example: String Display in Virtual Buffers

The Strings2 example is similar to Strings1, but it displays strings in the virtual buffer rather than in the client area. The only differences between the Strings1 and Strings2 programs lie in the WM_CREATE and WM_PAINT message handlers. In Strings1, which displayed the strings in the client area, the WM_PAINT handler displayed the strings each time we repainted the window. In Strings2, the WM_CREATE handler performs the string display, and the WM_PAINT handler just displays the virtual buffer contents. In addition, note how the WM_CREATE handler uses fg_fontdc() to direct strings to the virtual buffer.

C/C++ version

C++Builder version

Delphi version

Visual Basic version

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.