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
