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

[REBOL] Cool API Function

From: tbrownell::l3technology::com at: 31-Jan-2003 4:34

Hello all, long time no post. I've been toying with a alpha transparency for an actual view window in Win2000, XP. This would allow funky shaped GUIs with the alpha color being an hole to the window beneath. It utilizes the SetLayeredWindowAttributes call in the user32.dll But I can't get it to work. Here's a link regarding the API call /WindowsUserInterface/Windowing/Windows/WindowReference/WindowFunctions/SetL ayeredWindowAttributes.asp Theoretically, the following code should launch a copy of Notepad, and make it 50% transparent? rebol [] call "notepad" wait 1 ;Give Notepad a chance to load win-user: load/library %user32.dll find-window-by-class: make routine! [ ClassName [string!] WindowName [integer!] return: [integer!] ] win-user "FindWindowA" wahwnd: find-window-by-class "Notepad" 0 a: %/c/windows/system32/user32.dll b: load/library a c: "SetLayeredWindowAttributes" r: make routine! [ hwnd [integer!] crKey [integer!] bAlpha [integer!] dwFlags [integer!] ] b c note-hwnd: find-window-by-class "Notepad" 0 view layout [btn "test" [r note-hwnd 0 128 0] btn "quit" [quit] ] halt ;----End--- But alas, it doesn't work. Anyone have any ideas? Terry Brownell