[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
HWND pascal CreateWindow(char *szClass, char *szWindow, DWORD dwStyle,
                            WORD x, WORD y, WORD width, WORD height,
                            WORD attr, WORD id,
                            HWND hParent, HMENU hMenu, WORD hInst,
                            DWORD lpParam)

  This is the principal function for creating any type of window in MEWEL.

Parameters
  szClass is the name of the window class. It can be the name of a
user-defined class or one of the following predefined classes :

    "NORMAL"    "BUTTON"                "EDIT"          "LISTBOX"
        "SCROLLBAR"
    "STATIC"    "PUSHBUTTON"    "CHECKBOX"      "RADIOBUTTON"   "TEXT"
    "FRAME"     "BOX"                   "ICON"          "COMBOBOX"

  szWindow is the title of the window.
  dwStyle is the style bits for the window (WIN_HAS_BORDER, etc).
  x and y are the screen-based coordinates of the upper left corner of the window.
  width and height define the extent of the window.
  attr is the color attribute of the window. It can be the constant
   SYSTEM_COLOR if you are using the system defined colors.
  id is the control id of the window (especially important for controls).
  hParent is the handle of the parent window, or NULLHWND if there is no parent.
  hMenu is the handle of the associated menubar, or NULLHWND if no menu is defined yet.
  hInst must be 0 for now. This parameter is in here for MS-WINDOWS compatability.
  lpParam is a user-defined value, or NULL. This value will be passed
   to the window procedure when the window is created - the window
   procedure will receive a WM_CREATE message with the value of lpParam
   passed in the lParam parameter. Important- in order for the WM_CREATE
   message to be sent to a window, it's window class must  be registered
   before the call to CreateWindow().

Returns
  The window handle of the created window if successful, NULLHWND if not.

NOTE: You should use CreateWindow() to create all control windows.

The following table shows you all the styles which can be used for the
various window classes:


WS_BORDER

The windows has a border surrounding it. The default border style is
a single line border if the window does not have the input focus, and
double-line if it does have the input focus.

WS_VSCROLL

The window has a vertical scrollbar.

WS_HSCROLL

The window has a horizontal scrollbar.

WIN_HAS_SHADOW

The window is drawn with a background shadow. The window style can be
ORed with any of the following shadow styles:  SHADOW_TOPLEFT
SHADOW_BOTLEFT SHADOW_TOPRIGHT SHADOW_BOTRIGHT (default)

WS_CAPTION

The window has a titlebar.

WS_SYSMENU

The window has a system menu.

WS_MINMAXBOX

The window can be maximized by clicking on the arrow icon which
appears in the upper-right corner of the window.

WS_SIZEBOX

The window can be resized by dragging the lower-right corner, or by
choosing the RESIZE option from the system menu.

WS_MOVEBOX

The window can be moved to a new position by dragging on the top row
of the border or of the titlebar, or by choosing the MOVE option from
the system menu.

WS_SYSCOLOR

The color of the window or control is derived from the MEWEL system
color table.

WS_CLIPCHILDREN

Drawing to a window will not overwrite the children of that window.

WS_CLIPSIBLINGS

Output to a window will be clipped to the other windows which are not
its children.


ES_AUTOHSCROLL

The contents of the edit control is scrolled horizontally when the
cursor moves off the size of the control.

ES_AUTOVSCROLL

The contents of the edit control are scrolled vertically when the
cursor moves off the top or bottm of the control.

ES_MARGIN

The edit control has a border.

ES_MULTILINE

The edit control has multiline editing capabilities.

ES_PASSWORD

The characters entered into an edit control will not be displayed.
Instead, a "password character" will be displayed at each position
corresponding to an entered character.


BS_DEFAULT

The pushbutton is the default pushbutton. It will be displayed with a
different border than non- default pushbuttons.

BS_HELP

The button posts a WM_HELP message to the parent window when clicked.


LBS_MULTIPLESEL

You can select multiple entries in this listbox. Pressing the space
bar will toggle the selection state of the highlighted item.

LBS_NOREDRAW

The listbox is not refreshed as strings are added to it.

LBS_NOTIFY

The listbox will notify the parent window when a new entry is
highlighted, or when the listbox is double clicked.

LBS_SORT

The strings in the listbox are sorted in alphabetical order.

LBS_STANDARD

Combination of LBS_SORT and LBS_NOTIFY.


CBS_SIMPLE

The combo box consists of an edit field and a listbox which is always
visible.

CBS_DROPDOWN

The combo box consists of an edit field and a listbox which is
dropped down when the arrow next to the edit field is clicked.

CBS_DROPDOWNLIST

The combo box consists of a static text field and a listbox which is
dropped down when the arrow next to the static field is clicked.

CBS_AUTOHSCROLL

The edit field in the combo box will scroll horizontally when the
cursor moves off the left or right side.

CBS_SORT

The strings in the combo box's listbox are sorted alphabetically.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson