Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Cool API Function... Almost there.

From: amicom:sonic at: 4-Feb-2003 6:57

I suspect the API calls are different between Win98SE and XP. On Win98SE, I get the following:
>> call "c:\windows\notepad"
== 0
>> wait 1 >> win-user: load/library %user32.dll >> >> >> ;Find the Windows by class name function >> find-window-by-class: make routine! [
[ ClassName [string!] [ WindowName [integer!] [ return: [integer!] [ ] win-user "FindWindowA"
>> >> >> ;Set it to the varialbe >> hwnd: find-window-by-class "notepad" 0
== 4088
>> >> >> GWL_EXSTYLE: -20
== -20
>> LWA_COLORKEY: 0
== 0
>> LWA_ALPHA: 128
== 128
>> WS_EX_LAYERED: 128
== 128
>> >> >> >> GetWinLongR: make routine![
[ hWnd [integer!] [ nIndex [integer!] [ return: [integer!] [ ]win-user "GetWindowLongA"
>> >> >> setWinLongR: make routine![
[ hwnd [integer!] [ nIndex [integer!] [ return: [integer!] [ ]win-user "SetWindowLongA"
>> >> >> SetAttributes: make routine! [
[ hwnd [integer!] [ crKey [integer!] [ bAlpha [integer!] [ dwFlags [integer!] [ ] win-user "SetLayeredWindowAttributes" ** Access Error: Cannot open SetLayeredWindowAttributes ** Near: SetAttributes: make routine! [ hwnd [integer!] crKey [integer!] bAlpha [integer!] dwFlags [integer!] ] win-user
>> >> >> SetWinLongR hwnd GWL_EXSTYLE 0 GetWinLongR hwnd GWL_EXSTYLE
== 272
>> >> >> SetAttributes hwnd 95 128 0
** Script Error: SetAttributes has no value ** Near: SetAttributes hwnd 95 128 0