Hi,

If I create a button dynamically with MFC like this:

RECT r;
r.bottom = 30;
r.left = 10;
r.right = 60;
r.top = 10;

pNewButton = new CButton;
pNewButton->Create("toto",WS_VISIBLE,r,AfxGetMainWnd(),1001);

and after when i click on the created button, I would like it show a message box. But I don't how to associate the click buttom message with the correct method of the created buttom.

Thanks