probleme d'exécution Visual c++ 6
La compillation fonctionne, mais ca me fais :
http://img130.imageshack.us/img130/3239/t9mi.jpg
le code de la ou ca arrive, je l'ai cherché avec le débeugeur et des points d'arrets.
Code de la DLL Regular :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
extern "C" void WINAPI AfxShowDlg(CWnd* pParent)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
DLLdlg = new CDllDialog();
int x=1;
BOOL ret = DLLdlg->Create(IDD_SETUP,pParent);
int y = 0;
if(true)
{
if(DLLdlg==NULL)
{
if(!ret)
{
//MessageBox(pParent,"Défaut ouverture Graphique.","ONERA",MB_OK);
DLLdlg=NULL;
return;
}
DLLdlg->ShowWindow(SW_SHOW);
}
}
if(DLLdlg!=NULL)
{
//LectureLignes();
DLLdlg->SendMessage(WM_USERDRAW,0,0); // dessine le profil x
}
}
extern "C" void WINAPI AfxInitDlg()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
DLLdlg = NULL;
} |
Ca utilise un pointeur privé a la DLL.
Code:
static CDllDialog *DLLdlg;
Code du programme principal :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
BOOL CAutoCollimationV1Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
.
.
.
AfxInitDlg();
UpdateData(FALSE);
return TRUE; // retourner TRUE, sauf si vous avez défini le focus sur un contrôle
}
void CAutoCollimationV1Dlg::OnBSetupTraitement()
{
AfxShowDlg(this);
} |
Est ce que vous voyez ce qui ne va pas !!!