MoveWindow leaving imprint on desktop

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Background:
I am taking a render window from another application and placing it upon a
panel in my c# application.
This is done by getting the handle to the window of interest then setting
it's parent to be my panel and moving the window over the panel as follows:

w32.MoveWindow(foreignWindowHandle, 0, 0,myPanel.Width, myPanel.Height, true);
w32.SetParent(foreignWindowHandle, myPanel.Handle);

Problem:
When i move the window around at the same time as the foreign application is
repainting then sometimes it will leave an imprint of itself on anything that
was beneath it eg other windows , desktop etc.

Can anyone advise how to resolve this please?
 
ShaunO said:
[...]
w32.MoveWindow(foreignWindowHandle, 0, 0,myPanel.Width, myPanel.Height, true);
w32.SetParent(foreignWindowHandle, myPanel.Handle);

Problem:
When i move the window around at the same time as the foreign application is
repainting then sometimes it will leave an imprint of itself on anything that
was beneath it eg other windows , desktop etc.

Can anyone advise how to resolve this please?

I don't have the answer to your question. However, I can guarantee you
that this is the wrong newsgroup for your question, since it has zero to
do with .NET or C#.

You need to find a Win32 programming topics newsgroup to ask your
question, probably one specific to the "User" portion of the Win32 API.

I will say that I'm not surprised you are running into trouble trying to
move a window from a completely different process into the hierarchy of
your own process. I'm surprised any of it works at all.

Pete
 
Thanks Peter, will follow your advice

Peter Duniho said:
ShaunO said:
[...]
w32.MoveWindow(foreignWindowHandle, 0, 0,myPanel.Width, myPanel.Height, true);
w32.SetParent(foreignWindowHandle, myPanel.Handle);

Problem:
When i move the window around at the same time as the foreign application is
repainting then sometimes it will leave an imprint of itself on anything that
was beneath it eg other windows , desktop etc.

Can anyone advise how to resolve this please?

I don't have the answer to your question. However, I can guarantee you
that this is the wrong newsgroup for your question, since it has zero to
do with .NET or C#.

You need to find a Win32 programming topics newsgroup to ask your
question, probably one specific to the "User" portion of the Win32 API.

I will say that I'm not surprised you are running into trouble trying to
move a window from a completely different process into the hierarchy of
your own process. I'm surprised any of it works at all.

Pete
 
Back
Top