voici un exemple simplifié de ce que je faire
dans le ccp de ma fenêtre MDI principale, je fais :
#include <vcl.h>
#pragma hdrstop
#include "TFom1.h"
#include "TForm2.h"
//---------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm1::Nouveau1Click(TObject *Sender)
{
TForm2 * child;
child = new TForm2(this);
child->Show();
}
et la déclaration de TForm2 ds la dll est :
ifndef TForm2H
#define TForm2H
//---------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------
class __declspec( dllexport ) TForm2 : public TForm
{
__published: // Composants gérés par l'EDI
private: // Déclarations de l'utilisateur
public: // Déclarations de l'utilisateur
__fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------
#endif
[jfdsdjhfuetppo]--Message édité par ashram79 le 29-05-2002 à 10:38:33--[/jfdsdjhfuetppo]