GUI Help > Create > createWindow
createWindow
int handle=createWindow(int x, int y, int width, int height, str caption, int styles, int extraStyles, int createTopMost, handle parent)
Description: Creates a window gadget. Windows come in a variety of different kinds, which you can specify using the styles parameters. Windows can either belong to another gadget (they are only visible when the parent is visible, and they always show in front of the parent), or they can be independant (the main application window is usually the only independant window).
Return Value: Handle to the new gadget.
Parameters:
x | X position of new gadget
y | Y position of new gadget
width | Width of new gadget in pixels
height | Height of new gadget in pixels
caption | The text which appears in the titlebar of the window.
styles | Specifies the appearence & features of the window. This must be specified. There are two common types, the values below are specified in the gui.dba constants file: WINDOW_NORMAL- Resizeable window with an icon, max/min button and a close button. WINDOW_FIXED - Window with titlebar and close button, but no min/max button and is not resizeable
extraStyles | Additional window options. You can leave this as 0. The only setting which you will need on a regular basis here is WINDOW_TOOLWINDOW (from the constants file). This creates a window with a thin title bar and a close button.
createTopMost | If 1, the window is created independant of all the other windows in your program, if 0 the window is created as a child of another gadget, as specified by the parent parameter.
parent | Handle to the parent for the new gadget. If 0, this is either the main DBPro window if createTopMost is 0, or the window has no parent (if createTopMost is 1)
Remarks:
See Also:
Example: (Note: You will need to include the GUI constants file for this example to work)