Board index » cppbuilder » MDIChild from DLL doesn't get painted...

MDIChild from DLL doesn't get painted...

hello everybody,
    I have an application that get, through a function in a DLL, an instance
of a class, be it TDClass;
It then calls TDClass::ShowChildForm that goes something like this:

TForm *TDClass::ShowChildForm(TForm *owner) {
  _myForm = new TF_Child(owner, this);
        // TF_Child, as you can imagine, is a TForm descendant,
        // where FormStyle is fsMDIChild...

  _myForm->Visible = true;
  _myForm->Show();
  return _myForm;

Quote
}

The child is actually created (I can see its border), but the client area
does not receive any WM_PAINT message... until I resize it... what is wrong?
Might the main form not update MDIChildren before redrawing itself?

TIA,
    Rony.

--
____________________
Rony Cesana.

Progetto Torre di Pisa,
Scuola Normale Superiore.
http://www.cribecu.sns.it
____________________

 

Re:MDIChild from DLL doesn't get painted...


Rony,

There are more than a few difficulties surrounding the use of MDI applicaitons
with DLLs. You might want to take a look at this document and see if your
situation matches:
http://community.borland.com/article/0,1410,20877,00.html

I believe there are other douments that address this problem on the Borland
site. Search for them here: http://search.borland.com

Vincent Drake
Borland Technical Support

Quote
> hello everybody,
>     I have an application that get, through a function in a DLL, an instance
> of a class, be it TDClass;
> It then calls TDClass::ShowChildForm that goes something like this:

> TForm *TDClass::ShowChildForm(TForm *owner) {
>   _myForm = new TF_Child(owner, this);
>         // TF_Child, as you can imagine, is a TForm descendant,
>         // where FormStyle is fsMDIChild...

>   _myForm->Visible = true;
>   _myForm->Show();

>   return _myForm;
> }

> The child is actually created (I can see its border), but the client area
> does not receive any WM_PAINT message... until I resize it... what is wrong?
> Might the main form not update MDIChildren before redrawing itself?

> TIA,
>     Rony.

Other Threads