WinBase.f


This file contains some useful words that are used in the files to follow.


An example of usage

WinBase.f contains the following definitions of interest:

DEFAULTOF
defines a default condition for CASE structure (must be last!).

   usage:  CASE
            a OF ... ENDOF
            b OF ... ENDOF
              ...
       DEFAULTOF ... ENDOF
       ENDCASE
zCount ( szText -- a n)
Converts a null-terminated string to a normal Forth address/count string.

MAKELONG ( hi lo -- n)
Creates a long (32-bit) word from two 16-bit words (mimics the WIN32 API macro of the same name.

?WinError ( f)
Displays an error box if the WIN32 API returns an error. Can be set to ABORT the code using a conditional compilation flag.

CreateNewID ( -- id)
This returns a new ID number (hopefully unique, but not guaranteed). ID Numbers are used by many controls which generate a WM_COMMAND message.

GetIconResource ( a -- handle)
Loads an icon resource from a file and returns a handle to it. The address is the address of a null terminated string (e.g., Z" EXAMPLE.ICO").

GetBmpResource ( a -- handle)
Loads a bitmap resource from a file and returns a handle to it. The address is the address of a null terminated string (e.g., Z" EXAMPLE.BMP").

GetCurResource ( a -- handle)
Loads a cursor resource from a file and returns a handle to it. The address is the address of a null terminated string (e.g., Z" EXAMPLE.CUR").



Author: Jeff Kelm, (how to contact me)
URL: http://www.concentric.net/~jkelm/win32for/classidx2/winbase.htm
(Modified: 2005-01-07)