HelloWorld
HelloWorld

Reputation: 1091

Win api in C#. Parent window draws on its child

I have created a window in C# by win api. And made it as child to another window. This parent window is an external program and I don't know its source code.

When i move my window inside parent window some parent's elements draw itself on my window.

For, better understanding i've made some screens.

This is before I move my window. My window is gray.

enter image description here

And this one is after moving my window over the "SeatOpen" button.

enter image description here

I have no idea how parent window can draw on my window. So, why this is happening and how to fix?

Upvotes: 0

Views: 290

Answers (2)

Joel Spolsky
Joel Spolsky

Reputation: 33637

The parent window is not drawing on your window... you are failing to draw on your window yourself -- your window is not responding to WM_PAINT messages for some reason so whatever garbage was on the screen remains there.

Upvotes: 1

Ludwo
Ludwo

Reputation: 6173

Try to redraw your window when location is changed and it is over Seat Open button.

Upvotes: 0

Related Questions