how do you disable/enable dialog buttons within code of an MFC program?

also is it possible to set whether a button is visable/not visable within the code? if so how?