Salut

Voila mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
void CDerfView::OnButton1() 
{
	// TODO: Add your control notification handler code here
	int i = this->tab.size();
	this->tab.push_back (i+1);
	CEdit* pEdit = new CEdit;
	CPoint pt(147, 14+i*50);
	CSize sz(87,32);
	pEdit->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,
		CRect(pt, sz), this, this->tab[i]);
	CString csItem; 
	csItem.Format("%d",i); 
	pEdit->SetWindowText(csItem);
}
Ceci créé un CEdit dynamiquement en cliquant sur le bouton1.

Ensuite sur le bouton 2 je veux supprimer un de ces CEdit créé et la ça bloque.
Je ne trouve pas comment récuperer l'id du CEdit qui a le focus !

Merci d'avance !