how to use dialog button to change a 2D image into 3D?

i using opengl rendering to draw 2D images onto my dialog view. I wish to add a button to allow user to see the 2D object as 3D, how do i proceed? if there is any tutorial or sample code on this, kindly let me know. thank you