开发者

Redirect window of command line tool to your app (Windows)

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 fo开发者_如何学JAVAr any hints you can provide.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜