views:

53

answers:

2

Hello,

is there a way (on Windows XP+) to redirect the output of a window created by a process created with e.g. CreateProcess to a window of your own program?

I'd like to make a nicer GUI for ffplay.exe which is an open source video player. It is a command line tool, which opens a simple window in which it plays back the video. Can I "capture" this window and display the output in my own program somehow?

Thanks for any hints you can provide.

A: 

Start with this. Then set a timer. I realize that it isn't what you want, but I think that you need a kernel driver to accomplish seamless video capture. I suspect that people sell things for this. I think this (with a timer) is the best you will get in user space.

bmargulies
As stated in the question, I need to capture an entire window with a video, not simple text output.
dribler
A: 

You are probably best off simply obtaining the HWND of the video output (use EnumWindows() and GetWindowThreadProcessId() to locate all of the HWNDs that belong to the ffplay.exe process your app is launching) and then re-position it within the confines of your own UI using SetWindowPos() or MoveWindow() as needed. You can't actually make the video HWND be a child of your UI's windows because of the process boundaries, but moving the video HWND around as your own UI moves around accomplishes almost the same effect.

Remy Lebeau - TeamB