home *** CD-ROM | disk | FTP | other *** search
-
- 'CALLDLL3.BAS Show how to draw text directly into a window using
- 'API calls
-
- UpperLeftX = 10
- UpperLeftY = 10
- open "window" for window as #1
-
- open "user.dll" for dll as #user
- open "gdi.dll" for dll as #gdi
-
- h = hwnd(#1)
-
- calldll #user, "GetDC", _
- h as word, _
- hdc as word
-
- x = 10
- y = 10
- text$ = "Ha ha ha!"
- length = 9
-
- for y = 10 to 100 step 20
-
- calldll #gdi, "TextOut", _
- hdc as word, _
- x as short, _
- y as short, _
- text$ as struct, _
- length as short, _
- result as word
-
- next x
-
- calldll #user, "ReleaseDC", _
- h as word, _
- hdc as word, _
- result as ushort
-
- notice "Done."
-
- close #user
- close #gdi
-
- close #1
-
- end
-
-
-