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

avicap32.dll

 [1/5] from: nick1:musiclessonz at: 11-Mar-2008 8:08


Has anyone tried using avicap32.dll to capture web cam images in Windows with Rebol? I'm stuck trying to get the "hwnd" value (window handle) needed for the "capCreateCaptureWindow" function. In other development environments I use, that handle (pointer) is simply returned when I create a new GUI window. Does anyone know if I can gain access to that value, within Rebol, for a GUI window created by Rebol? Thanks! - Nick

 [2/5] from: gregg:pointillistic at: 11-Mar-2008 10:51


Hi Nick, NA> I'm stuck trying to get the "hwnd" value (window handle) needed for NA> the "capCreateCaptureWindow" function. In other development NA> environments I use, that handle (pointer) is simply returned when I NA> create a new GUI window. Does anyone know if I can gain access to NA> that value, within Rebol, for a GUI window created by Rebol? Thanks! You can get the handle to a console window pretty easily, but to find a View window you'll have to find it by title or something. -- Gregg

 [3/5] from: moliad::gmail::com at: 11-Mar-2008 13:48


Hi Nick, IIRC this has cropped up before, do a search on the rebol.org mailing archive, including all years. -MAx On Tue, Mar 11, 2008 at 12:51 PM, Gregg Irwin <gregg-pointillistic.com> wrote:

 [4/5] from: nick1::musiclessonz::com at: 11-Mar-2008 21:28


Thanks Max and Gregg :) Gregg, I actually found the part of the solution I needed in your post at http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=rmlMYFJ. The class name is "REBOLWind", and the FindWindowA function in user32.dll provides the ID. This appears to work correctly: user32.dll: load/library %/C/Windows/System32/user32.dll find-window-by-class: make routine! [ ClassName [string!] WindowName [integer!] return: [integer!] ] user32.dll "FindWindowA" hwnd: find-window-by-class "REBOLWind" 0 Quoting Gregg Irwin <gregg-pointillistic.com>:

 [5/5] from: nick1::musiclessonz::com at: 12-Mar-2008 23:10


Here's my first working version of some win api code converted to Rebol that displays video from your local webcam: http://guitarz.org/files/capture.r I tested it in WinXP with rebface.exe currently available in beta 2.75 at http://www.rebol.net/builds/. If anyone gets a chance to test it, I'm curious to see how it works on other machines. Here's a little exe: http://guitarz.org/files/capture.exe Quoting Nick Antonaccio <nick1-musiclessonz.com>: