Unmanaged Window as Parent to a Form - paint problem

  • Thread starter Thread starter Saurabh
  • Start date Start date
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
 
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
 
Back
Top