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.
WinInitialize (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINWINDOWMGR
HAB WinInitialize(fsOptions)
USHORT fsOptions; /* initialization options */
The WinInitialize function initializes a thread for making Presentation
Manager function calls. This must be the first Presentation Manager function
called by any thread that will be calling Presentation Manager functions.
Parameter Description
────────────────────────────────────────────────────────────────────────────
fsOptions Specifies the initialization options. Currently this parameter
must be zero.
Return Value
The return value is the handle of an anchor block, or NULL if an error
occurred.
Example
This example calls WinInitialize so that the thread can use Presentation
Manager functions, processes the message loop, and calls WinTerminate when
it is finished calling Presentation Manager functions.
HAB hab; /* handle to the anchor block */
VOID cdecl main() {
hab = WinInitialize(0);
.
. /* any other initialization */
.
while (WinGetMsg(hab, &qmsg, (HWND) NULL, 0, 0))
WinDispatchMsg(hab, &qmsg);
WinTerminate(hab);
See Also
WinCreateMsgQueue, WinTerminate
♦