I've put the code that I thought was useful... For this case, the ESC key calls OnCancel(that's ok)... but when I'm on a CTreeCtrl(or any other control that don't use the RETURN key) in my dialog box and I push RETURN... it's the OnClick event of the BtnOk that is call... seems kind of weird.... thanks for the help.
DlgFiles:

lgFiles(...) : CDialog(DlgFiles::IDD, pParent){
...
}
void DlgFiles:

oDataExchange(CDataExchange* pDX){
...
}
BEGIN_MESSAGE_MAP(DlgFiles, CDialog)
//{{AFX_MSG_MAP(DlgFiles)
ON_BN_CLICKED(IDC_BTN_DBSELECT, OnBtnDbselect)
ON_BN_CLICKED(IDC_BTN_REFRESH, OnBtnRefresh)
ON_NOTIFY(NM_DBLCLK, IDC_TREE_FILES, OnDblclkTreeFiles)
ON_NOTIFY(TVN_SELCHANGED, IDC_TREE_FILES, OnSelchangedTreeFiles)
ON_CBN_SELCHANGE(IDC_LST_SERVER, OnSelchangeLstServer)
ON_BN_CLICKED(IDC_BTN_OK, OnBtnOk)
ON_BN_CLICKED(IDC_BTN_CANCEL, OnBtnCancel)
ON_WM_CLOSE()
ON_CBN_EDITCHANGE(IDC_LST_SERVER, OnEditchangeLstServer)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void DlgFiles::OnBtnOk(){
cout << "btnOK" << endl;
}
void DlgFiles::OnOK(){cout << "ok" << endl; }
void DlgFiles::OnCancel(){cout << "cancel" << endl;}