To create an entry field in a non-dialog window, an application calls WinCreateWindow with the window class WC_ENTRYFIELD. The entry field is owned by an application's client window, whose window procedure receives notification messages from the entry field.
The following code fragment shows how to create an entry field in a client window:
#define ID_ENTRYFIELD 5 HWND hwnd, hwndEntryField1, hwndClient; LONG xPos = 50, yPos = 100; LONG xWidth = 100, yHeight = 20; hwndEntryField1 = WinCreateWindow( hwndClient, /* Parent-window handle */ WC_ENTRYFIELD, /* Window class */ "initial text", /* Initial text */ WS_VISIBLE | /* Visible when created */ ES_AUTOSCROLL | /* Scroll text */ ES_MARGIN, /* Create a border */ xPos, yPos, /* x and y position */ xWidth, yHeight, /* Width and height */ hwnd, /* Owner-window handle */ HWND_TOP, /* Z-order position */ ID_ENTRYFIELD, /* Window identifier */ NULL, /* No control data */ NULL); /* No pres. parameters */