Making non-Visible buttons show up later

I notice in the Resource Editor that you can mark a button "Visible" or not.  If you leave visible unchecked the dialog opens without showing the button.  Is there a way now from the program to change the properties of the button to be visible?  I see a CWnd::SetProperty that applies to buttons but it seems to only change ActiveX properties. I'd like to have the button not show up until the program gets to a point where it asks a question that would be answered by Yes and No buttons that became visible at that time.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


where IDC_MYBUTTON should be the name of the button resource in the resource editor
If you have used the classwizard to set up a variable for your button (eg m_button1) you can simply do

m_button1.ShowWindow(SW_SHOW);  // to shoe the button

m_button1.ShowWindow(SW_HIDE);// to hide the window again

This will work for any button, control or window (ie anything derived from CWnd)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stevaAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.