trichview.com

trichview.support




Re: How to resize OleContainer?


Return to index


Author

Message

Sergey Tkachenko

Posted: 12/21/2004 17:34:15


void __fastcall TFom1::Button1Click(TObject *Sender)

{

    TOleContainer *oc = new TOleContainer((TComponent*)NULL);

    oc->Visible = false;

    oc->BorderStyle = bsNone;

    oc->Parent = rve;

    oc->SizeMode = smAutoSize;

    if(oc->InsertObjectDialog()) {

       if (rve->InsertControl("", oc, rvvaBaseline))

       {

          oc->OnResize = OnOLE_Resize;

          oc->OnActivate = OnOLE_Activate;

          oc->OnDeactivate = OnOLE_Deactivate;

          oc->Visible = true;

          oc->DoVerb(ovShow);

         rve->SetCurrentItemExtraIntProperty(rvepResizable, 1, True);

       }

    }

    else

        delete oc;

}



>

> I inserted TOleContainer in this way, but I can't resize it.





Powered by ABC Amber Outlook Express Converter