=============================================================================

****
**** The BACK sample can be downloaded from the
**** file 3-1.zip in library section number 3
****

BACK: Demonstrates Building a Large-Model Application with
a DLL

Revised: March 1, 1993

BACK is a companion application for "The C/C++ Compiler
Learns New Tricks" technical article on the Microsoft(R)
Developer Network CD. BACK lists command-line options and
environment variables. The program can be built for MS-
DOS(R) or for Windows(TM). The MKDOS.BAT batch file builds
the MS-DOS version, and MKWIN.BAT builds the Windows
version. The Windows version of BACK sends output to the
debug monitor.

BACK calls the TRACE.DLL. The program demonstrates the
following new programming practices for building protected-
mode Windows version 3.1 applications with Microsoft C/C++
version 7.0:

>  Using main instead of WinMain.

>  Using large model.

>  Using malloc (_fmalloc).

>  Using the run-time version of LibMain.

>  Using the run-time version of WEP.

>  Using a simpler make file.

>  Compiling and linking from the command line.

BACK was built and tested under Microsoft Windows 3.1.

KEYWORDS: PR-CD2; CD3 (revised)

=============================================================================

=============================================================================

****
**** The CALLB sample can be downloaded from the
**** file 3-2.zip in library section number 3
****

CALLB: Demonstrates Member Functions As Callbacks

CALLB demonstrates how to handle callbacks with C++ member
functions. It is a companion application for the technical
article, "Calling All Members: Member Functions as
Callbacks."

Microsoft(R) Windows(TM) version 3.1 has over 30 callback
functions that applications can use to enumerate objects,
hook into the hardware, and perform a variety of other
activities. The article explains why normal member
functions cannot be used as callback functions and gives
several techniques for handling callbacks. The article and
source code are targeted toward Microsoft C/C++ version
7.0, but the ideas presented apply to all C++ compilers,
including those by Borland and Zortech.

CALLB contains eight make files that create six
executables: MAKE1 creates CPROG1; MAKE2 generates a
compile-time error and does not create an executable;
MAKE3, MAKE4, MAKE5, and MAKE6 create CPROG3, CPROG4,
CPROG5, and CPROG6, respectively; and TMAKE creates
CTIMER. Please refer to "Calling All Members: Member
Functions as Callbacks" for more information.

NOTE:  Running CPROG1 generates a GP fault by design.

CALLB was built and tested under Microsoft Windows version
3.1.

KEYWORDS: PR-CD1; EnumObjects; EnumObjectsProc



=============================================================================

=============================================================================

****
**** The CLSEXP sample can be downloaded from the
**** file 3-3.zip in library section number 3
****

CLSEXP: Demonstrates C++ Class Export Syntax

CLSEXP is a companion application for the "Exporting with
Class" technical article on the Microsoft(R) Developer
Network CD. CLSEXP shows a working example of the class
export syntax in C++, but performs no other useful
function.

CLSEXP implements a simple set of classes spread across an
.EXE and two .DLL files. The program uses the Microsoft
Foundation Class TRACE macro to display messages on the
debug monitor. To see the messages, follow these steps:

1.  Run Windows(TM) in debug mode.

2.  Compile and run the Microsoft Foundation Class TRACER
sample application (included on the Microsoft Developer
Network CD). This application turns on the flags that
allow MFC TRACE messages to appear on the debug screen.

3.  Use the DBWIN application (included on the Microsoft
Developer Network CD) to send the TRACE messages to the
appropriate device (for example, to a monochrome monitor,
COM2, or window).

CLSEXP was built and tested under Microsoft Windows 3.1
and Microsoft C/C++ version 7.0.

KEYWORDS: PR-CD2; AfxWinTerm; __export; __far

=============================================================================

=============================================================================

****
**** The DYNATEST sample can be downloaded from the
**** file 3-40.zip in library section number 3
****

DynaTest: Shows How to Implement Dynamic Menus with
Microsoft Foundation Class Library 1.0

DynaTest is a companion application for the "Creating
Dynamic Menus with the Microsoft(R) Foundation Classes"
technical article on the Microsoft Developer Network CD.

DynaTest demonstrates how developers can use the Microsoft
Foundation Class version 1.0 library to implement
"dynamic" menus (menus that can be changed at run time).
The most common use of a dynamic menu is to customize an
application, for example, to provide menu items for
running specific macros or calling dynamic-link libraries
(DLLs).

DynaTest contains two new classes: CDynaMenuWnd and
CDynaMenu. A CDynaMenu object called aDynaMenu is embedded
in the CDynaMenuWnd class. Your application inherits from
CDynaMenuWnd instead of CFrameWnd. CDynaMenu is in charge
of maintaining the dynamic menus, adding menu items, and
associating functions with menu IDs.

DynaTest was built with Microsoft C/C++ version 7.0 and
MFC version 1.0. It was tested under Microsoft Windows(TM)
version 3.1.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The NEWOPR sample can be downloaded from the
**** file 3-4.zip in library section number 3
****

NEWOPR: Demonstrates the C++ new Operator in Large Model

NEWOPR is a simple application that demonstrates some of
the issues presented in the "Allocating Memory the
Newfangled Way: The new Operator" technical article on the
Microsoft(R) Developer Network CD.

NEWOPR tries to allocate 128 blocks of memory, 1024 bytes
per block. When NEWOPR is compiled as a medium-model
program, it cannot allocate 128 blocks because it runs out
of memory in the default data segment. In fact, the
Microsoft Foundation Class library raises an exception
when the new operator fails, and NEWOPR handles this
exception gracefully.

When NEWOPR is compiled as a large-model program, it can
allocate all 128 blocks because the memory is allocated
from the global heap instead of the local heap.

The best way to use NEWOPR is to compile it medium model,
run it, and examine the heap with Heap Walker. Run NMAKE
with the CLEAN option, and then compile large model. Run
the large-model version, and re-examine the heap with Heap
Walker.

The following parameters control how NEWOPR gets built:

>  DEBUG=[0|1]: Setting of 1 enables debugging
information.

>  LARGE=[0|1]: Setting of 1 compiles NEWOPR as a large-
model program.

>  MINST=[0|1]: Setting of 1 compiles with /Gt and /Gx
options to allow multiple instances. LARGE must be set to
1.

>  CLEAN: Deletes .EXE, .RES, and .OBJ files.

Sample NMAKE command lines are shown below:

>  nmake:  Makes medium-model version.

>  nmake DEBUG=1:  Makes medium-model debug version.

>  nmake LARGE=1:  Makes large-model version.

>  nmake MINST=1:  Makes medium-model version. MINST is
ignored.

>  nmake LARGE=1 MINST=1:  Makes multi-instance, large-
model version. MFC large-model library must be compiled
with /Gx and /Gt for this to work.

>  nmake DEBUG=1 LARGE=1 MINST=1:  Same as above, but
enables debugging.

NewOpr was built and tested under Microsoft(R) Windows(TM)
version 3.1.

KEYWORDS: PR-CD2; LoadAccelTable; new operator

=============================================================================

=============================================================================

****
**** The NUMEDIT sample can be downloaded from the
**** file 3-41.zip in library section number 3
****

NUMEDIT: Subclasses a Control Created by CWnd::Create or
CWnd::CreateEx

NUMEDIT is one of three sample applications (NUMEDIT,
NUMTEST2, and NUMTEST3) that show how to use the
Microsoft(R) Foundation classes to subclass an edit
control in a dialog box.

Subclassing allows you to customize a window (or control)
without re-implementing it. The subclassing method you use
depends on how the window (or control) was created:

>  by CWnd::Create or CWnd::CreateEx
>  by ::CreateWindow or ::CreateWindowEx
>  by WNDCLASS name with ::CreateWindow or
::CreateWindowEx

NUMEDIT demonstrates subclassing for the first method,
when the window or control is created using CWnd::Create
or CWnd::CreateEx. In this case, subclassing is automatic.

NUMEDIT is a companion sample for the "Subclassing Windows
Using the Microsoft Foundation Class Library" technical
article on the Microsoft Developer Network CD.

NUMEDIT was built with Microsoft C/C++ version 7.0 and the
Microsoft Foundation Class Library version 1.0. The sample
application was tested under Microsoft Windows version
3.1.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The NUMTEST2 sample can be downloaded from the
**** file 3-42.zip in library section number 3
****

NUMTEST2: Subclasses a Control Created by ::CreateWindow
or ::CreateWindowEx

NUMTEST2 is one of three sample applications (NUMEDIT,
NUMTEST2, and NUMTEST3) that show how to use the
Microsoft(R) Foundation classes to subclass an edit
control in a dialog box.

Subclassing allows you to customize a window (or control)
without re-implementing it. The subclassing method you use
depends on how the window (or control) was created:

>  by CWnd::Create or CWnd::CreateEx
>  by ::CreateWindow or ::CreateWindowEx
>  by WNDCLASS name with ::CreateWindow or
::CreateWindowEx

NUMTEST2 demonstrates subclassing for the second method,
when the window or control is created using ::CreateWindow
or ::CreateWindowEx. In this case, the window or control
can be subclassed using the CWnd::SubclassWindow and
CWnd::SubclassDlgItem functions.

NUMTEST2 is a companion sample for the "Subclassing
Windows Using the Microsoft Foundation Class Library"
technical article on the Microsoft Developer Network CD.

NUMTEST2 was built with Microsoft C/C++ version 7.0 and
the Microsoft Foundation Class Library version 1.0. The
sample application was tested under Microsoft Windows
version 3.1.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The NUMTEST3 sample can be downloaded from the
**** file 3-43.zip in library section number 3
****

NUMTEST3: Subclasses a Control Created by WNDCLASS Name

NUMTEST3 is one of three sample applications (NUMEDIT,
NUMTEST2, and NUMTEST3) that show how to use the
Microsoft(R) Foundation classes to subclass an edit
control in a dialog box.

Subclassing allows you to customize a window (or control)
without re-implementing it. The subclassing method you use
depends on how the window (or control) was created:

>  by CWnd::Create or CWnd::CreateEx
>  by ::CreateWindow or ::CreateWindowEx
>  by WNDCLASS name with ::CreateWindow or
::CreateWindowEx

NUMTEST3 demonstrates subclassing for the third method,
when the window or control is created by WNDCLASS name
with ::CreateWindow or ::CreateWindowEx.

NUMTEST3 is a companion sample for the "Subclassing
Windows Using the Microsoft Foundation Class Library"
technical article on the Microsoft Developer Network CD.

NUMTEST3 was built with Microsoft C/C++ version 7.0 and
the Microsoft Foundation Class Library version 1.0. The
sample application was tested under Microsoft Windows
version 3.1.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The OWNER sample can be downloaded from the
**** file 3-5.zip in library section number 3
****

OWNER: Demonstrates the C++ new Operator in a DLL

The OWNER application and its dynamic-link library
(OWNERDLL.DLL) explore memory ownership issues and
demonstrate the use of the new operator.

OWNER is a companion application for the "Allocating
Memory the Newfangled Way: The new Operator" technical
article on the Microsoft Developer Network CD.

OWNER was built and tested under Microsoft(R) Windows(TM)
version 3.1.

KEYWORDS: PR-CD2; new operator; delete operator

=============================================================================

=============================================================================

****
**** The SMART sample can be downloaded from the
**** file 3-6.zip in library section number 3
****

SMART ALLOC: Demonstrates _fmalloc and Microsoft(R)
Windows(TM)

Smart Alloc allows programmers to experiment using the
_fmalloc function in the Microsoft(R) Windows(TM)
operating system. It is a companion program for the
technical article "Allocating Memory the Old Fashioned
Way: _fmalloc and Applications for Windows."

With Smart Alloc and Heap Walker, programmers can
interactively explore the behavior of  _fmalloc, _ffree,
GlobalAlloc, GlobalFree, and _heapmin. They can allocate
memory either using GlobalAlloc or _fmalloc, or from a
DLL. They can determine when and how memory is allocated
easily, without recompiling.

The source code for Smart Alloc also demonstrates some
interesting features. Smart Alloc is a multiple-instance,
large-model application when compiled with Microsoft C/C++
version 7.0.  Another interesting feature of Smart Alloc
is that it includes a dynamic link library (DLL) that
intercepts all calls SMART.EXE makes to GlobalAlloc,
GlobalReAlloc, and GlobalFree.

Smart Alloc was built with Microsoft C/C++ version 7.0 and
tested under Microsoft Windows version 3.1.

KEYWORDS: PR-CD1; GlobalAlloc; GlobalFree; GlobalReAlloc;
GlobalAllocPtr; GlobalFreePtr; malloc; free; _fmalloc;
_heapmin; _ffree; large model; DLL;

=============================================================================

=============================================================================

****
**** The STREAMER sample can be downloaded from the
**** file 3-44.zip in library section number 3
****

Streamer: Demonstrates How to Use C++ and Microsoft
Foundation Class Library 1.0 in a DLL

Streamer is a companion application for the "Windows
Streams" technical article on the Microsoft(R) Developer
Network CD.

Streamer demonstrates how to use C++ and Microsoft
Foundation Classes in a dynamic-link library (DLL), how to
export C interfaces to a DLL, and how to wrap C interfaces
with C++ in an application. The sample application
includes the wstreambuf class, which inherits from the
streambuf class and provides the minimum code necessary
for iostream reading and writing to a window.

Streamer consists of an application and a DLL. The
application has two main components:

>  The CMainWindow class that does the work for the
application.

>  The wstreambuf class that implements the streambuf
interface. wstreambuf is a C++ wrapper to the C interface
exported from the DLL.

The DLL has three main components:

>  The COutputWindow class that reads data from, and
writes data to, a window.

>  The exported C interface through which the wstreambuf
class communicates with the DLL.

>  The COwinDLL class that derives from CWinApp and
manages the DLL.

Streamer was built with Microsoft C/C++ version 7.0 and
MFC version 1.0. It was tested under Microsoft Windows(TM)
version 3.1.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The ZUSAMMEN sample can be downloaded from the
**** file 3-7.zip in library section number 3
****

ZUSAMMEN: Illustrates the Use of the Microsoft(R) C
Compiler Options with Microsoft Windows(TM)

Zusammen, which means "together" in German, scrolls two
different windows simultaneously. To scroll, the user
selects the windows with the mouse and clicks Zusammen's
scroll bars. This makes it easy to compare data in two
different windows or applications.

Zusammen consists of a program generated by MAKEAPP (see
the MAKEAPP abstract) and a dynamic link library (DLL)
called Picker that selects the windows to be scrolled.

For more information on ZUSAMMEN, see the "Microsoft(R)
Windows(TM) and the C Compiler Options" technical article.

ZUSAMMEN was built and tested under Microsoft Windows
version 3.1.

KEYWORDS: PR-CD1; LocalAlloc; LocalFree; SetScrollRange;
SetScrollPos

=============================================================================

=============================================================================

****
**** The APPEXEC sample can be downloaded from the
**** file 3-8.zip in library section number 3
****

AppExec: Launches Windows(TM)-based Applications

AppExec demonstrates a technique for launching other
Microsoft(R) Windows-based applications. It implements a
method for browsing and tracking applications that are not
on the current Windows search path. AppExec does not
terminate until all launched applications have terminated.

AppExec is a companion sample for the "Launching Other
Windows-based Applications" technical article on the
Microsoft Developer Network CD.

AppExec was built and tested under Microsoft Windows
version 3.1.

KEYWORDS: PR-CD2; SetWindowLong; GetWindowLong;
CallWindowProc; GetProfileString; WriteProfileString;
GetOpenFileName; _splitpath; _makepath

=============================================================================

=============================================================================

****
**** The DDEEXEC sample can be downloaded from the
**** file 3-45.zip in library section number 3
****

DDEExec: DDE Execute Command Server

DDEExec is a dynamic data exchange (DDE) server that
supports an Execute command set. The commands allow DDE
client applications to draw pictures in the main window of
the server. The following sample client applications use
the DDEExec server and are included with this application:

>  EXEC is a Visual Basic(TM) version 2.0 application that
allows any Execute command to be sent to a given topic of
a DDE server. This sample client application tests the
basic command set of a DDE server and ensures that the
server reports command errors correctly.

>  BUNNY is a Visual Basic 2.0 application that uses the
server to draw a picture of a bunny rabbit.

>  WBUNNY.DOC is a Word for Windows(TM) document based on
the WBUNNY.DOT template that uses Word's embedded Basic
language to draw yet another bunny picture.

>  XLART.XLM is a sample Microsoft Excel macro sheet that
shows how you can use Microsoft Excel as a DDE client to
draw fascinatingly complex pictures.

DDEExec was built and tested under Microsoft Windows
version 3.1.

KEYWORDS: PR-CD2; DdeInitialize; DdeUninitialize;
DdeCreateStringHandle; DdeFreeStringHandle;
DdeNameService; DdeCmpStringHandles; DdeAddData;
DdeCreateDataHandle; ExtTextOut

=============================================================================

=============================================================================

****
**** The DDERECON sample can be downloaded from the
**** file 3-10.zip in library section number 3
****

DDERecon: DDE Client Demonstrating Hot Links

DDERecon demonstrates a technique for browsing dynamic
data exchange (DDE) servers. This technique may be used in
a dialog box to establish a hot link. A hot link is a
direct data feed from one application (a DDE server) to
another (a DDE client). The program also shows how to re-
establish a hot link when an application is restarted.

DDERecon uses System topic information to populate lists
in a dialog box. These lists are used to browse available
DDE servers and establish DDE links with them. DDERecon is
a companion application for the "DDE Hot Links" technical
article on the Microsoft(R) Developer Network CD. The
program is used with the StockSrv server to demonstrate
hot links.

DDERecon was built and tested under Microsoft Windows(TM)
version 3.1.

KEYWORDS: PR-CD2; DataConnect; DdeClientTransaction;
SetWindowPos; WinExec; HWND_TOPMOST

=============================================================================

=============================================================================

****
**** The DDESERV sample can be downloaded from the
**** file 3-11.zip in library section number 3
****

DDEServ: Quick and Easy DDE Server

DDEServ shows how you can easily create a dynamic data
exchange (DDE) server that supports the System topic and
an Execute command set. You can build the server by using
the STDDDE.C module included in the sample.

DDEServ was built and tested under Microsoft(R)
Windows(TM) version 3.1.

KEYWORDS: PR-CD2

=============================================================================

=============================================================================

****
**** The PMGRPAPI sample can be downloaded from the
**** file 3-12.zip in library section number 3
****

PMGRPAPI: DDE Command String Interface to Program Manager

The PMGRPAPI demonstrates dynamic data exchange (DDE) in a
dynamic-link library (DLL). It functions as a DDE client
application to interface with the Microsoft(R) Windows(TM)
Program Manager. The Program Manager supports a set of
commands that it receives through the DDE Execute
protocol. For a list of commands, see the Windows version
3.1 Software Development Kit (SDK) "Programmers Reference,
Volume 1: Overview," Part 3, Chapter 17, on the Microsoft
Developer Network CD.

PMGRPAPI was written specifically to interface with the
Windows Program Manager, but also works with the Norton
Desktop, which responds to the same set of DDE Execute
commands.

PMGRPAPI is a companion sample for the "Performing DDE
from a Dynamic-Link Library" technical article on the
Microsoft Developer Network CD.

PMGRPAPI was built and tested under Microsoft Windows 3.1.

KEYWORDS: PR-CD2; DdeConnect; DdeClientTransaction;
DdeCreateDataHandle; DdeCreateStringHandle; DdeDisconnect;
DdeFreeStringHandle; DdeInitialize; DdeUninitialize

=============================================================================

=============================================================================

****
**** The STOCKSRV sample can be downloaded from the
**** file 3-13.zip in library section number 3
****

StockSrv: Demonstrates Hot Links Using DDE

StockSrv simulates a stock market price monitor. It
simulates data arriving at a communications port and
extracts share price information for a given list of
stocks. The application has a display window that shows
the prices as they change in real time.

StockSrv demonstrates several techniques in its
implementation of the price monitor:

>  Support for the System topic. StockSrv is a dynamic
data exchange (DDE) server application that implements
support for the System topic. It includes a code module
that illustrates the guidelines provided in the
"Supporting the DDE System Topic" technical article on the
Microsoft(R) Developer Network CD. You can get most of the
system support for your own application by simply
including the source code module from StockSrv.

>  Hot links. DDE provides a protocol through which
applications can exchange all kinds of data. DDE allows
applications to form "hot links" with DDE servers and
obtain data in real time. A hot link is a direct data feed
from one application (a DDE server) to another (a DDE
client). As the data changes at the server, the new
information is sent to the client for processing.

>  Sharing data with Microsoft Excel. StockSrv also
demonstrates how a server application can share data with
Microsoft Excel version 4.0. STOCK.XLW is a Microsoft
Excel workbook that establishes a hot link with StockSrv.
See the "Supporting the Clipboard, DDE, and OLE in
Applications" technical article on the Microsoft Developer
Network CD for more information.

StockSrv was built and tested under Microsoft Windows(TM)
version 3.1. STOCK.XLW was built and tested under
Microsoft Excel version 4.0.

KEYWORDS: PR-CD2; DdeAddData; DdeCmpStringHandles;
DdeCreateDataHandle; DdeCreateStringHandle;
DdeFreeStringHandle; DdeInitialize; DdeNameService;
DdeUninitialize; GlobalAlloc; GlobalFree; GlobalLock;
GlobalUnlock

=============================================================================

=============================================================================

****
**** The FONTUTIL sample can be downloaded from the
**** file 3-38.zip in library section number 3
****

FONTUTIL: Font-Handling Routines

FONTUTIL contains useful font-handling routines that make
it easier for an application to create and manipulate
fonts in Microsoft(R) Windows(TM) by taking care of most
of the tedious work.

The font utilities are primarily for applications that
need the relatively simplistic font model presented in the
ChooseFont common dialog box. ChooseFont deals with fonts
using four primary variables: typeface name, typeface
style, point size, and effects. ChooseFont also allows for
color selection, but the font-handling functions do not
currently support this feature.

The font-handling functions allow an application to create
and interrogate fonts in a manner that is consistent with
the ChooseFont model. For example, you can create a font
by using the ReallyCreateFont function and specifying the
typeface name, typeface style, and point size; you can
retrieve the typeface style of a font by using the
GetTextStyle function; and so on.

The font utility functions support Microsoft Windows
versions 3.0 and 3.1, and Windows NT(TM) version 3.1. You
can include the functions either in an application or in a
dynamic-link library (DLL).

FONTUTIL is a companion sample application for the "Font
Utilities--Some Handy-Dandy Font-Handling Functions"
technical article on the Microsoft Developer Network CD.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The GLYPH sample can be downloaded from the
**** file 3-14.zip in library section number 3
****

GLYPH: Demonstrates TrueType(R) Font Engine Using
GetGlyphOutline

GLYPH is a companion application for the technical article
"Advanced TrueType: GetGlyphOutline." The program uses the
GetGlyphOutline function to illustrate the basic concepts
and mechanisms of the TrueType(R) font engine.

The Microsoft(R) Windows(TM) Software Development Kit
(SDK) contains information on GetGlyphOutline and the
TrueType engine.

GLYPH was built and tested under Microsoft Windows version
3.1.

KEYWORDS: PR-CD1; GGO_BITMAP; GGO_NATIVE; rotating;
scaling; shearing; transformation matrix

=============================================================================

=============================================================================

****
**** The LAVA sample can be downloaded from the
**** file 3-15.zip in library section number 3
****

Lava: Demonstrates Palette Animation and Pop-up Menus

Lava simulates a lava flow by using animation.

Click the main program window to open a menu. If you
double-click the title bar, the client area and title bar
will take up the entire screen. This allows you to create
a full-screen image.

You can copy the image to the Clipboard, paste it into
Microsoft(R) Paintbrush(TM), and save it as a device-
independent bitmap (DIB). You can then load the image
(from Control Panel) as a desktop image. The palette
animation of the image continues (even on the desktop)
while the program is running. You can iconize the
application and keep the palette animation going.

MyPal is an interesting program to run during palette
animation; it displays the current physical palette from
Windows(TM).

The 64-bit square-root code is 80386-specific.Lava needs a
display driver that supports palettes in order to run.

KEYWORDS: PR-CD2; CreatePalette; SelectPalette;
RealizePalette; CreateSolidBrush; WinAssert; SetTimer;
BitBlt; CreateCompatibleDC; InvalidateRect; CyclePalette;
SetClipboardData; CloseClipboard; SetPaletteEntries;
PatBlt; SetDIBits; AnimatePalette; CreateBitmap

=============================================================================

=============================================================================

****
**** The MERGEDIB sample can be downloaded from the
**** file 3-16.zip in library section number 3
****

MergeDIB: Merges a Primary DIB with a Secondary DIB

MergeDIB merges a primary device-independent bitmap (DIB)
(with any palette) and a secondary DIB (with a different
palette) into a single DIB (with a special palette).

The special DIB and palette combine the two images and
palettes so that when the palette is gradually cross-faded
(animated), the first and second DIB are partially
displayed. At complete fadeout, only one bitmap is
visible; at a 50-50 mix, both bitmaps are equally visible
(merged). Pixels are not dithered between the images, but
are mixed in the palettes.

In MergeDIB, the two DIBs must be the same size. You can
eliminate this limitation easily by using the DIB driver:
Create an artificial bitmap in the desired size with a
blank background (where "blank" is a chosen color), and
center or otherwise place the smaller image in the
background.

KEYWORDS: PR-CD2; CreatePalette; SelectPalette;
RealizePalette; GetDeviceCaps; GetSystemPaletteUse;
GetSystemPaletteEntries; GetStockObject;
CreateCompatibleDC; GetDIBits; PaletteSize; CreateBitmap;
CreateDIBitmap; CreateDibPalette; GetNearestPaletteIndex;
GetPaletteEntries; SetPaletteEntries; StretchBlt; BitBlt;
StretchDIBits; PatBlt; SetDIBitsToDevice

=============================================================================

=============================================================================

****
**** The MULTIPAL sample can be downloaded from the
**** file 3-17.zip in library section number 3
****

MULTIPAL: Uses Multiple Palettes in a Single Application

MULTIPAL is a companion application for the technical
article, "Palette Awareness." The program supports
multiple palettes by selecting a dominant palette and
prioritizing the other palettes in the background. The
program prioritizes palettes when it handles and sends
palette messages.

MULTIPAL is a multiple document interface (MDI) extension
to the DIBIT sample program that accompanies the "Using
DIBs with Palettes" technical article. MULTIPAL allows you
to display multiple DIBs with multiple palettes and
handles palette messaging from both the system perspective
and the application perspective. The MDI skeleton is taken
from the BLANDMDI program that is included in the
Microsoft(R) Windows(TM) version 3.1 Software Development
Kit (SDK). MULTIPAL achieves device independence by using
palettes at all times, regardless of the type of device
being used.

To see the application in action, open several color-
intensive 8-bit device-independent bitmaps (DIBs) at the
same time and change the active DIB window. To see the
application's interaction with the rest of the system, run
another application that uses palettes (another instance
of MULTIPAL will do).

MULTIPAL was built and tested under Microsoft Windows
version 3.1.

KEYWORDS: PR-CD1; SelectPalette; RealizePalette;
StretchDIBits; DIB



=============================================================================

=============================================================================

****
**** The TRANSBLT sample can be downloaded from the
**** file 3-18.zip in library section number 3
****

TRANSBLT: Demonstrates Bitmaps with Transparency

TRANSBLT performs transparency and masking effects on
bitmaps. It is a companion application for the technical
article, "Bitmaps with Transparency."

TRANSBLT was built and tested under Microsoft(R)
Windows(TM) version 3.1.

KEYWORDS: PR-CD1; SetTextColor; SetBkColor; GetDeviceCaps;
BitBlt; SRCCOPY; SRCAND; SRCINVERT; SRCPAINT; mask;
opaque; pixels; ROP; raster operation; boolean

=============================================================================

=============================================================================

****
**** The TRI sample can be downloaded from the
**** file 3-19.zip in library section number 3
****

TRI: Draws Triangles Using DIB or PatBlt

TRI draws triangles directly into device-independent
bitmap (DIB) memory or to the screen. When drawing to DIB
memory, it uses the DIB driver. When drawing to the
screen, it uses the graphics device interface (GDI) or
PatBlt, allowing you to time the difference through a menu
option. You can choose solid colors and/or null pen colors
for the triangles.

TRI includes 80286- or 80386-specific assembly-language
code to optimize drawing. TRI also uses custom resources.

TRI was built and tested under Microsoft(R) Windows(TM)
version 3.1.

KEYWORDS: PR-CD2; CreatePalette; SelectPalette;
RealizePalette; GetSystemPaletteUse; GetDeviceCaps;
GetSystemPaletteEntries; CreateCompatibleDC; GetDIBits;
CreateBitmap; CreateDIBitmap; GetPaletteEntries;
SetPaletteEntries; StretchBlt; BitBlt; StretchDIBits

=============================================================================

=============================================================================

****
**** The TRIQ sample can be downloaded from the
**** file 3-20.zip in library section number 3
****

TRIQ: Draws Directly to DIB Memory or Screen

TRIQ draws triangles or boxes directly into device-
independent bitmap (DIB) memory or directly to the screen.
It draws through the graphics device interface (GDI) or
through PatBlt, allowing timing of the difference through
a menu option. The DIB driver is used when drawing to DIB
memory. A color menu option for the triangles or boxes
includes solid colors and/or null pen colors.

Assembler source code is included to optimize drawing by
using 80286 or 80386 specific code. TRIQ also uses custom
resources.

TRIQ was built and tested under Microsoft(R) Windows(TM)
version 3.1.

KEYWORDS: PR-CD1; CreateDIBitmap; CreatePalette;
GetDIBits; LocalAlloc; LocalFree; SelectPalette; Device
Independent Bitmap (DIB)

=============================================================================

=============================================================================

****
**** The VDRIVERS sample can be downloaded from the
**** file 3-39.zip in library section number 3
****

VDRIVERS: Source Modules and Tools for Developing Video
Drivers

The VDRIVERS directory contains the following source
modules and tools for developing video drivers:

>  The DDTEST tool measures the frame rate that can be
achieved on your current driver.

>  The V7VGA driver code includes a module called
BBLT.ASM, which contains the basic BitBlt code. This
module invokes different pieces of code for different Blt
requirements. The code is well commented and worth looking
at.

>  The STRETCH.ASM module from the V7VGA driver sources
shows an example of 80386-specific coding.

>  RLD.ASM contains the routines for drawing RLE directly
to the screen or to a bitmap. This code attempts to
optimize the very common case where no clipping at all is
required by using special output functions for clipped and
non-clipped output. The palette translation table passed
down by the graphics device interface (GDI) is also
checked for the identity map; if found, this is also
optimized.

>  DISCREEN.ASM draws a device-independent bitmap (DIB)
directly to the display. This module contains the routines
for drawing a 1/4/8/24-bit uncompressed DIB directly to
the screen. It also supports OPAQUE or TRANSPARENT mode.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The CODEPEND sample can be downloaded from the
**** file 3-46.zip in library section number 3
****

CODEPEND: Mechanics of Dynamic Linking

CODEPEND illustrates dependencies between dynamic-link
libraries (DLLs), load and termination sequencing, module
usage counts, and application-vs.-DLL instance handles.

CODEPEND is a companion sample for the "Mechanics of
Dynamic Linking" technical article on the Microsoft(R)
Developer Network CD.

CODEPEND was built and tested under Microsoft Windows(TM)
version 3.1  and Microsoft C/C++ version 7.0.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The COUNTDOS sample can be downloaded from the
**** file 3-21.zip in library section number 3
****

CountDOS and SetFocus: Windows(TM) 3.1 TSR Samples

CountDOS and SetFocus demonstrate the support for
terminate-and-stay-resident (TSR) programs in Microsoft(R)
Windows version 3.1, as described in the "TSR Support in
Microsoft Windows Version 3.1" technical article on the
Microsoft Developer Network CD.

CountDOS is both a Windows-based application and a TSR.
The MS-DOS(R) entry point contains a Windows-aware TSR
that counts MS-DOS function calls, provides file deletion
confirmation, and launches a Windows-based application
when Windows starts up. The New Executable entry point
contains the Windows-based application that the TSR will
launch. Thus, CountDOS launches itself (in a Windows sort
of way).

Run COUNTDOS.EXE from MS-DOS before starting enhanced-mode
Windows. The program accepts the following command-line
parameters:

>  /r:  Resets internal statistics on how many MS-DOS
calls have been issued.

>  /d:  Enables/disables file deletion confirmation.

>  /u:  Uninstalls the TSR (if possible).

SetFocus is an MS-DOS application that uses the Windows
Interrupt 2Fh interface to set the focus to a specified
virtual machine (VM). To run SetFocus, type "setfocus x"
(where x is a decimal number) from an MS-DOS command
prompt inside Windows 3.1 enhanced mode, This command
switches the focus to virtual machine x.

CountDOS and SetFocus were built and tested under
Microsoft Windows version 3.1 enhanced mode.

KEYWORDS: PR-CD2; INT2FAPI; TSR_Exec_Cmd

=============================================================================

=============================================================================

****
**** The PPDEBUG sample can be downloaded from the
**** file 3-47.zip in library section number 3
****

PPDEBUG: Sets and Clears the Bits on the Printer Port

PPDEBUG.ASM is an assembly language code module that
provides C-callable services to set and clear the bits on
the printer port.

PPDBG.INC is an assembly language include file that
provides macros to assembly language code modules.

These modules demonstrate the concepts discussed in the
"Use Your Printer Port to Measure System Timings"
technical article on the Microsoft(R) Developer Network
CD.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The WINFLOAT sample can be downloaded from the
**** file 3-22.zip in library section number 3
****

WinFloat: Floating-Point Samples for Windows(TM)

WinFloat consists of five programs and libraries that
provide sample code and tools to explore the floating-
point mechanisms of Microsoft(R) Windows:

>  FLOATAPP.EXE:  Windows-based application used as a
shell for testing application and dynamic-link library
(DLL) floating-point issues. This application tests
floating-point speed, generates exceptions, installs
signal handler, masks and unmasks exceptions, and
communicates with WIN87EM.DLL. Some capabilities depend on
the math package chosen and/or the presence of a math
coprocessor.

>  FLOATDLL.DLL: Floating-point Windows DLL. FLOATDLL is a
subset of FLOATAPP, to which it dynamically links.
FLOATDLL can generate and handle floating-point
exceptions, and can be configured to install and maintain
its own signal handler or use the default (or application)
handler.

>  FLOATDOS.EXE:  Floating-point MS-DOS(R) application.
FLOATDOS is a subset of FLOATAPP that runs outside of
Windows (or in a "DOS box"), thus allowing you to compare
an MS-DOS application with a Windows-based application for
exception handling and (most importantly) calculation
speed.

>  HIDE87.COM:  MS-DOS terminate-and-stay-resident (TSR)
program that hides the 80x87 from Windows-based
applications. HIDE87 must be installed before you start
Windows so you can trick Windows into thinking there's no
math coprocessor.

>  SHOW87.EXE:  MS-DOS control program that disables the
HIDE87 TSR. SHOW87 provides a way to turn off HIDE87
without rebooting the machine. As with HIDE87, SHOW87 must
be executed before you start Windows so it can detect the
math coprocessor.

See the sample code and the "Floating Point in Windows"
technical article for descriptions of these programs,
their coding techniques, and the Windows floating point
architecture. For information on building these programs
and discussions of C version 6.0 versus C/C++ version 7.0
and emulator versus alternate math packages, see the make
file. Note that these sample have major limitations if
compiled with C 6.0.

WINFLOAT was built and tested under Microsoft Windows
version 3.1 using Microsoft Macro Assembler version 6.0
and Microsoft C/C++ version 7.0.

KEYWORDS: PR-CD2; floating point; speed; performance;
exception; signal handler; mask; interrupts; dll; tsr;
coprocessor; math; emulator; altmath; alternate math;
WIN87EM.DLL; WIN87EM.LIB; signal; setjmp; longjmp;
_fpreset; _FPInit; _FPTerm; GetWinFlags; WF_80x87; _fpmath

=============================================================================

=============================================================================

****
**** The CSETUP sample can be downloaded from the
**** file 3-48.zip in library section number 3
****

CSETUP: Creates a Custom Setup Application

The CSETUP application includes everything you need to
create a dynamic-link library (DLL) for your custom dialog
boxes and a setup application. The make file builds the
dialog-box DLL first, then builds the setup application.
The sample runs as-is, creates a directory called BOGUS,
and copies text files to it. It then creates a group in
Program Manager and installs two items within the group.

CSETUP is a companion sample application for the "Writing
a Setup Application for Windows in C" technical article on
the Microsoft(R) Developer Network CD.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The DIGITALV sample can be downloaded from the
**** file 3-49.zip in library section number 3
****

DIGITALV: Digital Video Command Set for MCI

The DIGITALV directory contains three files:

>  DIGITALV.RC: Table definition for the media control
interface (MCI) digital video command set.

>  DIGITALV.H: Include file for the MCI digital video
command set.

>  DIGITALV.MCI: Media control interface file.

These files accompany the "Digital Video Command Set for
the Media Control Interface" specification included on the
Microsoft(R) Developer Network CD. The specification
discusses the standard for the digital video device class
for MCI (DV MCI), and applies to hardware and software
manufacturers of digital video products as well as to
independent software vendors (ISVs) who create
applications using digital video products. The
specification was developed in collaboration with original
equipment manufacturers (OEMs) to ensure that it reflects
the inherent characteristics of digital video hardware.
The specification is not limited to a single
manufacturer's hardware; it is expected to be applicable
to a wide range of hardware implementations.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The DSTOOLKI sample can be downloaded from the
**** file 3-50.zip in library section number 3
****

DSTOOLKI: Illustrates DoubleSpace CVF Format and Functions

The DSTOOLKI directory contains source code that
illustrates the DoubleSpace compressed volume file (CVF)
format and DoubleSpace functions.

The sample source files below accompany the "DoubleSpace
Compressed Volume File Overview" and "DoubleSpace System
API Specification" on the Microsoft(R) Developer Network
CD.

>  CVF.H: Define statements for CVF.

>  DRVINFO.C: Functions to identify drives in a
DoubleSpace system.

>  DRVINFO.H: Header for DRVINFO.C.

>  IOCTL.ASM: Functions to flush and flush/invalidate
DoubleSpace cache.

>  MAIN.C: DSDUMP.EXE sources; shows details of CVF
format.

>  MAKEFILE: Make file for DSDUMP.EXE.

>  TEST.C: Test for IsDoubleSpaceDrive function in
DRVINFO.C and DRVINFO.H.

The sample code was built with Microsoft C version 6.00A
and Microsoft Macro Assembler (MASM) version 5.10A.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The W16APP sample can be downloaded from the
**** file 3-51.zip in library section number 3
****

W16APP: Demonstrates Generic 16-Bit Application for
Windows

W16APP is a sample 16-bit application for Microsoft(R)
Windows(TM) that provides the following basic
capabilities: File New, File Open, File Save, and File
Save As; basic Clipboard support; simple printing and
print setup; About box; and Help file.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The DETECT sample can be downloaded from the
**** file 3-23.zip in library section number 3
****

Detect: Detects Multimedia Extensions

Detect is a Windows(TM) with Multimedia program that shows
how to write an application that can detect the presence
of multimedia extensions. The code that actually detects
the extensions resides in MMSYS.LIB. Refer to the MMSYS
sample for additional information.

KEYWORDS: PR-CD2; mmsystemGetVersion; MessageBeep;
FindResource; LoadResource; LockResource; UnlockResource;
FreeResource

=============================================================================

=============================================================================

****
**** The ISCDROM sample can be downloaded from the
**** file 3-52.zip in library section number 3
****

ISCDROM: Demonstrates Testing if Drive is CD-ROM

ISCDROM is an assembly code fragment which demonstrates
how to determine if a drive is a CD-ROM drive.

ISCDROM is a companion source code fragment to the
technical article, "CD-ROM Design and Optimization."
Please reference this article for more information.

KEYWORDS: CD3;

=============================================================================

=============================================================================

****
**** The JOYTOY sample can be downloaded from the
**** file 3-24.zip in library section number 3
****

JoyToy: Demonstrates Use of Joystick Services

JoyToy is a Windows(TM) with Multimedia application that
illustrates how to use the joystick services. When you run
JoyToy, it displays a cross-hair cursor. When you move the
joystick or the mouse, the cursor follows. When you press
a joystick button, JoyToy produces a sound and draws a
bullet-hole icon on the screen.

KEYWORDS: PR-CD2; GetCursorPos; SetCursorPos; DrawIcon;
MessageBeep; joySetCapture; joyReleaseCapture;
joyGetNumDevs; GetSystemMetrics; sndPlaySound

=============================================================================

=============================================================================

****
**** The MMPF sample can be downloaded from the
**** file 3-25.zip in library section number 3
****

MMPF: Reads Multimedia Movie Player (MMP) Files

MMPF analyzes the MMP file format to supplement the
existing documentation on MMP.

KEYWORDS: PR-CD2; GlobalAlloc; GlobalFree; GetDlgItem;
SetDlgItemText

=============================================================================

=============================================================================

****
**** The MMPLAY sample can be downloaded from the
**** file 3-26.zip in library section number 3
****

MMPlay: Demonstrates Multimedia Movie Player (MMP)

Revised: March 11, 1993

MMPlay is an application that uses Windows(TM) with
Multimedia. It illustrates how to use the Multimedia Movie
Player (MMP). MMPlay calls the MMP.DLL from the Multimedia
Development Kit. You can use MMPlay to play any movie
file. MMPlay shows how to:

>  Load and play a movie.

>  Manage the stage window.

>  Use single-step animation.

>  Use a frame-callback function to monitor script-channel
text to recognize break, goto, loop, and close commands.
The frame-callback source code is in the FRAMEHK.C
module.

The movie file included with this project, SAMPLE.MMM,
contains custom script commands that MMPlay recognizes.

MMPlay was built and tested under Microsoft Windows
version 3.1.

KEYWORDS: PR-CD2; CD3 (revised); OemToAnsi; RemoveProp;
GetProp; SetProp; AnsiLower; GetAsyncKeyState;
mmpGoToFrame; mmpAnimate; mmStopAnimating; SetMenuStates;
mmpOpen; showMMPError; mmpSetMute; mmpSetRepeat; mmSetDC;
mmpFrameCallback; mmUpdate; mmpClose; mmpFreeFile;
mmpGetCurFrame; mmpError; mmpGetMovieInfo;
mmpGetPaletteHandle; EmptyClipboard; SetClipboardData;
CloseClipboard; CreatePalette; GetPrivateProfileString

=============================================================================

=============================================================================

****
**** The MMSYS sample can be downloaded from the
**** file 3-27.zip in library section number 3
****

MMSYS: Demonstrates Multimedia Functions Without Using
Drivers

MMSYS creates a library that lets you use multimedia
functions without requiring drivers. This method of run-
time linking is portable and very useful.

You can build an application that is aware of the
multimedia functions in Microsoft(R) Windows(TM). This
application will run with full functionality in Windows
with Multimedia and can use its own functions instead of
essential multimedia functions in a standard Windows
environment. The MMIO functions in the code files are
"emulated" or "stubbed" to replace the MMIO functions from
MMSYSTEM.DLL. This allows an application to do resource
interchange file format (RIFF) file I/O seamlessly in a
standard Windows or Windows with Multimedia environment.

For more information, please see the README.TXT file.

KEYWORDS: PR-CD2; mmioRead; mmioSeek; mmioWrite

=============================================================================

=============================================================================

****
**** The SINGACD sample can be downloaded from the
**** file 3-53.zip in library section number 3
****

SINGACD: Uses MCI to Synchronize a Windows-based
Application with CD Audio

The SINGACD sample application shows how to use the media
control interface (MCI) to synchronize an application with
CD audio in Microsoft(R) Windows(TM).

SINGACD displays a moving ball above the lyrics of a song.
The ball moves in time with the music and (ideally) stays
above the current word in the song. Achieving this
synchronization involves a two-part process: The first
part involves displaying the entire line of text at the
right time; the second part involves placing the ball over
the correct word in the line.

SINGACD has the following components:

>  The PLAYACD application is a very simple controller for
the MCI CD audio device.

>  The TIMEACD application is a tool for authoring lyric
files.

>  The SINGAWAV sample is a modified version of SINGACD
that opens and plays a specific wave file and lyric file.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The SOUNDSRV sample can be downloaded from the
**** file 3-54.zip in library section number 3
****

SOUNDSRV: Demonstrates a Sound Server

The SOUNDSRV sample application is a dynamic data exchange
(DDE) server that can play WAVE files and built-in wave
resources. The sample was implemented with the code
discussed in the "Quick and Easy DDE Server" technical
article on the Microsoft(R) Developer Network CD.

The service name is "SOUNDSRV". Execute commands can be
sent to the "SOUND" topic. Here's the command set:

>  PlaySound <sound-name>

>  PlayResource <resource-name>

where <sound-name> is a placeholder for the name of a WAVE
file or the name of an entry in the [SOUNDS] section of
WIN.INI. You can use the same type of name that you would
pass to the sndPlaySound function.

<resource-name> can be one of the following:

>  GoodMorning

>  GoodAfternoon

>  GoodEvening

>  GoodNight

>  Sandwich

>  Rolls

>  Jolly

>  Cheerio

>  Wrong

>  Deleted

>  Formated

>  TallyHo

>  Whip

>  MoreTea

>  GoodShow

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The WAVECONV sample can be downloaded from the
**** file 3-28.zip in library section number 3
****

WaveConv: Reads and Writes RIFF and WAVE Files

WaveConv demonstrates how to read and write resource
interchange file format (RIFF) and waveform audio data
(WAVE) files. It also demonstrates conversion routines for
Microsoft(R) adaptive differential pulse code modulation
(ADPCM) algorithms in C.

You can use WaveConv to load, edit, and convert waveform
data from an industry standard RIFF WAVE file format. This
standard format developed by IBM and Microsoft is directly
supported by Windows(TM) and OS/2(R).

WaveConv demonstrates conversion to and from the Microsoft
ADPCM format. The DVI ADPCM format is being registered by
the IMA and will be added soon. WaveConv does not yet
support editing of DISP chunk information.

KEYWORDS: PR-CD2; mmioCreateChunk; mmioRead; mmioWrite;
mmioAscend; mmioStringToFOURCC; mmioFOURCC; mmioClose;
mmioOpen; mmioDescend; mmioSeek

=============================================================================

=============================================================================

****
**** The PATRON sample can be downloaded from the
**** file 3-29.zip in library section number 3
****

PATRON: Loads and Saves Files Composed of Embedded and
Linked Objects

PATRON is a single-document application that simply allows
you to save and load files composed of embedded and linked
objects. Each object is contained within a separate child
window; this is the most convenient method for
demonstrating how to use the object linking and embedding
(OLE) application programming interface (API). Your OLE
application is likely to have other data structures for
items such as pictures and tables as well as methods for
dealing with their display and positioning. Patron does
not get that complicated because techniques for moving
objects in a document have no bearing on implementing an
OLE client.

PATRON is a companion application for the technical
article "OLE Client Implementation Guide." See the article
for additional information on how to use PATRON for
development purposes.

PATRON was built and tested under Microsoft(R) Windows(TM)
version 3.1.

KEYWORDS: PR-CD1; OleCreateFromClip; OleCreateFromFile;
OleDelete; OleQuerySize; OleRegisterClientDoc;
OleRenameClientDoc; OleSaveToStream

=============================================================================

=============================================================================

****
**** The SCHMOO sample can be downloaded from the
**** file 3-3.zip in library section number 3
****

SCHMOO: Demonstrates OLE Server Protocol

SCHMOO is a sample object linking and embedding (OLE)
server and a single-document application that is capable
of running multiple instances. SCHMOO lets you edit, save,
and load a Schmoo figure consisting of dots connected with
lines. SCHMOO demonstrates the OLE server protocol and
serves as a model for discussions in the "OLE Server
Implementation Guide."

SCHMOO has a number of source files that isolate the OLE-
specific code, leaving only a few parts of mostly non-OLE
files touched by OLE. This isolation demonstrates how OLE
can simply sit on top of an existing application,
requiring few new files and minor additions to the
existing application code. For information on using
Schmoo, see the "OLE Server Implementation Guide."

SCHMOO was built and tested under Microsoft(R) Windows(TM)
version 3.1.

KEYWORDS: PR-CD1; FreeProcInstance; MakeProcInstance;
OleRegisterServerDoc; OleRenameServerDoc;
OleRevokeServerDoc; OleSavedServerDoc

=============================================================================

=============================================================================

****
**** The DEBUGAPP sample can be downloaded from the
**** file 3-55.zip in library section number 3
****

DebugApp: High-Level Win32 Debugger

DebugApp is a high-level debugger that meets a number of
important requirements for the Microsoft(R) Win32(TM)
Application Programming Interface (API). It can debug
multiple applications simultaneously, controlling the
execution of each process being debugged and presenting
feedback on noteworthy events that occur in each process.
You can also use DebugApp to view the 2-GB heap space of
each process and learn how memory allocations are
organized. DebugApp stands on its own as a multiprocess
debugging application, but you can also use its source
code as the framework for a more elaborate custom
debugger.

DebugApp is a companion sample application for the "Win32
Debugging Application Programming Interface" technical
article on the Microsoft Developer Network CD.

DebugApp was built with the Microsoft Win32 Software
Development Kit (SDK) for Windows NT(TM) Beta Release
(March 1993). This sample application may be incompatible
with other releases of the Win32 SDK for Windows NT.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The CTL3D sample can be downloaded from the
**** file 3-31.zip in library section number 3
****

CTL3D: Demonstrates Three-Dimensional Controls

CLT3D is a companion sample to the "Adding 3-D Effects to
Controls" technical article on the Microsoft(R) Developer
Network CD. CTL3D uses the CTL3D.DLL library to add 3-D
effects to all controls.

The 3-D effect gives the Windows(TM) interface a more
sophisticated appearance. It also gives the user a clearer
indication of which actions are taking place. A 3-D button
that looks pressed provides more information than a two-
dimensional (2-D) button that simply changes color.

Windows version 3.x uses 3-D for pushbuttons only; all
other standard controls are in 2-D. However, many
applications have started adopting 3-D for other controls
as well, so the complete 3-D look is now associated with
leading-edge applications and is quickly becoming a
standard. For example, Microsoft Excel version 4.0 uses 3-
D for all controls. The CTL3D library was created by the
Microsoft Excel development group and contains all of the
functionality required for 3-D controls.

Microsoft Excel CTL3D was built and tested under Microsoft
Windows 3.1, but will also run under Windows 3.0.

KEYWORDS: PR-CD2; SendMessage; ExtTextOut; SetTextColor;
OffsetRect; DrawText; IntersectClipRect;
GetTextExtentPoint; GetTextExtent; GetCurrentTask;
GetParent; GetDeviceCaps; GetSystemMetrics; GetClassInfo;
subclass; hook; GetSysColor

=============================================================================

=============================================================================

****
**** The DDLIST sample can be downloaded from the
**** file 3-56.zip in library section number 3
****

DDLIST: Implements Controls Using Bitmaps from COMMDLG

DDLIST utilizes the unused bitmaps that are included in
the Microsoft(R) Windows(TM) version 3.1 Software
Development Kit (SDK) SAMPLES\COMMDLG directory for the
File Open and File Save dialog boxes. DDLIST implements
the drives combo box and the directory list box as an
interrelated pair in a dialog box, fully utilizing the
drive type and folder icons available with the Windows
SDK. All the bitmaps are loaded separately and maintained
in two global HBITMAP arrays. The code to draw the combo
box and list box items references these arrays.

DDLIST is a companion sample application for the "Rescue
of the COMMDLG Bitmaps" technical article on the Microsoft
Developer Network CD.

DDLIST was built and tested under Microsoft Windows
version 3.1 and Microsoft C/C++ version 7.0.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The DIALOGS sample can be downloaded from the
**** file 3-32.zip in library section number 3
****

DIALOGS: Demonstrates the Use of Common Dialog Boxes

DIALOGS demonstrates various methods for creating common
dialog boxes through the ChooseColor, ChooseFont,
GetOpenFileName, GetSaveFileName, PrintDlg, FindText, and
ReplaceText functions. It is a companion application for
the "Using and Customizing Common Dialogs" technical
article on the Microsoft(R) Developer Network CD.

DIALOGS demonstrates:

>  Basic usage guidelines for most dialog boxes.

>  Customizing common dialog boxes with flags.

>  Customizing common dialog boxes with application-
specific templates.

>  Adding hook procedures for special processing.

>  Using a separate hidden pop-up window to make the
ChooseColor and ChooseFont dialogs modeless, a technique
that can be applied to the other dialog boxes as well.

The primary purpose of DIALOGS is to show how to call the
COMMDLG functions. For this reason, the File Open dialog
doesn't open any files, Find and Replace only display a
message box indicating what actions were performed, and
printing only sends a minimal amount of text to a printer.

You can use ChooseColor to change the background of the
window and ChooseFont to change the font for the  "Change
this font..." string in the client area of the main
window. Printing uses this font, but makes no attempt to
match point sizes.

So don't expect a lot of functionality. Sure, it would be
nice to have an example that loaded text files, printed
files, allowed full searching, changed fonts and colors,
and so on, but that detracts from the purpose of this
sample and clutters the source files with code that is
unrelated to the task at hand.

KEYWORDS: PR-CD2; MessageBox; ClientToScreen;
GetWindowRect; SetWindowPos; GetDlgItemInt; DialogBox;
CheckDlgButton; IsDlgButtonChecked; EndDialog;
GetOpenFileName; GetFileTitle; PrintDlg; ChooseFont;
GetSysColor; SetDialogItemText; CreateFontIndirect;
SendDlgItemMessage; Escape; IsDialogMessage; GetDlgItem

=============================================================================

=============================================================================

****
**** The EDALIGN sample can be downloaded from the
**** file 3-33.zip in library section number 3
****

EDALIGN: Changes Justification Style of an Edit Control

EDALIGN is a companion application for the technical
article "Edit Controls." The program demonstrates a
technique for changing the justification of an edit
control. The client area displays two edit controls. You
can choose options from the Control 1 and Control 2 menus
to left-justify, right-justify, or center the text in the
two controls.

It is not possible to change the justification style of an
edit control dynamically. There are two techniques
commonly used to work around this restriction. The first
technique creates multiple edit controls (one for each
style the application needs) and switches between them as
required. The second technique creates a new edit control
with the desired style as needed and switches to the new
control. EDALIGN demonstrates the second technique. For
more information, see the technical article "Edit
Controls."

EDALIGN was built and tested under Microsoft(R)
Windows(TM) version 3.1.

KEYWORDS: PR-CD1; CreateWindowEx; LocalAlloc; LocalFree;
ScreenToClient

=============================================================================

=============================================================================

****
**** The HIERLIST sample can be downloaded from the
**** file 3-57.zip in library section number 3
****

HierList: Displays Hierarchical List in Owner-Drawn List
Box

HierList implements a hierarchical list box that includes
icon bitmaps and connecting lines. It demonstrates what an
application must do to display the hierarchy and includes
some helper functions developed to make the process easier
for the application developer.

HierList is a companion sample application for the
"Displaying a Hierarchy in a List Box" technical article
on the Microsoft(R) Developer Network CD.

HierList was built and tested under Microsoft Windows(TM)
version 3.1. The sample also builds and runs under
Microsoft C/C++ version 7.0 and Visual C++ version 1.0.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The MINMAX sample can be downloaded from the
**** file 3-34.zip in library section number 3
****

MINMAX: Controls a Window's Minimum Size, Maximum Size,
and Position

MINMAX demonstrates the WM_GETMINMAXINFO message that
allows applications to control the mazimized size and
position, the maximum tracking size, and the minimum
tracking size of a window. For more information, see the
"WM_GETMINMAXINFO" technical article.

MINMAX was built and tested under Microsoft(R) Windows(TM)
version 3.1.

KEYWORDS: PR-CD1; CreateWindowEx; DefWindowProc;
GetCurrentTask

=============================================================================

=============================================================================

****
**** The STATBAR sample can be downloaded from the
**** file 3-35.zip in library section number 3
****

STATBAR: Implements a 3-D Status Bar

STATBAR implements a 3-D status bar in the Microsoft(R)
Windows(TM) graphical environment.

A status bar is an area in a window that displays
information about the current state of the window or
application. The status bar can provide a variety of
information, including descriptions of menu items, current
keyboard-initiated modes such as NUM LOCK and CAPS LOCK,
and brief messages. For more information, see the
"Implementing a Status Bar" technical article.

STATBAR was built and tested under Microsoft Windows
version 3.1.

KEYWORDS: PR-CD1; ExtTextOut; GetSystemMetrics;
GetTextMetrics; WM_PAINT

=============================================================================

=============================================================================

****
**** The STYLES sample can be downloaded from the
**** file 3-36.zip in library section number 3
****

STYLES: Demonstrates How to Create a Window

The STYLES sample application creates a window using user-
selected dialog box options. STYLES illustrates how an
application can use Microsoft(R) Windows(TM) functions to
navigate the window structure and to control the style and
appearance of a window on the desktop. For more
information, see the "Window Hierarchy and Styles"
technical article.

STYLES was built and tested under Microsoft Windows
version 3.1.

KEYWORDS: PR-CD1; CreateWindow; CreateWindowEx; ShowWindow

=============================================================================

=============================================================================

****
**** The TOOLBAR sample can be downloaded from the
**** file 3-58.zip in library section number 3
****

TOOLBAR: Creates a Windows Toolbar

TOOLBAR builds a toolbar similar to the Microsoft(R)
Windows(TM) for Workgroups toolbar, which was implemented
through the COMMCTRL dynamic-link library (DLL).

A toolbar consists of a row of small, graphical buttons
usually placed across the top of a window. It gives the
user a fast and convenient alternative to using the
window's menu to perform operations. The menu provides a
more easily understood way to activate a function and
includes a keyboard interface to the function. A toolbar,
on the other hand, gives the experienced user a shortcut
to operations, and thus improves the usability of an
application.

TOOLBAR is a companion sample application for the
"Creating a Toolbar" technical article on the Microsoft
Developer Network CD.

TOOLBAR was built and tested under Microsoft Windows
version 3.1. The sample also builds and runs under
Microsoft C/C++ version 7.0 and Visual C++ version 1.0.

KEYWORDS: CD3

=============================================================================

=============================================================================

****
**** The VLIST sample can be downloaded from the
**** file 3-37.zip in library section number 3
****

VLIST: Demonstrates a Virtual List Box

VLIST implements a single-selection, single-column virtual
list box capable of displaying millions of items. The
standard list box control in Microsoft(R) Windows(TM) can
contain a limited number of items. VLIST shows how to
implement list boxes that exceed this limitation.

VLIST is a companion sample for the "A Virtual List Box
Implementation with VLIST" technical article on the
Microsoft Developer Network CD. For a working example of
VLIST, see the Microsoft Developer Network CD--the topic
listing in the Index window was implemented with VLIST.

VLIST was built and tested under Microsoft Windows version
3.1.

KEYWORDS: PR-CD2; GetDesktopWindow; GetSystemMetrics;
DialogBox; LoadLibrary; GetDlgItem; PortMessage;
GetWindowWord; SendMessage

=============================================================================

