Unmanaged Window as Parent to a Form - paint problem

S

Saurabh

Hi All,

I have an application created in VC++6. I create a form in C#. I have the
handle of the Unmanaged window and I want to set the unmanaged window as a
parent of my form I achieved this by using the API call SetParent and
setting the unmanaged window as a parent to the form. The trouble is now
when I minimize the parent and restore it, the child does not get painted. I
overriden the OnPaint() in my form (just to see if it is being called) and
called base.OnPaint() from it. The control does come in the function and the
paint rectangle is also set to the proper size but the form does not get
painted properly.

I think, the child form gets painted and then the parent gets painted
erasing the child. I think when I use the API to set parent, the parent does
not know about the child or something like that....

does anybody have a solution for this?

Thanks,

--Saurabh
 
S

Saurabh

Sorry for the trouble!! problem solved!!
I was assigning the framewindow as a parent rather than the MDIClientWindow.
It works fine now. Though I still think that the parent application is not
aware of this child window....

--Saurabh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top