Tried that, the dialog box is never sent a TVN_KEYDOWN for VK_RETURN either.
What I see with spy++ is that the tree control gets a WM_KEYDOWN for
VK_RETURN. Then I see the tree control handling WM_GETDLGCODE with values
of DLGC_WANTARROWS and DLGC_WANTCHARS
It would seem as though a treeview control on a dialog box says "I want
arrow keys and characters only" which causes it not to get the enter key
and therefore not send a NM_RETURN.
Maybe I need to subclass the treeview and handle WM_GETDLGCODE to say "yes,
please give this treeview the enter key"