What's the point in that? DoModal will prevent the user from accessing all other windows anyway.
Sometimes it looks nice

With GetWindow you can enumerate all the children of the dialog, and with IsKindOf you can check if the childwindow is a CButton and en/disable it. With these 2 you can make a loop that loops all the elements on a dialog and set the buttonstate.