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

Changing window title in REBOL/View/Pro

 [1/2] from: mm::traveldoctor::com at: 21-Jan-2002 17:54


Changing window title in REBOL/View/Pro I've been trying to change the window title using MS Windows' SetWindowText. Here's an example of the script I'm trying to write: view/new window: layout [title "Test"] user32.dll: %/c/windows/system/user32.dll user32: load/library user32.dll set-title: make routine! ["Set Window Text" return: [long]] user32 "SetWindowTextW" set-title "REBOL" "My Window" show window wait 10 I'm not a Windows programmer, but I would like to get this to work. Any ideas? Thanks in advance! Mark

 [2/2] from: ljurado:bariloche:ar at: 22-Jan-2002 1:31


Hi Mark, try this: u32: load/library %user32.dll get-focus: make routine! [return: [int]] u32 "GetFocus" set-caption: make routine! [hwnd [int] a [string!] return: [int]] u32 SetWindowTextA view/new layout [title "TESTING"] hwnd: get-focus set-caption hwnd "My Window" HALT Luis