can recommend a good solution.
Application B gets window handle to application A's main window.
and so on....
So I tried your hints with your order of the calls. Does not work in my
My dialog starts the second application with CreateProcess(). Then I send
message to the process and it gives me its HWND.
I can do whatever I like with the handle. Neither ::UpdateWindow,
::RedrawWindow nor the couple SetForeground--BringToTop-SetActive make the
application repaint. SetForeground is ok, because it lets the app stay at
the top, but since it never repaints, my dialog stays in front (when I
the mouse, I click in my dialog, so it comes active to the top).
So there's no description of the "ALT-tabulator" key behaviour?
Is it possible to do something with the process handle that I get from
CreateProcess(), so that I can repaint the application window with it?
Thanks and regards,
"AliR (VC++ MVP)" <AliR@online.nospam> schrieb im Newsbeitrag
No need to post a new message, there are people answering in your
I had this same problem when I was writting my OLE drag and drop example.
What I did was I made sure I call
in that order on the main window of the application. That does it for me
On other thing to concider is that the order that you restore your
is also important. I am not sure which application is controling which,
if the one in the background is controlling the fullscreen one, then it
needs to tell the fullscreen one to maximize before the small one gets
maximized, otherwise this might happen:
Small application gets maximized, and you call SetForgroundWindow, then
fullscreen window gets maximized.
"Guido Franzke" <email@example.com> wrote in message
so I still have the problem, that I have a CDialog occupying the total
screen (without Windows style, but not topmost), and in it a second
programme, of which I only have the HWND.
In my dialogue, one can maximize and minimize the second programme to
or hide the application. It's the same functionality like the normal
After the second programme has started, it is in the foreground. When
dialog I switch the second programme (minimize and then maximize), the
programme does not repaint itself. I tried BringWindowToTop(hwnd) and
SetForegroundWindow(hwnd) and SetWindowPos(hwnd, HWND_TOPMOST,...) and
SetActiveWindow(hwnd), but the programme stays unpainted i.e. hidden.
force the programme to popup a warn message, I can see that the
in the foreground - I see its popup window, but not the whole
the programme. Is this possible?
Ok, if I use the Windows keys "ALT-Tab", I can bring the second
the top and it is repainted.
My question: Is it possible to programme the behaviour of "ALT-Tab" in
dialog, so that I can show the second programme?
Thanks in advance,