CAppDialog problem. How to make 2 dialog(panel) that can be switched between them ?

 
Hello friends

I have some questions, I hope someone can guide me.

I want to create 2 panels that can be switched between them. 

Each panel has a button that is used to switch to another panel.

When the  Button1 is pressed, panel 1 will be hidden or deleted and panel 2 will be displayed and when the  Button2 is pressed, panel 2 will be hidden or removed  and panel 1 will be displayed.

I don't want these two panels to be seen at the same time.