Salut
Voila mon code
Ceci cr�� un CEdit dynamiquement en cliquant sur le bouton1.
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); }
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 !
Partager