Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: CALL & Windows API Functions
Pages: [1] Print
Author Topic: CALL & Windows API Functions  (Read 509 times)
leke
Jr. Member
**
Offline Offline

Posts: 92


View Profile WWW
CALL & Windows API Functions
« on: December 08, 2006, 11:08:01 AM »

Does CALL have access to windows API functions?
If so, can anyone show a quick example.
Logged

Graham
Full Member
***
Offline Offline

Posts: 113


View Profile
Re: CALL & Windows API Functions
« Reply #1 on: December 08, 2006, 10:08:05 PM »

use library calls to access the windows API

Eg. this function sets the title of a window
Quote
win-lib: make object! [
   
   user-lib: load/library %user32.dll

   SetWindowText: make routine! [
      handle         [integer!]
      Title         [string!]
      return:         [integer!]
   ] user-lib "SetWindowTextA"
   
   set 'WindowTitle func [
      Title [string!]
   ] [
      SetWindowText get-modes system/ports/system 'window Title
   ]   
]
Logged

leke
Jr. Member
**
Offline Offline

Posts: 92


View Profile WWW
Re: CALL & Windows API Functions
« Reply #2 on: December 09, 2006, 03:23:04 AM »

Code:
** Script Error: Feature not available in this REBOL
** Near: user-lib: load/library %user32.dll
Must be a for a commercial version.
Thanks for the example though. It was interesting to see how it was done.
Logged

leke
Jr. Member
**
Offline Offline

Posts: 92


View Profile WWW
Re: CALL & Windows API Functions
« Reply #3 on: December 17, 2006, 03:20:08 PM »

http://mortimer.devcave.net/projects/rebcall
Not tested yet, but it might so the job.
Logged

Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: CALL & Windows API Functions
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 14, 2008, 01:46:18 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2248 Posts in 586 Topics by 2512 Members
Latest Member: Jhvdyatb

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc