This is the question that I asked you “ESC a command” last week: “by clicking a CANCEL button in a dialog, how could we exit a command?”.
When an user clicks a button in XNurbs dialog, XNurbs calls CRhinoGet::PostCustomWindowsMessage to exit CRhinoGet::GetObjects. @Gijs reported an undo bug - @pascal should be able to reproduce the bug. Since we have done extra development to avoid CRhinoGet::PostCustomWindowsMessage inside XNurbs, so Rhino does not need to work on it.