WinXNewWindow


hWnd = WinXNewWindow (STRING title, x, y, w, h, simpleStyle, exStyle, icon, menu)

Creates a new window

Parameter Description
hOwner The handle to the owner for this window. Can be 0 if the window has no owner
STRING title The title of the new window
x The x coordinate of the new window, relative to the upper left hand corner of the screen. If this parameter is -1, the window is centered horizontally
y The y coordinate of the new window, relative to the upper left hand corner of the screen. If this parameter is -1, the window is centered vertically
w The width of the window, in pixels
h The height of the window, in pixels
simpleStyle A simple style constant, see remarks for a list of simple style constants
exStyle The extended style. See the CreateWindowEx function in the Win32 documentation for a list of extended window styles
icon The handle to the icon to use for the window. If 0, the default icon will be used.
menu The handle to the menu to use. If 0, the window will not have a menu

Returns

If this function is sucessful, the return value is the handle to the newly created window. If the function fails, the return value is 0.

Remarks

The window is not visible until you call the WinXDisplay function. This gives you time to create controls.

Simple style constants:

$$XWSS_APP
Creates a standard window application window
$$XWSS_APPNORESIZE
Same as $$XWSS_APP except it cannot be resized or maximised
$$XWSS_POPUP
Creates a popup window. Popup windows cannot be minimised or maximised
$$XWSS_POPUPNOTITLE
Same as XWSS_POPUP except without a title bar
$$XWSS_NOBORDER
Creates a window with no border or title. Usefull for fullscreen applications.

Examples

'Make a new window of width 400, height 300 and no icon or menu
#hMain = WinXNewWindow ("My Window", -1, -1, 400, 300, $$XWSS_APP, 0, 0, 0)

Related Links

WinXNewMenu
WinXAddButton
WinXNewToolbar
WinXAddStatusBar
WinXDisplay