This sample application illustrates how you can use an edit control in an application's main window to provide multiple-line text entry and editing. The EditCntl application fills the client area of its main window with a multiple-line edit control and monitors the size of the client area to ensure that the edit control always just fits. When completed, the EditCntl application appears as shown in Figure 8.1:
To create the application, copy and rename the source files of the EditMenu application, then make the following modifications:
1.Add a new constant to the include file.
2.Add new variables.
3.Add a CreateWindow function.
4.Modify the WM_COMMAND case.
5.Add a WM_SETFOCUS case.
6.Add a WM_SIZE case.
7.Build and run the application.
NOTE:
Rather than typing the code presented in the following sections, you might find it more convenient to simply examine and build the sample source files provided on the sample disks.