Capturing window output in another window

I am building a C++ (Qt) based application for controlling a flash based UI. Because the flash runtime leaks spectatular amounts of memory, we execute the UI as a .swf loaded in the standalone flash player separate from the command-and-control app written i C++.

The C++ starts the flash player as an external process with appropriate parameters, and communicates with it over a TCP socket connected to localhost.

The application runs primarily on Windows XP and above.

The unfortunate side effect of running the flash player standalone is that two applications are shown in the Alt+tab list as well as in the task bar on windows (one being our application, the other being the flash player). Additionally, as the application runs full screen, flash must manage the entire screen. Allowing the C++ app to draw parts of the screen would be a massive improvement.

We would like to somehow merge the two, while leaving our own application in control. I am thinking something along the lines of Google Chrome, which appears to be running each browser tab in a separate process while displaying all output in a single window.

I've been reading up in the Win32 API (and google) in order to determine if accomplishing this is even possible. Althogh so far I've come up with dll injection as the only semi-viable solution, but I would very much like to consider that plan B.

Any suggestions would be appreciated.

-------------Problems Reply------------

The Alt+Tab list shows top-level (no parent) windows that are visible and don't have the WS_EX_TOOLWINDOW extended style. So if you have two windows from two processes but you only want to see one in the Alt-Tab list (and on the task bar), then you have a few options:

  1. Add the WS_EX_TOOLWINDOW to one of the windows.
  2. Re-parent one of the windows to a hidden top-level window.
  3. Re-parent one of the windows (probably the Flash player) to the other window. This is tricky, but it's probably how Chrome and many other multi-process single-window apps work. What makes it tricky is handling the lifetimes of the windows and inadvertently serializing the message queues.

I guess this question and its answers are related to your question: Embedding Flash Player in a C++ or Java application?

DLL injection won't get you anywhere, the memory would still be allocated in your main process if you're instantiating the flash player as an in-process server.
If you want to keep control over the memory leaks you have to keep the flash player in a seperate process.

Your current approach sounds viable, your only problem seems to be that the process is still visible in something like the Alt+Tab list... as far as i recall, setting the extended window style to WS_EX_TOOLWINDOW should help you with that.
For hiding the process from the taskbar see e.g. here.

Category:c# Views:0 Time:2009-12-29

Related post

  • python to capture output of another windows - GUI program 2011-05-03

    The situation is like this: I want to capture the pop-ups of IPmsg.exe in my python program. There is an easy way of doing it, which is reading from the log file. But I would like to know if this can be done without bringing log files into discussion

  • Capture standard output and still display it in the console window 2009-04-24

    I'm spawning a child process that runs in a visible console window (it's a batch file that runs MSBuild), and I'd like to have the output generated by the process displayed in the visible console window, as well as capture that output so I can proces

  • How can I capture output from the Windows cmd shell? 2009-06-16

    Is there any way with, say Perl or PHP, that I can grab output from another process that outputs to the Windows cmd shell? I have a game server that outputs certain information, for example say 'player finished track in 43s' and I want to grab that l

  • How do I programatically capture the output of a command on Windows 2010-08-11

    What the question says. Ultimately what I want is to execute gcc and capture the output if there's an error. The problem is errors are written to stderr instead of stdout. On Linux I can do gcc foo.c 2>&1 How can I accomplish this on Windows?

  • Is there a way to capture the send key on Windows Mobile and have it dial a specific number? 2008-12-09

    I have a Windows Mobile application using the compact framework (NETCF) that I would like to respond to someone pressing the send key and have the phone dial the number selected in my application. Is there a way using the compact framework to trap th

  • How to capture high resolution image on Windows Mobile 2008-12-11

    I would like to capture high resolution image with Windows Mobile device. I've tried the example from WM SDK, but it captures just a single frame of video camera and the resolution is poor. Has anyone any experience with image capturing on Pocket PC

  • How to Capture a live stream from Windows Media Server 2008 2010-05-22

    I want to capture the live stream from windows media server to filesystem on my pc I have tried with my own media server with the following code. but when i have checked the out put file i have found this in it. FileStream fs = null; try { HttpWebReq

  • Generating output in a Windows Form App 2010-11-02

    I am working on a windows form app like most development it is usually useful to see output. I am wondering what methods you use to see output in a windows form app. PS. I am new to visual studio in general. --------------Solutions------------- You c

  • Not getting output on emulator window 2010-12-30

    I am a beginner and trying to run Hello world application using I am using eclipse helios, Android 2.3, latest jdk and sdk. Using window xp so 32-bit versions are there. I am unable to get output on emulator window which pop. T

  • OpenGL : How to set up OpenGL to just render to a FBO, no output to screen / window / control? 2011-01-06

    First off, I'm using OpenTK in a WPF application, but I think this is more a generic OpenGL thing. In my application I want to be able to render 3D stuff to a texture. I do NOT need output to a window or control on screen - I just want to render to a

  • Win32 Capturing child Window messages in parent window 2011-07-12

    In my Win32 application, a child window is created by a third party SDK.The Window creation process is transparent and I cannot associate a WndProc method with the child Window. I want to be able to capture child window messages in parent window. How

  • In jmeter, How to capture the script of authentication window? 2011-08-19

    I also have the question that how to capture the script of authentication window (for e.g. username, password). If anyone knows the answer, Please help me out. --------------Solutions------------- If you are talking about pop-up window,then Jmeter do

  • How to capture a Direct3D/WPF/DWM window into a bitmap? 2012-01-09

    The normal way to capture an image of a window is to call: HDC SharedWndDC = GetWindowDC(SharedWnd); BitBlt(BitmapDC, 0, 0, width, height, SharedWndDC, 0, 0, SRCCOPY /* |CAPTUREBLT */); ReleaseDC(SharedWnd, SharedWndDC); Which on a system running DWM

  • can the audio output of my windows system be duplicated? 2012-01-10

    can the audio output of my windows system be duplicated??? I mean, is it possible to, play the sound being played through the speakers, to also be played through the Bluetooth headphones at the same time(or through one wired + one Bluetooth-headphone

  • Change text output color on windows for stderr 2012-04-10

    I recently found a post that gave a solution to have the text output by stderr a different color for Linux (bash) They created the following bash script script #!/bin/bash { $* 2>&1>&3|sed 's,.*,\x1B[33m&\x1B[0m,'>&2;} 3>

  • Support of signed drivers for Output Protection on Windows XP? 2012-10-22

    Question: Do Windows Operating Systems before Windows Vista (i.e. Windows XP) require drivers to be signed during Adobe Access enforcement of Output Protection? In other words, is it possible to use an unsigned driver which would falsely indicate tha

  • Why can't I capture video from device on windows 8? 2012-02-07

    I've tried a myriad of programs to capture video from my hauppage wintv-hvr 950 onto my windows 8 laptop. No program seems to work so I've gone back to the tried and true windows movie maker 2.6, except the option for capturing from a device is no lo

  • I have Windows 7 Professional with Windows XP Mode. How can I get my QB45 Programs output to be at full screen??? 2012-05-21

    I have Windows 7 Professional and Windows XP Mode. How can I get my QB45 Programs output to be at full screen??? --------------Solutions------------- Hi, I believe you are running QB545 Program in Windows XP mode and not on Windows 7 Professional. To

  • Sound Output Problem for Windows 8.1 2013-01-16

    I recently installed the Windows 8.1 Update onto my Asus S400C, and since then i have been having a degraded Bass level in my sound, i have changed the equalizer settings and the problem still persisted, however this is not my main problem. I un-inst

Copyright (C), All Rights Reserved.

processed in 0.339 (s). 11 q(s)