Adding cursors.

This commit is contained in:
Brad Nelson
2022-02-20 16:41:21 -08:00
parent 59cd2ff4e0
commit c5fd9b127b
3 changed files with 40 additions and 1 deletions

View File

@ -18,10 +18,30 @@ also structures
z" Gdi32.dll" dll Gdi32
z" DeleteObject" 1 Gdi32 DeleteObject
z" CreateSolidBrush" 1 Gdi32 CreateSolidBrush
: RGB ( r g b -- n ) 16 lshift swap 8 lshift + + ;
5 constant COLOR_WINDOW
: RGB ( r g b -- n ) 16 lshift swap 8 lshift + + ;
z" GetStockObject" 1 Gdi32 GetStockObject
$80000000 constant WHITE_BRUSH
$80000001 constant LTGRAY_BRUSH
$80000002 constant GRAY_BRUSH
$80000003 constant DKGRAY_BRUSH
$80000004 constant BLACK_BRUSH
$80000005 constant NULL_BRUSH
$80000006 constant WHITE_PEN
$80000007 constant BLACK_PEN
$8000000a constant OEM_FIXED_FONT
$8000000b constant ANSI_FIXED_FONT
$8000000c constant ANSI_VAR_FONT
$8000000d constant SYSTEM_FONT
$8000000e constant DEVICE_DEFAULT_PALETTE
$8000000f constant DEFAULT_PALETTE
$80000010 constant SYSTEM_FIXED_FONT
$80000011 constant DEFAULT_GUI_FONT
$80000012 constant DC_BRUSH
$80000013 constant DC_PEN
only forth definitions

View File

@ -21,6 +21,7 @@ pad WINDCLASSA erase
WindowProcShim pad ->lpfnWndProc !
DefaultInstance pad ->hInstance !
MyClassName pad ->lpszClassName !
NULL IDC_ARROW LoadCursorA pad ->hCursor !
pad RegisterClassA constant myclass
create ps PAINTSTRUCT allot

View File

@ -126,4 +126,22 @@ struct PAINTSTRUCT
z" FillRect" 3 User32 FillRect
z" PostQuitMessage" 1 User32 PostQuitMessage
z" LoadCursorA" 2 User32 LoadCursorA
32650 constant IDC_APPSTARTING
32512 constant IDC_ARROW
32515 constant IDC_CROSS
32649 constant IDC_HAND
32651 constant IDC_HELP
32513 constant IDC_IBEAM
32641 constant IDC_ICON
32648 constant IDC_NO
32640 constant IDC_SIZE
32646 constant IDC_SIZEALL
32643 constant IDC_SIZENESW
32645 constant IDC_SIZENS
32642 constant IDC_SIZENWSE
32644 constant IDC_SIZEWE
32516 constant IDC_UPARROW
32514 constant IDC_WAIT
only forth definitions