C Language and Libraries Help (clang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
_wopen
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
─────Run-Time Library───────────────────────────────────────────────────────
The _wopen function opens a QuickWin window, returning a file
handle to the window. This routine is used only in QuickWin
programs; it is not part of the Windows API. For full details
about QuickWin, see Chapter 8 of the Programming Techniques
manual.
The _wopeninfo and _wsizeinfo structures, declared in IO.H, are
used to pass window initialization information, including the
window's initial size and position on the screen. You can pass
NULL for the _wsizeinfo argument to accept QuickWin size and
positioning defaults, or you can declare a variable of type
_wsizeinfo and fill in its fields with initial values. You must
declare a variable of type _wopeninfo and fill in its fields.
For both the _wopeninfo and _wsizeinfo variables, set the _version
field to _QWINVER, which is defined in STDIO.H and IO.H.
For the _wopeninfo variable, assign a null-terminated string to
the _title field containing the desired window title. You can
also optionally set the size of the window's screen buffer in the
_wbufsize field. The default is 2048 bytes, but you can pass
some other number or the value _WINBUFINF. The value _WINBUFINF
imposes no limit on the buffer size.
For the _wsizeinfo variable, if you choose to pass size
information, assign one of the following values to the _type field:
Value Meaning
_WINSIZEMIN Minimize the window
_WINSIZEMAX Maximize the window
_WINSIZECHAR Use character coordinates for the window size
If the type is _WINSIZECHAR, you must supply the _x, _y, _h, and
_w values in the remainder of the structure. They specify the
upper-left corner and the height and width of the window (in
characters).
The _wopen function is a low-level I/O call. It accepts the
following access flags: _O_BINARY, _O_RDONLY, _O_RDWR, _O_TEXT,
_O_WRONLY.
These flags can be combined with the bitwise-OR operator (|). See
_open for additional information about the flags.
Unlike the _open function, _wopen does not accept the _O_CREAT,
_O_TRUNC, or _O_EXCL flag. Using one of these flags results in an
error.
Return Value
If successful, _wopen returns a QuickWin file handle. A return
value of -1 indicates an error; errno is set to one of the
following values:
Value Meaning
EINVAL An invalid <oflag> argument was given
EMFILE No more file handles available (too many open files)
-♦-