CreateWindow - Extended


static Handle CreateWindow(unsigned Extended,
                           String^ ClassName,
                           String^ Caption,
                           unsigned Style,
                           int X,
                           int Y,
                           int Width,
                           int Height,
                           Handle Parent,
                           Handle Menu,
                           Handle Module,
                           Handle Parameter)

static Handle CreateWindow(unsigned Extended,
                           unsigned short ClassName,
                           String^ Caption,
                           unsigned Style,
                           int X,
                           int Y,
                           int Width,
                           int Height,
                           Handle Parent,
                           Handle Menu,
                           Handle Module,
                           Handle Parameter)

These functions create a window of a given class (with extended window styles).

Parameters

unsigned Extended

The extended style bits of the window.

String^ ClassName

The name of the window class.

String^ Caption

The window caption (title).

unsigned Style

The style bits of the window.

int X

The x-coordinate of the origin of the window. For standard or pop-up windows, the position is specified in screen coordinates relative to the desktop. For child windows, the position is measured in window coordinates relative to the upper-left corner of the parent window's client area. If this parameter is set to Defaults::UseDefault, the operating system selects a default position.

int Y

The y-coordinate of the origin of the window. If this parameter is set to Defaults::UseDefault, the operating system selects a default position. See the description of the previous parameter.

int Width

The initial width of the window in device units. If this parameter is set to Defaults::UseDefault, the operating system selects the initial size. For popup windows the default width is zero. For overlapped windows (Style::Window), the default width extends the window to the right-most edge of the desktop.

int Height

The initial height of the window in device units. If this parameter is set to Defaults::UseDefault, the operating system selects the initial height. For popup windows the default height is zero. For overlapped windows (Style::Window), the default height extends the window to the top of the icon area.

Handle Parent

The handle of the parent or owner window. Specification of this parameter is optional if the style Style::Popup is being applied; however, if Style::Child is applied, a valid parent window handle must be specified.

Handle Menu

For overlapped or pop-up windows, this parameter identifies the menu to be used (null implies that the class menu is to be used). For child windows, this parameter specifies the window identity.

Handle Module

The handle of the instance of the module to be associated with the window.

Handle Parameter

A pointer value that is passed to the window through the window creation data (referenced by the parameter Parameter2 on the message Message::Create).

Return

Handle

The handle of the new window.

Notes

Prior to returning, this function sends the message Message::Create to the window procedure.

For overlapped, pop-up and child windows, this function also sends the messages Message::GetMinimumMaximumInformation and Message::NonclientCreate.

If the style Style::Visible is set, all messages required to activate and show the window are sent.

If the window style specifies a title bar (Style::Caption), the caption string pointed to by the function parameter Caption is displayed in the title bar.

When creating control windows through this function, the parameter Caption is used to specify the text for the control.

Details

Name Space IPlusPlus::Windows
Class Win
Assembly IPlusPlus.WinPlus.dll