CreateWindow( title$,x,y,width,height[,group[,style]] )

Parameters

title$ - Initial title text of the window
x,y,width,height - Initial shape of the window
group - An optional group gadget handle
style - Optional style flags

Description

CreateWindow creates a window gadget and returns a handle to it.

If the group parameter is omitted, the window is created on the desktop.

Flags can be any combination of:

1 - The window has a title bar
2 - The window is resizable
4 - The window has a menu
8 - The window has a status bar
16 - The window is a 'tool' window
32 - The window shape is in 'client coordinates'

The default style is '15' - a resizable window with title bar, menu and status bar. If the style is set to '0', the result is a borderless window with no features.

Tool windows are special windows with a smaller title bar that do not appear in the task bar.

Example

; Example provided by Mark Tiffany
CreateWindow("Test Window - Borderless (0)",0,0,400,100,0,0)
CreateWindow("Test Window - Tool Window (17)",0,100,400,100,0,17)
CreateWindow("Test Window - Basic (3)",0,200,400,100,0,3)
CreateWindow("Test Window - With Menu (7)",0,300,400,100,0,7)
CreateWindow("Test Window - With Status Bar (11)",0,400,400,100,0,11)
CreateWindow("Test Window - Default (15)",0,500,400,100,0)

; wait until the user closes one of the windows
Repeat
If WaitEvent()=$803 Then Exit
Forever

End ; bye!

Index

Click here to view the latest version of this page online