Window Creation

An application creates its windows (including the main window) by using the CreateWindow or CreateWindowEx function and providing the information Windows requires to define the attributes of the window. CreateWindowEx has a parameter, dwExStyle, that CreateWindow does not have; otherwise, the functions are identical. In fact, CreateWindow simply calls CreateWindowEx, setting the dwExStyle parameter to zero. For this reason, the remainder of this overview refers only to CreateWindowEx.

The Win32 API provides additional functions ¾ including DialogBox, CreateDialog, and MessageBox ¾ for creating special-purpose windows such as dialog boxes and message boxes. For more information about these functions, see Dialog Boxes.