ALP Window styles
wndStyle and wndStyleEx properties (read/write) are used to access or change the style of the application window (ALPFrame window). Use the constants defined in the alpframehelpers.js file to manage them easier (the file is in the samples/af-samples directory of the ALPFrame package).

When set window styles are applied to the window immediately. Combining different styles you can change the window view in many ways - for example it can have a menu but no caption, or thin caption (known also as tool window caption), or window resizing can be denied and so on.

Fore setting, removing style flags of the window the alternative properties (setWndStyleFlags, resetWndStyleFlags, setWndStyleExFlags, resetWndStyleExFlags) are much more convenient. 

For detailed description of the window styles consult the MSDN (see CreateWindow and CreateWindowEx Win32 API functions), here in the remarks section some of the most useful flags are described.

Syntax and description

external.wndStyle  - (read/write), long integer. Gets/sets the standard window style flags to the ALFrame window. Styles are applied immediately after assignment. Sample:
external.wndStyle = WM_CAPTION | WM_BORDER;
Note: here constants defined in the alpframehelpers.js file are used.

external.wndStyleEx - (read/write), long integer. Gets/sets the extended window style flags to the ALFrame window. Styles are applied immediately after assignment.


Window styles supported by Win32 API are separated in two categories - standard and extended. Both categories are represented as flags in 32-bit integers. Use the scripting language  bit field operations to combine the desired flags in a number. For example in Javascript you can use "|" operator (logical "or" operation performed over the bits of the both operators). Thus combination WM_CAPTION | WM_BORDER means window with caption and border.

Most of the scripts in the DHTML pages are written in JScript (Javascript) thus we provide a file with constants definition and helper routines (alpframehelpers.js). It contains definitions for the window styles. Names of the style constants are the same as in the Win32 API and if you are using the MSDN library for more information you can use the same constants here.

Description of the styles applicable for ALPFrame. Other styles (not described here) are not recommended.

Standard window styles (wndStyle, setWndStyleFlags, resetWndStyleFlags properties):

WS_BORDER window with a thin-line border.
WS_CAPTION window that has a title bar (automatically includes the WS_BORDER if no other border style is specified).
WS_DLGFRAME window that has a border of a style typically used with dialog boxes. The border is not resizeable.
WS_MAXIMIZEBOX window that has a maximize button.The WS_SYSMENU style must also be specified.
WS_MINIMIZEBOX window with a minimize button. The WS_SYSMENU style must also be specified.
WS_OVERLAPPED overlapped window with a title bar and a border.
WS_SYSMENU window with a window menu on its title bar. The WS_CAPTION style must also be specified. Allows WS_MAXIMIZEBOX and WS_MINIMIZEBOX styles.
WS_THICKFRAME window with a sizing border. 

Extended window styles (wndStyleEx, setWndStyleExFlags, resetWndStyleExFlags properties): 

WS_EX_APPWINDOW window will be shown onto the taskbar when visible. 
WS_EX_CLIENTEDGE window with a sunken edge.
WS_EX_DLGMODALFRAME window with a double border. not resizeable.
WS_EX_LEFT left-aligned texts and other controls. default.
WS_EX_LEFTSCROLLBAR For  language with right-to-left default flowing (Hebrew, Arabic and so on). Scrollbar appears on the left side of the window. Takes effect only if the system supports some of these languages.
WS_EX_LTRREADING left-to-right reading-order. default.
WS_EX_RIGHT "right-aligned" window. see comments for the WS_EX_LEFTSCROLLBAR.
WS_EX_RIGHTSCROLLBAR right scroll bar. default.
WS_EX_RTLREADING right-to-left alignment of the window text. See comments for the WS_EX_LEFTSCROLLBAR.
WS_EX_STATICEDGE window with a three-dimensional border.
WS_EX_TOOLWINDOW Window with a thin caption. Does not appear in the taskbar or in the Alt-Tab palette. WS_CAPTION also must be specified.
WS_EX_TOPMOST Window is on top of the normal application windows. Can be overlapped only by other top most windows. 
WS_EX_WINDOWEDGE window with a raised edge border.

Applies to: external

See also: Helper libraries

newObjects Copyright 2001-2006 newObjects [ ]