Add buttons to a Property Sheet
-
I've been reseaching Property Sheets for a couple of days now and I'm starting to get the hang of them. I have created a Property Sheet with 5 Property pages; each page contains some controls for displaying and manipulating data. What I'm wondering is how do I go about adding buttons and a menu to the Property Sheet, not the Property Page? I've read a few things here and other places, but nothing seems to fit (or work) with what I'm working on. Any help would be appreciated.
-
I've been reseaching Property Sheets for a couple of days now and I'm starting to get the hang of them. I have created a Property Sheet with 5 Property pages; each page contains some controls for displaying and manipulating data. What I'm wondering is how do I go about adding buttons and a menu to the Property Sheet, not the Property Page? I've read a few things here and other places, but nothing seems to fit (or work) with what I'm working on. Any help would be appreciated.
Everything is done in your propertysheet's OnCreate() member function. For a menu, add a CMenu variable (m_Menu) to your property sheet class. In OnCreate call
m_Menu.LoadMenu(IDR_MENU1);
SetMenu(&m_Menu);For buttons, add CButton members to your property sheet class. In OnCreate call
m_Button.Create(...)
for each button. You can handle the commands from the menu and buttons using regular MFC message mapping.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004
-
Everything is done in your propertysheet's OnCreate() member function. For a menu, add a CMenu variable (m_Menu) to your property sheet class. In OnCreate call
m_Menu.LoadMenu(IDR_MENU1);
SetMenu(&m_Menu);For buttons, add CButton members to your property sheet class. In OnCreate call
m_Button.Create(...)
for each button. You can handle the commands from the menu and buttons using regular MFC message mapping.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004